aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-sff.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-10-20 00:10:21 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-10-22 20:40:15 -0400
commit570106df6bdb4907ad7f70793079c762f34d561a (patch)
tree7f81d9eb2cf24a9882c59706d7e1e4c4107e60c9 /drivers/ata/libata-sff.c
parentf667fdbbbea8bcce6cf9f7acb51b7cb4c264cc61 (diff)
libata-sff: fix ata_sff_post_internal_cmd()
ata_sff_post_internal_cmd() needs to grab port lock before calling ata_bmdma_stop() and also need to clear hsm_task_state. Fix it. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-sff.c')
-rw-r--r--drivers/ata/libata-sff.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 2a4c516894f0..4b4739486327 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -2153,8 +2153,17 @@ void ata_sff_error_handler(struct ata_port *ap)
2153 */ 2153 */
2154void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc) 2154void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc)
2155{ 2155{
2156 if (qc->ap->ioaddr.bmdma_addr) 2156 struct ata_port *ap = qc->ap;
2157 unsigned long flags;
2158
2159 spin_lock_irqsave(ap->lock, flags);
2160
2161 ap->hsm_task_state = HSM_ST_IDLE;
2162
2163 if (ap->ioaddr.bmdma_addr)
2157 ata_bmdma_stop(qc); 2164 ata_bmdma_stop(qc);
2165
2166 spin_unlock_irqrestore(ap->lock, flags);
2158} 2167}
2159 2168
2160/** 2169/**