Linux ATA/IDE development
 help / color / mirror / Atom feed
* [PATCH v4 0/4] ata: fix deferred QC handling for port multipliers
@ 2026-05-13 15:13 Niklas Cassel
  2026-05-13 15:14 ` [PATCH v4 1/4] ata: libata-scsi: improve readability of ata_scsi_qc_issue() Niklas Cassel
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Niklas Cassel @ 2026-05-13 15:13 UTC (permalink / raw)
  To: Tommy Kelly, Damien Le Moal, Niklas Cassel, John Garry,
	Martin K. Petersen
  Cc: linux-ide

Hello all,

Tommy Kelly reported a regression with PMP that use CBS:
https://lore.kernel.org/linux-ide/ce09cc21-a8e9-4845-b205-35411e22fba9@tkel.ly/

It turns out that the ap->excl_link logic used for PMP that use CBS is
incompatible with the deferred qc issuing via a workqueue.
This is fixed in patch 3/4.

While looking at the code, it turns out that the deferred qc issuing via
workqueue is misdesigned. It assumed that we can't mix NCQ and non-NCQ
commands on the same port. The limitation is that you can not mix NCQ and
non-NCQ commands on the same drive. However, with a PMP with FBS, you can
issue (mixed NCQ and non-NCQ commands) to the different drives. Thus, move
the saved deferred QC from struct ata_port to struct ata_link. This is
fixed in patch 4/4.


Changes since v3:
-Use iter_mode PMP_FIRST rather than EDGE in ata_for_each_link(), such that
 the slave_link is included.
-Add patch 1/4 that is a cleanup patch.
-Add patch 2/4 that changes so that the deferred QC is only used for
 ATA_DEFER_LINK (i.e. not used for ATA_DEFER_PORT).
-Renamed ATA_DEFER_LINK_CBS to ATA_DEFER_LINK_EXCL.


Niklas Cassel (4):
  ata: libata-scsi: improve readability of ata_scsi_qc_issue()
  ata: libata-scsi: do not use the deferred QC feature for
    ATA_DEFER_PORT
  ata: libata-scsi: do not use the deferred QC feature on PMPs with CBS
  ata: libata-scsi: do not needlessly defer commands when using PMP with
    FBS

 drivers/ata/libata-core.c |  9 ++--
 drivers/ata/libata-eh.c   |  8 ++--
 drivers/ata/libata-pmp.c  | 18 +++++++-
 drivers/ata/libata-scsi.c | 89 +++++++++++++++++++++++----------------
 drivers/ata/sata_sil24.c  |  6 ++-
 include/linux/libata.h    |  7 +--
 6 files changed, 87 insertions(+), 50 deletions(-)


base-commit: 79b6e4dd96ec663ef51bb52b00e0bbbdf0ec9009
-- 
2.54.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-05-14 11:09 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13 15:13 [PATCH v4 0/4] ata: fix deferred QC handling for port multipliers Niklas Cassel
2026-05-13 15:14 ` [PATCH v4 1/4] ata: libata-scsi: improve readability of ata_scsi_qc_issue() Niklas Cassel
2026-05-13 15:14 ` [PATCH v4 2/4] ata: libata-scsi: do not use the deferred QC feature for ATA_DEFER_PORT Niklas Cassel
2026-05-13 15:14 ` [PATCH v4 3/4] ata: libata-scsi: do not use the deferred QC feature on PMPs with CBS Niklas Cassel
2026-05-14  6:19   ` sashiko-bot
2026-05-14  6:30     ` Niklas Cassel
2026-05-13 15:14 ` [PATCH v4 4/4] ata: libata-scsi: do not needlessly defer commands when using PMP with FBS Niklas Cassel
2026-05-14 10:05   ` sashiko-bot
2026-05-14 11:08     ` Niklas Cassel
2026-05-14  4:09 ` [PATCH v4 0/4] ata: fix deferred QC handling for port multipliers Tommy Kelly
2026-05-14  4:42   ` Tommy Kelly
2026-05-14  6:42     ` Niklas Cassel
2026-05-14  6:48       ` Tommy Kelly
2026-05-14  6:49   ` Niklas Cassel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox