diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-14 20:50:05 +0100 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-14 20:50:05 +0100 |
commit | c6e6e666cbfe40f0d7fb1a293ff6332973acac37 (patch) | |
tree | 21609c228d8aaf1f9a2217f7fd08266ed669f5bc /drivers/scsi/libata-core.c | |
parent | [libata] minor fixes, new helpers (diff) | |
download | linux-c6e6e666cbfe40f0d7fb1a293ff6332973acac37.tar.xz linux-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.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 3855bfa8e8d4..ba1eb8b38e00 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"); } |