diff options
-rw-r--r-- | drivers/scsi/libata-scsi.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index fc547ca295fa..dd954a23b357 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -511,13 +511,11 @@ void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc, | |||
511 | printk(KERN_WARNING "ata%u: no sense translation for status: 0x%02x\n", | 511 | printk(KERN_WARNING "ata%u: no sense translation for status: 0x%02x\n", |
512 | id, drv_stat); | 512 | id, drv_stat); |
513 | 513 | ||
514 | /* For our last chance pick, use medium read error because | 514 | /* We need a sensible error return here, which is tricky, and one |
515 | * it's much more common than an ATA drive telling you a write | 515 | that won't cause people to do things like return a disk wrongly */ |
516 | * has failed. | 516 | *sk = ABORTED_COMMAND; |
517 | */ | 517 | *asc = 0x00; |
518 | *sk = MEDIUM_ERROR; | 518 | *ascq = 0x00; |
519 | *asc = 0x11; /* "unrecovered read error" */ | ||
520 | *ascq = 0x04; /* "auto-reallocation failed" */ | ||
521 | 519 | ||
522 | translate_done: | 520 | translate_done: |
523 | printk(KERN_ERR "ata%u: translated ATA stat/err 0x%02x/%02x to " | 521 | printk(KERN_ERR "ata%u: translated ATA stat/err 0x%02x/%02x to " |