summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorMark Lord <liml@rtr.ca>2009-01-31 00:49:29 +0100
committerJeff Garzik <jgarzik@redhat.com>2009-03-25 03:02:38 +0100
commit95db505125fb7bc624b7c3b6747bbeaebbffc2e4 (patch)
tree5cb2fd75cfa1b3e6d83d94338a01685ff2ec529d /drivers/ata
parentsata_mv: restructure mv_qc_issue (diff)
downloadlinux-95db505125fb7bc624b7c3b6747bbeaebbffc2e4.tar.xz
linux-95db505125fb7bc624b7c3b6747bbeaebbffc2e4.zip
sata_mv: update ata_qc_from_tag
Update the logic in ata_qc_from_tag() to match that used in similar places elsewhere in libata. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_mv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 0c25f52249df..181f02127410 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1628,6 +1628,12 @@ static struct ata_queued_cmd *mv_get_active_qc(struct ata_port *ap)
if (pp->pp_flags & MV_PP_FLAG_NCQ_EN)
return NULL;
qc = ata_qc_from_tag(ap, ap->link.active_tag);
+ if (qc) {
+ if (qc->tf.flags & ATA_TFLAG_POLLING)
+ qc = NULL;
+ else if (!(qc->flags & ATA_QCFLAG_ACTIVE))
+ qc = NULL;
+ }
if (qc && (qc->tf.flags & ATA_TFLAG_POLLING))
qc = NULL;
return qc;