sata_fsl: convert to command iterator
authorJens Axboe <axboe@kernel.dk>
Tue, 19 Jun 2018 16:12:50 +0000 (10:12 -0600)
committerTejun Heo <tj@kernel.org>
Tue, 19 Jun 2018 16:30:27 +0000 (09:30 -0700)
We need to iterate all commands, including the internal one,
for ATAPI error handling.

Fixes: 28361c403683 ("libata: add extra internal command")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/sata_fsl.c

index b8d9cfc..bb5ec5f 100644 (file)
@@ -1229,8 +1229,7 @@ static void sata_fsl_host_intr(struct ata_port *ap)
 
        /* Workaround for data length mismatch errata */
        if (unlikely(hstatus & INT_ON_DATA_LENGTH_MISMATCH)) {
-               for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
-                       qc = ata_qc_from_tag(ap, tag);
+               ata_qc_for_each_with_internal(ap, qc, tag) {
                        if (qc && ata_is_atapi(qc->tf.protocol)) {
                                u32 hcontrol;
                                /* Set HControl[27] to clear error registers */