milos-linux/drivers/ata
Niklas Cassel 759e8756da ata: libata-scsi: do not needlessly defer commands when using PMP with FBS
The ACS specification does not allow a non-NCQ command to be issued while
an NCQ command is outstanding.

Commit 0ea84089db ("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 0ea84089db ("ata: libata-scsi: avoid Non-NCQ command starvation").

Fixes: 0ea84089db ("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>
2026-05-18 12:26:51 +02:00
..
pata_parport ata: pata_parport: switch to dynamic root device 2026-04-27 11:38:16 +02:00
acard-ahci.c
ahci.c ata: ahci: force 32-bit DMA for JMicron JMB582/JMB585 2026-04-07 09:36:46 +02:00
ahci.h ata: libahci_platform: use flex array for platform PHYs 2026-03-31 10:29:35 +02:00
ahci_brcm.c
ahci_ceva.c
ahci_da850.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
ahci_dm816.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
ahci_dwc.c ata: ahci-dwc: Remove not-going-to-be-supported code for Baikal SoC 2026-02-24 15:29:57 +01:00
ahci_imx.c ata: ahci-imx: Fix Wvoid-pointer-to-enum-cast warning 2026-01-08 17:43:00 +09:00
ahci_mtk.c
ahci_mvebu.c
ahci_octeon.c
ahci_platform.c
ahci_qoriq.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
ahci_seattle.c
ahci_st.c
ahci_sunxi.c
ahci_tegra.c
ahci_xgene.c ata: ahci-xgene: Fix Wvoid-pointer-to-enum-cast warning 2026-01-08 17:43:04 +09:00
ata_generic.c
ata_piix.c ata: libata-sata: Add link_power_management_supported sysfs attribute 2025-07-31 12:56:21 +09:00
Kconfig ata: ahci-dwc: Remove not-going-to-be-supported code for Baikal SoC 2026-02-24 15:29:57 +01:00
libahci.c ata: libata-sata: Add link_power_management_supported sysfs attribute 2025-07-31 12:56:21 +09:00
libahci_platform.c ata: libahci_platform: use flex array for platform PHYs 2026-03-31 10:29:35 +02:00
libata-acpi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
libata-core.c ata: libata-scsi: do not needlessly defer commands when using PMP with FBS 2026-05-18 12:26:51 +02:00
libata-eh.c ata: libata-scsi: do not needlessly defer commands when using PMP with FBS 2026-05-18 12:26:51 +02:00
libata-pata-timings.c
libata-pmp.c ata: libata-scsi: do not needlessly defer commands when using PMP with FBS 2026-05-18 12:26:51 +02:00
libata-sata.c ata: libata-sata: simplify ata_sas_queuecmd() 2026-02-24 09:40:58 +09:00
libata-scsi.c ata: libata-scsi: do not needlessly defer commands when using PMP with FBS 2026-05-18 12:26:51 +02:00
libata-sff.c ata: libata-sff: add WQ_PERCPU to alloc_workqueue users 2025-11-07 09:42:36 +01:00
libata-trace.c
libata-transport.c ata: libata-transport: remove static variable ata_scsi_transport_template 2026-04-02 21:01:10 +02:00
libata-transport.h ata: libata-transport: remove static variable ata_scsi_transport_template 2026-04-02 21:01:10 +02:00
libata-zpodd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
libata.h ATA changes for 6.20 2026-02-12 17:12:43 -08:00
Makefile
pata_acpi.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_ali.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_amd.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_arasan_cf.c ata: pata_arasan_cf: fix missing newline in dev_err() messages 2026-04-03 09:16:00 +02:00
pata_artop.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_atiixp.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_atp867x.c
pata_buddha.c
pata_cmd64x.c
pata_cmd640.c
pata_cs5520.c
pata_cs5530.c
pata_cs5535.c
pata_cs5536.c ata: pata_cs5536: fix build on 32-bit UML 2025-06-10 14:26:27 +02:00
pata_cypress.c ata: pata_cypress: fix typo in error message 2026-02-02 13:47:40 +09:00
pata_efar.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_ep93xx.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_falcon.c
pata_ftide010.c ata: pata_ftide010: Fix some DMA timings 2026-02-04 12:23:23 +01:00
pata_gayle.c
pata_hpt3x2n.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_hpt3x3.c
pata_hpt37x.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_hpt366.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_icside.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_imx.c
pata_isapnp.c
pata_it821x.c ata: pata_it821x: Replace deprecated strcpy with strscpy in it821x_display_disk 2025-10-23 14:23:40 +02:00
pata_it8213.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_ixp4xx_cf.c
pata_jmicron.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_legacy.c ata: pata_legacy: remove VLB support 2026-02-02 13:47:37 +09:00
pata_macio.c ata: pata_macio: Remove space before newline 2025-08-01 08:43:08 +09:00
pata_marvell.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_mpc52xx.c
pata_mpiix.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_netcell.c
pata_ninja32.c
pata_ns87410.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_ns87415.c
pata_octeon_cf.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_of_platform.c
pata_oldpiix.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_opti.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_optidma.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_pcmcia.c ata: pata_pcmcia: Add Iomega Clik! PCMCIA ATA/ATAPI Adapter 2025-11-18 21:58:41 +01:00
pata_pdc202xx_old.c
pata_pdc2027x.c ata: pata_pdc2027x: Remove space before newline and abbreviations 2025-08-01 08:43:11 +09:00
pata_piccolo.c
pata_platform.c
pata_pxa.c ata: pata_pxa: Fix potential NULL pointer dereference in pxa_ata_probe() 2025-04-08 12:36:03 +09:00
pata_radisys.c
pata_rb532_cf.c
pata_rdc.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_rz1000.c
pata_sc1200.c
pata_sch.c
pata_serverworks.c
pata_sil680.c
pata_sis.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_sl82c105.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_triflex.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_via.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pdc_adma.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_dwc_460ex.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sata_fsl.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sata_gemini.c
sata_gemini.h
sata_highbank.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_inic162x.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_mv.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_nv.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_promise.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_promise.h
sata_qstor.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_rcar.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_sil.c ata: libata-core: Rename ata_do_set_mode() 2025-07-04 10:36:00 +02:00
sata_sil24.c ata: libata-scsi: do not use the deferred QC feature on PMPs with CBS 2026-05-18 12:25:28 +02:00
sata_sis.c
sata_svw.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_sx4.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_uli.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_via.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_vsc.c
sis.h