diff options
author | Tejun Heo <htejun@gmail.com> | 2006-01-22 23:09:37 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-26 22:36:28 -0500 |
commit | a72ec4ce6d3ae92e76baf5b2c65cc26e5e775e83 (patch) | |
tree | f5a177cc30c9b39d8ae7dcad29d03d27534b9f78 /drivers/scsi/sata_mv.c | |
parent | 041c5fc33cb7ed4fe5322585a611fb6e29a05d3a (diff) |
[PATCH] libata: implement and apply ata_eh_qc_complete/retry()
Implement ata_eh_qc_complete/retry() using scsi_eh_finish_cmd() and
scsi_eh_flush_done_q(). This removes all eh scsicmd finish hacks from
low level drivers.
This change was first suggested by Jeff Garzik.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/sata_mv.c')
-rw-r--r-- | drivers/scsi/sata_mv.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index 281223a0e45f..d9a554ca45c7 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
@@ -1839,7 +1839,6 @@ static void mv_phy_reset(struct ata_port *ap) | |||
1839 | static void mv_eng_timeout(struct ata_port *ap) | 1839 | static void mv_eng_timeout(struct ata_port *ap) |
1840 | { | 1840 | { |
1841 | struct ata_queued_cmd *qc; | 1841 | struct ata_queued_cmd *qc; |
1842 | unsigned long flags; | ||
1843 | 1842 | ||
1844 | printk(KERN_ERR "ata%u: Entering mv_eng_timeout\n",ap->id); | 1843 | printk(KERN_ERR "ata%u: Entering mv_eng_timeout\n",ap->id); |
1845 | DPRINTK("All regs @ start of eng_timeout\n"); | 1844 | DPRINTK("All regs @ start of eng_timeout\n"); |
@@ -1858,17 +1857,8 @@ static void mv_eng_timeout(struct ata_port *ap) | |||
1858 | printk(KERN_ERR "ata%u: BUG: timeout without command\n", | 1857 | printk(KERN_ERR "ata%u: BUG: timeout without command\n", |
1859 | ap->id); | 1858 | ap->id); |
1860 | } else { | 1859 | } else { |
1861 | /* hack alert! We cannot use the supplied completion | ||
1862 | * function from inside the ->eh_strategy_handler() thread. | ||
1863 | * libata is the only user of ->eh_strategy_handler() in | ||
1864 | * any kernel, so the default scsi_done() assumes it is | ||
1865 | * not being called from the SCSI EH. | ||
1866 | */ | ||
1867 | spin_lock_irqsave(&ap->host_set->lock, flags); | ||
1868 | qc->scsidone = scsi_finish_command; | ||
1869 | qc->err_mask |= AC_ERR_TIMEOUT; | 1860 | qc->err_mask |= AC_ERR_TIMEOUT; |
1870 | ata_qc_complete(qc); | 1861 | ata_eh_qc_complete(qc); |
1871 | spin_unlock_irqrestore(&ap->host_set->lock, flags); | ||
1872 | } | 1862 | } |
1873 | } | 1863 | } |
1874 | 1864 | ||