Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ata: sata_nv: Fix retrieving of active qcs

ata_qc_complete_multiple() has to be called with the tags physically
active, that is the hw tag is at bit 0. ap->qc_active has the same tag
at bit ATA_TAG_INTERNAL instead, so call ata_qc_get_active() to fix that
up. This is done in the vein of 8385d756e114 ("libata: Fix retrieving of
active qcs").

Fixes: 28361c403683 ("libata: add extra internal command")
Tested-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Sascha Hauer and committed by
Jens Axboe
8e4c309f 94bd5719

+1 -1
+1 -1
drivers/ata/sata_nv.c
··· 2100 2100 pp->dhfis_bits &= ~done_mask; 2101 2101 pp->dmafis_bits &= ~done_mask; 2102 2102 pp->sdbfis_bits |= done_mask; 2103 - ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask); 2103 + ata_qc_complete_multiple(ap, ata_qc_get_active(ap) ^ done_mask); 2104 2104 2105 2105 if (!ap->qc_active) { 2106 2106 DPRINTK("over\n");