From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A424C19F2D for ; Sat, 13 Aug 2022 13:30:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239501AbiHMNaU (ORCPT ); Sat, 13 Aug 2022 09:30:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239462AbiHMNaS (ORCPT ); Sat, 13 Aug 2022 09:30:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4283C13A for ; Sat, 13 Aug 2022 06:30:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CF85760DDC for ; Sat, 13 Aug 2022 13:30:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D794FC433D6; Sat, 13 Aug 2022 13:30:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660397413; bh=f9LLHN1fvU/k/ciHFfBf2cflbHcgXczyzdAqdqw+zCA=; h=Subject:To:Cc:From:Date:From; b=W3jRsP/EengjD2y4Iq4vJIvXxyBclh2dI9Rr1eYL6Ri9AF2QdyXaLBS8BkLw4HKxl kub6OMLntkiIiuZv5llD7z1GGNPjm2s4KkLVE0FqFpf7lKZDpu53oC/I78W8RkpwaB He0hTglLW+cJxa+jRuwSSaWC2oy3cMy5+d694l+M= Subject: FAILED: patch "[PATCH] scsi: qla2xxx: Zero undefined mailbox IN registers" failed to apply to 5.4-stable tree To: bhazarika@marvell.com, himanshu.madhani@oracle.com, martin.petersen@oracle.com, njavali@marvell.com, qutran@marvell.com Cc: From: Date: Sat, 13 Aug 2022 15:30:10 +0200 Message-ID: <166039741081243@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.4-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 . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 6c96a3c7d49593ef15805f5e497601c87695abc9 Mon Sep 17 00:00:00 2001 From: Bikash Hazarika Date: Tue, 12 Jul 2022 22:20:38 -0700 Subject: [PATCH] scsi: qla2xxx: Zero undefined mailbox IN registers While requesting a new mailbox command, driver does not write any data to unused registers. Initialize the unused register value to zero while requesting a new mailbox command to prevent stale entry access by firmware. Link: https://lore.kernel.org/r/20220713052045.10683-4-njavali@marvell.com Cc: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Bikash Hazarika Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 643fa0052f5a..9a3f832c49ef 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -238,6 +238,8 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) ql_dbg(ql_dbg_mbx, vha, 0x1112, "mbox[%d]<-0x%04x\n", cnt, *iptr); wrt_reg_word(optr, *iptr); + } else { + wrt_reg_word(optr, 0); } mboxes >>= 1;