The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to stable@vger.kernel.org.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x 28ab9769117ca944cb6eb537af5599aa436287a4 # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --in-reply-to '2024072906-drapery-glimpse-fc09@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
28ab9769117c ("ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error") f2b1e9c6f867 ("scsi: core: Introduce scsi_build_sense()") 8148dfba29e7 ("scsi: 3w-xxxx: Whitespace cleanup") 96e209be6ecb ("scsi: lpfc: Convert SCSI I/O completions to SLI-3 and SLI-4 handlers") da255e2e7cc8 ("scsi: lpfc: Convert SCSI path to use common I/O submission path") 47ff4c510f02 ("scsi: lpfc: Enable common send_io interface for SCSI and NVMe") 307e338097dc ("scsi: lpfc: Rework remote port ref counting and node freeing")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 28ab9769117ca944cb6eb537af5599aa436287a4 Mon Sep 17 00:00:00 2001 From: Igor Pylypiv ipylypiv@google.com Date: Tue, 2 Jul 2024 02:47:31 +0000 Subject: [PATCH] ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error
SAT-5 revision 8 specification removed the text about the ANSI INCITS 431-2007 compliance which was requiring SCSI/ATA Translation (SAT) to return descriptor format sense data for the ATA PASS-THROUGH commands regardless of the setting of the D_SENSE bit.
Let's honor the D_SENSE bit for ATA PASS-THROUGH commands while generating the "ATA PASS-THROUGH INFORMATION AVAILABLE" sense data.
SAT-5 revision 7 ================
12.2.2.8 Fixed format sense data
Table 212 shows the fields returned in the fixed format sense data (see SPC-5) for ATA PASS-THROUGH commands. SATLs compliant with ANSI INCITS 431-2007, SCSI/ATA Translation (SAT) return descriptor format sense data for the ATA PASS-THROUGH commands regardless of the setting of the D_SENSE bit.
SAT-5 revision 8 ================
12.2.2.8 Fixed format sense data
Table 211 shows the fields returned in the fixed format sense data (see SPC-5) for ATA PASS-THROUGH commands.
Cc: stable@vger.kernel.org # 4.19+ Reported-by: Niklas Cassel cassel@kernel.org Closes: https://lore.kernel.org/linux-ide/Zn1WUhmLglM4iais@ryzen.lan Reviewed-by: Niklas Cassel cassel@kernel.org Signed-off-by: Igor Pylypiv ipylypiv@google.com Reviewed-by: Hannes Reinecke hare@suse.de Link: https://lore.kernel.org/r/20240702024735.1152293-4-ipylypiv@google.com Signed-off-by: Niklas Cassel cassel@kernel.org
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index a9d2a1cf4c3d..fdc2a3b59fc1 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -941,11 +941,8 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc) &sense_key, &asc, &ascq); ata_scsi_set_sense(qc->dev, cmd, sense_key, asc, ascq); } else { - /* - * ATA PASS-THROUGH INFORMATION AVAILABLE - * Always in descriptor format sense. - */ - scsi_build_sense(cmd, 1, RECOVERED_ERROR, 0, 0x1D); + /* ATA PASS-THROUGH INFORMATION AVAILABLE */ + ata_scsi_set_sense(qc->dev, cmd, RECOVERED_ERROR, 0, 0x1D); } }
linux-stable-mirror@lists.linaro.org