[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240624221211.2593736-1-ipylypiv@google.com>
Date: Mon, 24 Jun 2024 22:12:04 +0000
From: Igor Pylypiv <ipylypiv@...gle.com>
To: Damien Le Moal <dlemoal@...nel.org>, Niklas Cassel <cassel@...nel.org>
Cc: Tejun Heo <tj@...nel.org>, Hannes Reinecke <hare@...e.de>,
"Martin K. Petersen" <martin.petersen@...cle.com>, Jason Yan <yanaijie@...wei.com>,
linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
Igor Pylypiv <ipylypiv@...gle.com>
Subject: [PATCH v2 0/6] ATA PASS-THROUGH sense data fixes
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@...r.kernel.org' tags to patches that are fixing bugs.
- Reordered patches with the 'Cc: stable@...r.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.
Igor Pylypiv (6):
ata: libata-scsi: Do not overwrite valid sense data when CK_COND=1
ata: libata-scsi: Fix offsets for the fixed format sense data
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 | 179 +++++++++++++++++++++-----------------
3 files changed, 107 insertions(+), 90 deletions(-)
--
2.45.2.741.gdbec12cfda-goog
Powered by blists - more mailing lists