Name

ata_to_sense_error — convert ATA error to SCSI error

Synopsis

void ata_to_sense_error (unsigned id,
 u8 drv_stat,
 u8 drv_err,
 u8 * sk,
 u8 * asc,
 u8 * ascq,
 int verbose);
 

Arguments

unsigned id

ATA device number

u8 drv_stat

value contained in ATA status register

u8 drv_err

value contained in ATA error register

u8 * sk

the sense key we'll fill out

u8 * asc

the additional sense code we'll fill out

u8 * ascq

the additional sense code qualifier we'll fill out

int verbose

be verbose

Description

Converts an ATA error into a SCSI error. Fill out pointers to SK, ASC, and ASCQ bytes for later use in fixed or descriptor format sense blocks.

LOCKING: spin_lock_irqsave(host lock)