From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796379745; b=P81wgxEZbNvV3ZXgU1p2LHmQAUugKhGxsMgq68RrkHPGnuyNAr8S8YdQ8Fe3wzzTWsrB mxxkDmp0Ja5LPJ37Y8XPm1niG1nN0w1veK1qtnWW3MuWnVtYoF6n0qsJSsLT6iEzMLxOo tnIc4AGLiDiBbYbb4Sy0soRi+EopMNa0KuxZ6g4A/W+dlA7QvS/Y/1Qo/UJEBfwjcYRrd IDA4aHMaNM7oXVL9ypA+rvFAaSEnISmtmMJPtyWSKFaU5FN3pu1ZVIgnez+NDO7wsz+9a KU07ed/zkmYhtlWjiuHjjP4Up39mb4as3s9u7Wu+eO4yaOVI6Beg57eDdRaw4BIqbTw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796379745; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=wMotRcZrrOWqU/vSOJ1ERrBvzqZZbZGeDNOYlDGMNt0=; b=ms+u+tVpkf9BDLloeUTzH0Sk1PVQqgQYI9oT1Dd7Ex2LrD0viWRiqCtR7Yus+lJFnwz4 SnFthi+t6G/VqFdc46x422OiF/Zq6LVlIE4NbIh/q7DIpVGo3MIpfKUWUbqwyNhOB7ABD 3VSe8HMdD2T0m8mFMcV1vZS6t3aSQm6EAD2kbpvlcxABd44Fe6/2FC3ewiCTPSlzPl4se Yt0AGR2kLqkG0phKO3GT+4a+3adzXh09y4GanGSLKYYrogOJfbqmXGRwdGa/Cd7xltto7 n3WTkK7ynd1rKnXtYuuQRerEjLZuSTLUeEm1QOT0AtcDQVXP29jR5qhvdq8sXD/5u2g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=rKvwZu5G; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BFF9606A332; Fri, 4 Dec 2026 10:22:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=rKvwZu5G Received: by smtp.kernel.org (Postfix) with ESMTPSA id B55921F000C2; Fri, 4 Dec 2026 10:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796379745; bh=wMotRcZrrOWqU/vSOJ1ERrBvzqZZbZGeDNOYlDGMNt0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rKvwZu5GqSA+a2hoQn5wV4HbYOZYGN1TDfz4RY+UMYj1zZVbwJWyjCqN2M/hW7iNC 2GTbRaf7ySMj3arh7ii9cReR4/EoJueqyvjB9K2Rcak4gfJHWAG3f+sGUXfRiS4B+T t8DXSAdKb7OEDiTt03CBKzdRu6Tzbp8FJ9ViRfx4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Imre Kaloz , "Martin K. Petersen (Oracle)" , Sasha Levin Subject: [PATCH 6.6 0044/1167] scsi: aic7xxx: Fix REQUEST SENSE allocation length on big-endian hosts Date: Fri, 4 Dec 2026 18:51:11 +0900 Message-ID: <20261204100703.208654932@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Imre Kaloz [ Upstream commit 9a2690eb4bbea8d7fbc3dfe478fca75fe956abb4 ] The REQUEST SENSE length was taken from sg->len after the AHC_DMA_LAST_SEG flag was or-ed in and the value converted to little-endian, so the 8-bit field is 0x80 on big-endian hosts and the target is asked for 128 bytes into a 32-byte buffer. Use the buffer size, as aic79xx does. On an SGI O2 with a Fujitsu MAX3147NC, the sense data of its CHECK CONDITIONs during probe was lost. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Imre Kaloz Link: https://patch.msgid.link/20261013094253.2956-1-kaloz@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin --- drivers/scsi/aic7xxx/aic7xxx_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c index d747d0b72a13a..989e8c9bda4ac 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_core.c +++ b/drivers/scsi/aic7xxx/aic7xxx_core.c @@ -1097,7 +1097,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) sc->byte2 = SCB_GET_LUN(scb) << 5; sc->unused[0] = 0; sc->unused[1] = 0; - sc->length = sg->len; + sc->length = ahc_get_sense_bufsize(ahc, scb); sc->control = 0; /* -- 2.53.0