Skip to content

ata: fix deferred QC handling for port multipliers

Niklas Cassel linux-ide 5 versions – Applied

Status from this message: Applied to libata/linux.git (for-7.1-fixes), thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 11 repliesApplied
  2. v44 patches 7 repliesSuperseded
  3. v32 patches 6 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches1 replySuperseded
v13 patches9 repliesSuperseded

Changes in v5 from the cover letter

-Fix ATA_DEFER_LINK_EXCL to use the correct goto label. While refactoring,
I accidentally used the wrong label goto defer_qc instead of goto free_qc, which of course broke PMP CBS in v4.

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/4ata: libata-scsi: improve readability of ata_scsi_qc_issue()drivers/ata/libata-scsi.c+21 -221 reply
2/4ata: libata-scsi: do not use the deferred QC feature for ATA_DEFER_PORTdrivers/ata/libata-scsi.c+3 -21 reply
3/4ata: libata-scsi: do not use the deferred QC feature on PMPs with CBSdrivers/ata/libata-pmp.c drivers/ata/libata-scsi.c drivers/ata/sata_sil24.c +1 more+26 -21 reply
4/4ata: libata-scsi: do not needlessly defer commands when using PMP with FBSdrivers/ata/libata-core.c drivers/ata/libata-eh.c drivers/ata/libata-pmp.c +2 more+42 -291 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDamien Le MoalTommy Kelly
SeriesR-b T-b
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/4] ata: fix deferred QC handling for port multipliers

Hello all,

Tommy Kelly reported a regression with PMP that use CBS:
https://lore.kernel.org/linux-ide/[email protected]/

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 v4:
-Fix ATA_DEFER_LINK_EXCL to use the correct goto label. While refactoring,
I accidentally used the wrong label goto defer_qc instead of goto free_qc, which of course broke PMP CBS in v4.

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: 0926c1b731b73e7296e4ad4f7d055918e16ae6ab

Signature · 1 line
2.54.0