Skip to contentSkip to conversation

FAILED: patch "[PATCH] ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no" failed to apply to 4.19-stable tree

PATCH [email protected] 1 participant 1 message Jul 29, 2024

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.19-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 <[email protected]>.

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-4.19.y
git checkout FETCH_HEAD
git cherry-pick -x 28ab9769117ca944cb6eb537af5599aa436287a4
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024072908-kissing-cornbread-2dc7@gregkh' --subject-prefix 'PATCH 4.19.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") 7af29d455362 ("scsi: lpfc: Fix-up around 120 documentation issues")
372c187b8a70 ("scsi: lpfc: Add an internal trace log buffer")
317aeb83c92b ("scsi: lpfc: Add blk_io_poll support for latency improvment") f0020e428af7 ("scsi: lpfc: Add support to display if adapter dumps are available") 86ee57a97a17 ("scsi: lpfc: Fix kdump hang on PPC")
818dbde78e0f ("Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 28ab9769117ca944cb6eb537af5599aa436287a4 Mon Sep 17 00:00:00 2001
From: Igor Pylypiv <[email protected]>
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.

drivers/ata/libata-scsi.c +2 -5
index a9d2a1cf4c3d..fdc2a3b59fc1 100644
@@ -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);
 	}
 }