From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 017B75335BB; Wed, 30 Sep 2026 17:40:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790790015; cv=none; b=LtNnsM7E/3+6pgzVENuPufzNOq/06HrZH3fc5novw29fdBOFHFFAjklqNCxr95e9LHN0QMgSTbU4sfJ9LIr9m5UDQCXv5PKogPqQUtL/b169q91FuFgG+znIpE26Mo3j3S1KlQfns0KxpPpKwE6vw4vIW8/joKzw/xq6g+eM61g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790790015; c=relaxed/simple; bh=1gbl+/c7tJsKmf8Ewg1gn+IAHAwHBYl0ulMPExKGq70=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Tg4TL+RZ43YM5IYcNPQj8rieK9twHd9up09MMwIGkxFkF5gzq/qHc/bvlcLAwqqxY/VFkzYInRuRmxr1DN1y3wKYooGeWwxqzW87IQUMMrChva1dwp6h7OpoTf63beFjl5m6VtBczCBp0G3O9EWj77IKzio62cl2CanJnZj0fwA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QAoq7LAm; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="QAoq7LAm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 158541F000FF; Wed, 30 Sep 2026 17:40:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790790013; bh=VeiaFBBejXmL9Mq7RIp/ssD5kBm+j/3oeHFNSl9f3uI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QAoq7LAmASUbOPM0bpJyYQWIsdTgUzoPjC/en6sWUSPBQkNvoGdin0VJ46q6zZnYd w28oqC3xQ4azKTg0b0Pw9U06p2LQAhXL5J+eSJ658lu0R0eunM1dlJ+BX21AKGFC2F h344pnZWgaqy3YGJRTlYtB3GiUzitMALoq6YVzCw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sashiko , Nilesh Javali , "Martin K. Petersen (Oracle)" , Sasha Levin Subject: [PATCH 6.12 678/877] scsi: qla2xxx: Use memset_io() to clear QLAFX00 request ring slot Date: Wed, 30 Sep 2026 17:26:29 +0200 Message-ID: <20260930152429.305015193@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152414.738996857@linuxfoundation.org> References: <20260930152414.738996857@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nilesh Javali [ Upstream commit 626e44f3d8a924a97a3848a9fd45833947e081e9 ] For QLAFX00 the request ring is ioremapped device I/O memory (ha->iobase + req_que_off), not DMA-coherent RAM, which is why the rest of the FX00 path accesses it through memcpy_toio() and the wrt_reg_* helpers. __qla2x00_alloc_iocbs() however zeroed the producer slot with a plain memset(). On architectures such as ARM64 a regular memset() may emit unaligned or block-zeroing instructions (e.g. DC ZVA) that are invalid on Device memory, leading to a synchronous external abort. Use memset_io() to clear the slot for QLAFX00, matching the I/O accessors used elsewhere on this ring. Other adapters keep the plain memset() on their DMA-coherent rings. The zero-fill is retained for FX00 because its IOCB builders (e.g. qlafx00_fxdisc_iocb()) copy only part of the entry and rely on the unused tail being pre-zeroed. Fixes: 8ae6d9c7eb10 ("[SCSI] qla2xxx: Enhancements to support ISPFx00.") Cc: stable@vger.kernel.org Reported-by: Sashiko Signed-off-by: Nilesh Javali Link: https://patch.msgid.link/20260730155838.2119230-12-njavali@marvell.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_iocb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -2351,11 +2351,13 @@ __qla2x00_alloc_iocbs(struct qla_qpair * */ req->cnt -= req_cnt; pkt = qla_req_ring_slot(ha, req); - memset(pkt, 0, qla_req_entry_size(ha)); if (IS_QLAFX00(ha)) { + memset_io((void __iomem __force *)pkt, 0, + qla_req_entry_size(ha)); wrt_reg_byte((u8 __force __iomem *)&pkt->entry_count, req_cnt); wrt_reg_dword((__le32 __force __iomem *)&pkt->handle, handle); } else { + memset(pkt, 0, qla_req_entry_size(ha)); pkt->entry_count = req_cnt; pkt->handle = handle; }