summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-14 14:50:05 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-14 14:50:05 -0500
commitc6e6e666cbfe40f0d7fb1a293ff6332973acac37 (patch)
tree21609c228d8aaf1f9a2217f7fd08266ed669f5bc /drivers/scsi/libata-core.c
parent2c13b7cee045af689b36349c2bc6a9ed6e3d73fa (diff)
downloadkernel-crypto-c6e6e666cbfe40f0d7fb1a293ff6332973acac37.tar.gz
kernel-crypto-c6e6e666cbfe40f0d7fb1a293ff6332973acac37.tar.xz
kernel-crypto-c6e6e666cbfe40f0d7fb1a293ff6332973acac37.zip
[libata] REQUEST SENSE handling fixes
- Move ATAPI check-condition handling out of the timeout handler - Use multi-qc-issue feature to issue REQUEST SENSE ATAPI PACKET command upon receiving an ATAPI check-condition. This cleans things up a lot, and eliminates a nasty recursion bug.
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 3855bfa8e8d..ba1eb8b38e0 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -3284,32 +3284,11 @@ static void ata_qc_timeout(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
struct ata_host_set *host_set = ap->host_set;
- struct ata_device *dev = qc->dev;
u8 host_stat = 0, drv_stat;
unsigned long flags;
DPRINTK("ENTER\n");
- /* FIXME: doesn't this conflict with timeout handling? */
- if (qc->dev->class == ATA_DEV_ATAPI && qc->scsicmd) {
- struct scsi_cmnd *cmd = qc->scsicmd;
-
- if (!(cmd->eh_eflags & SCSI_EH_CANCEL_CMD)) {
-
- /* finish completing original command */
- spin_lock_irqsave(&host_set->lock, flags);
- __ata_qc_complete(qc);
- spin_unlock_irqrestore(&host_set->lock, flags);
-
- atapi_request_sense(ap, dev, cmd);
-
- cmd->result = (CHECK_CONDITION << 1) | (DID_OK << 16);
- scsi_finish_command(cmd);
-
- goto out;
- }
- }
-
spin_lock_irqsave(&host_set->lock, flags);
/* hack alert! We cannot use the supplied completion
@@ -3348,7 +3327,6 @@ static void ata_qc_timeout(struct ata_queued_cmd *qc)
spin_unlock_irqrestore(&host_set->lock, flags);
-out:
DPRINTK("EXIT\n");
}