linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] ATA PASS-THROUGH sense data fixes
@ 2024-06-26 23:04 Igor Pylypiv
  2024-06-26 23:04 ` [PATCH v3 1/6] ata: libata-scsi: Fix offsets for the fixed format sense data Igor Pylypiv
                   ` (5 more replies)
  0 siblings, 6 replies; 30+ messages in thread
From: Igor Pylypiv @ 2024-06-26 23:04 UTC (permalink / raw)
  To: Damien Le Moal, Niklas Cassel
  Cc: Tejun Heo, Hannes Reinecke, linux-ide, linux-kernel, Igor Pylypiv

This patch series is fixing a few ATA PASS-THROUGH issues:
1. Not reporting "ATA Status Return sense data descriptor" / "Fixed format
   sense data" when ATA_QCFLAG_SENSE_VALID is set.
2. Generating "fake" sk/asc/ascq based on ATA status/error registers when
   ATA_QCFLAG_SENSE_VALID is set and CK_COND=1.
3. Fixed format sense data was using incorrect field offsets for ATA
   PASS-THROUGH commands.
4. Using qc->result_tf in ATA sense data generation functions without
   checking if qc->result_tf contains a valid data.

Changes since v1:
Thanks Damien and Niklas for the reviews!

- Squashed two v1 patches 2/4 and 3/4 into one patch with a different
  implementation.
- Added 'Cc: stable@vger.kernel.org' tags to patches that are fixing bugs.
- Reordered patches with the 'Cc: stable@vger.kernel.org' tag to be applied
  first in order to simplify backports to stable releases.
- Restored the buffer memset in atapi_eh_request_sense().
- Updated declaration order in v1 patch 4/4.
- Added a patch to cleanup unused ATA device id in ata_to_sense_error().
- Updated fill_result_tf() to set ATA_QCFLAG_RTF_FILLED after populating
  the result taskfile. Removed now redundant flag sets/checks from ahci.
- Updated ATA sense data generation functions to return early if result_tf
  is not filled. Added WARN_ON_ONCE checks to generate a warning when
  ATA_QCFLAG_RTF_FILLED is not set and libata needs to generate sense data.

Changes since v2:
- Moved v2 2/6 patch (fixed ATA PT offsets) to be the first one in v3.
- Removed unused variable 'sb' from ata_gen_passthru_sense().
- Removed WARN_ON_ONCE checks and added ata_dev_dbg() logs instead.
- Removed the Fixes tag from v2 4/6 patch because the patch is doing
  a cleanup and is not fixing any bugs.

Igor Pylypiv (6):
  ata: libata-scsi: Fix offsets for the fixed format sense data
  ata: libata-scsi: Do not overwrite valid sense data when CK_COND=1
  ata: libata-scsi: Remove redundant sense_buffer memsets
  ata: libata-scsi: Do not pass ATA device id to ata_to_sense_error()
  ata: libata: Set ATA_QCFLAG_RTF_FILLED in fill_result_tf()
  ata: libata-scsi: Check ATA_QCFLAG_RTF_FILLED before using result_tf

 drivers/ata/libahci.c     |  10 --
 drivers/ata/libata-core.c |   8 ++
 drivers/ata/libata-scsi.c | 188 ++++++++++++++++++++++----------------
 3 files changed, 115 insertions(+), 91 deletions(-)

-- 
2.45.2.803.g4e1b14247a-goog


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

end of thread, other threads:[~2024-07-01 20:01 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-26 23:04 [PATCH v3 0/6] ATA PASS-THROUGH sense data fixes Igor Pylypiv
2024-06-26 23:04 ` [PATCH v3 1/6] ata: libata-scsi: Fix offsets for the fixed format sense data Igor Pylypiv
2024-06-27 12:08   ` Niklas Cassel
2024-06-27 21:21     ` Igor Pylypiv
2024-06-28  6:47     ` Hannes Reinecke
2024-06-28 15:49       ` Niklas Cassel
2024-06-28 18:25         ` Niklas Cassel
2024-06-28 23:17           ` Igor Pylypiv
2024-06-26 23:04 ` [PATCH v3 2/6] ata: libata-scsi: Do not overwrite valid sense data when CK_COND=1 Igor Pylypiv
2024-06-27  0:16   ` Damien Le Moal
2024-06-27 20:55     ` Igor Pylypiv
2024-06-28  3:48       ` Damien Le Moal
2024-06-27 14:14   ` Niklas Cassel
2024-06-27 15:15     ` Niklas Cassel
2024-06-27 21:54     ` Igor Pylypiv
2024-06-28 18:44       ` Niklas Cassel
2024-06-28 23:31         ` Igor Pylypiv
2024-06-29  3:09           ` Niklas Cassel
2024-07-01 20:00             ` Igor Pylypiv
2024-06-26 23:04 ` [PATCH v3 3/6] ata: libata-scsi: Remove redundant sense_buffer memsets Igor Pylypiv
2024-06-26 23:04 ` [PATCH v3 4/6] ata: libata-scsi: Do not pass ATA device id to ata_to_sense_error() Igor Pylypiv
2024-06-26 23:04 ` [PATCH v3 5/6] ata: libata: Set ATA_QCFLAG_RTF_FILLED in fill_result_tf() Igor Pylypiv
2024-06-28 20:12   ` Niklas Cassel
2024-06-28 23:08     ` Igor Pylypiv
2024-06-26 23:04 ` [PATCH v3 6/6] ata: libata-scsi: Check ATA_QCFLAG_RTF_FILLED before using result_tf Igor Pylypiv
2024-06-27  0:19   ` Damien Le Moal
2024-06-27 22:03     ` Igor Pylypiv
2024-06-27  6:16   ` Hannes Reinecke
2024-06-28 19:42   ` Niklas Cassel
2024-06-28 23:15     ` Igor Pylypiv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).