libata: use ATA_HORKAGE_STUCK_ERR for ATAPI tape drives
authorAlbert Lee <albertcc@tw.ibm.com>
Thu, 15 Nov 2007 01:35:47 +0000 (10:35 +0900)
committerTejun Heo <htejun@gmail.com>
Mon, 19 Nov 2007 03:28:11 +0000 (12:28 +0900)
Per Mark's comments, maybe all ATAPI tape drives need ATA_HORKAGE_STUCK_ERR.
This patch applys ATA_HORKAGE_STUCK_ERR for all ATAPI tape drives.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Cc: Mark Lord <liml@rtr.ca>
Signed-off-by: Tejun Heo <htejun@gmail.com>
drivers/ata/libata-core.c

index 5478b4c6c6e93977b5bb0bc6b22a911a0fa5db73..f7f6ca991e324aed6202f5b36d99db9991819415 100644 (file)
@@ -2307,8 +2307,10 @@ int ata_dev_configure(struct ata_device *dev)
        }
 
        if ((dev->class == ATA_DEV_ATAPI) &&
-           (atapi_command_packet_set(id) == TYPE_TAPE))
+           (atapi_command_packet_set(id) == TYPE_TAPE)) {
                dev->max_sectors = ATA_MAX_SECTORS_TAPE;
+               dev->horkage |= ATA_HORKAGE_STUCK_ERR;
+       }
 
        if (dev->horkage & ATA_HORKAGE_MAX_SEC_128)
                dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128,