Skip to content

Commit

Permalink
sata_mv: update ata_qc_from_tag
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Lord authored and Jeff Garzik committed Mar 25, 2009
1 parent f48765c commit 95db505
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/ata/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 95db505

Please sign in to comment.