aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/libata-core.c18
-rw-r--r--include/linux/libata.h1
2 files changed, 14 insertions, 5 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 1584164e7704..5478b4c6c6e9 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5415,11 +5415,19 @@ fsm_start:
5415 * let the EH abort the command or reset the device. 5415 * let the EH abort the command or reset the device.
5416 */ 5416 */
5417 if (unlikely(status & (ATA_ERR | ATA_DF))) { 5417 if (unlikely(status & (ATA_ERR | ATA_DF))) {
5418 ata_port_printk(ap, KERN_WARNING, "DRQ=1 with device " 5418 /* Some ATAPI tape drives forget to clear the ERR bit
5419 "error, dev_stat 0x%X\n", status); 5419 * when doing the next command (mostly request sense).
5420 qc->err_mask |= AC_ERR_HSM; 5420 * We ignore ERR here to workaround and proceed sending
5421 ap->hsm_task_state = HSM_ST_ERR; 5421 * the CDB.
5422 goto fsm_start; 5422 */
5423 if (!(qc->dev->horkage & ATA_HORKAGE_STUCK_ERR)) {
5424 ata_port_printk(ap, KERN_WARNING,
5425 "DRQ=1 with device error, "
5426 "dev_stat 0x%X\n", status);
5427 qc->err_mask |= AC_ERR_HSM;
5428 ap->hsm_task_state = HSM_ST_ERR;
5429 goto fsm_start;
5430 }
5423 } 5431 }
5424 5432
5425 /* Send the CDB (atapi) or the first data block (ata pio out). 5433 /* Send the CDB (atapi) or the first data block (ata pio out).
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 3f9a6a140a98..ef52a07c43d8 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -340,6 +340,7 @@ enum {
340 ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ 340 ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */
341 ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ 341 ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */
342 ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ 342 ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */
343 ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */
343 344
344 /* DMA mask for user DMA control: User visible values; DO NOT 345 /* DMA mask for user DMA control: User visible values; DO NOT
345 renumber */ 346 renumber */