+4
−4
+4
−1
+25
−18
+3
−3
Loading
The ACS specification does not allow a non-NCQ command to be issued while an NCQ command is outstanding. Commit 0ea84089 ("ata: libata-scsi: avoid Non-NCQ command starvation") introduced a feature where a deferred non-NCQ command gets issued from a workqueue. The design stores a single non-NCQ command per port. However, when using Port Multipliers (PMPs), specifically PMPs that support FIS-Based Switching (FBS), non-NCQ and NCQ commands can be mixed on the same port, just not for the same link, see e.g. ata_std_qc_defer() which is, and always has operated on a per-link basis. Therefore, move the deferred_qc from struct ata_port to struct ata_link. This way, when using a PMP with FBS, we will not needlessly defer commands to all other links, just because one link issued a non-NCQ command while having an NCQ command outstanding. Only commands for that specific link will be deferred. This is in line with how PMPs with FBS worked before commit 0ea84089 ("ata: libata-scsi: avoid Non-NCQ command starvation"). Fixes: 0ea84089 ("ata: libata-scsi: avoid Non-NCQ command starvation") Tested-by:Tommy Kelly <linux@tkel.ly> Reviewed-by:
Damien Le Moal <dlemoal@kernel.org> Signed-off-by:
Niklas Cassel <cassel@kernel.org>