Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1861825rwb; Fri, 19 Aug 2022 10:36:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR6hgeLZZ9WqP0f9uM4rHiGCAv74wJgCqLvI8VerKJ37YOqwQZa5Smjy/rQAmKsuJZErXjuZ X-Received: by 2002:a17:902:9b85:b0:16e:cc02:b9b2 with SMTP id y5-20020a1709029b8500b0016ecc02b9b2mr8397456plp.74.1660930599256; Fri, 19 Aug 2022 10:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930599; cv=none; d=google.com; s=arc-20160816; b=qxuKaXtHlKvzKug/J3918Kqi2MWhOiOHou3mr7Vra/1EOSJEE5BZdNDHu6T32Z0h50 p8pZd4hScSnxwlW+4FbNVCf+RGTobrA9yVujLHkcd0SPb+lGiqVADHMbgnXjbRCTE5LN 2zLj5MM/Y8L7P6yqEJWpJSCUf2zoRfzE2XXU2lJwAL8zNQgZ6P5TXmTwOTT4BicQlQOH SkgpThqHB12D2mHe7Vv/DoZr2eBPmp26OWs8L2oQCsM+Hfc7vCo9YNyqGDj8oKvwkRb9 8UKvmjUx5pm6TXr3EUauc7n/lSuoZjWqElbDjPVX+S2BJuhsttabbnWhJ06/edDQuwbw A7Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tj4+esSkbslIqvrCS59v1zWuHgKxMJc3IZVXubT5fbI=; b=AWYOYZuvZdD2ncPUjs+b2rSYrk30QFEjQpGN4PyWui5KfemsoY/+ekDCF+Zd8FKHCt GaoIQJ6NkgJQbDYGt3oKbrCrMDJwHotNAquF6mQ3QGTJnGPUgIDrC276jBsYs8vVlSJr mp7+IPhNmrJZNOSVzOOLEOjjhZX1k9kKHHBWTw3nMUEj5bRoqDLmGsA9r1kb3Z5bg/hU bId/JA11/ZNekhERkfwWWZGcmG4qYbIeJKKXA418x1KldHjBPN/XzuIEKh7NfevdiGbl 9kXsTLhtYOkr5qavpuqznhbeNeZrvzTJfQBOl+h1jlLGWCJRkzCfJElmLcnD5FDSrVJI UcYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wsUAoI3a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s25-20020a634519000000b00420188aa35fsi4454254pga.432.2022.08.19.10.36.28; Fri, 19 Aug 2022 10:36:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wsUAoI3a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350647AbiHSPzK (ORCPT + 99 others); Fri, 19 Aug 2022 11:55:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350466AbiHSPyO (ORCPT ); Fri, 19 Aug 2022 11:54:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5692B106FA2; Fri, 19 Aug 2022 08:49:38 -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 751D661562; Fri, 19 Aug 2022 15:49:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80864C433D6; Fri, 19 Aug 2022 15:49:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924175; bh=bL/GLTenQQxls5QrXxno6TI51AgnSrwsBJEaUBekFeQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wsUAoI3aA3NL+neASIHDwfhvU9Tx68nER+3VdBceZcyezU1W4i3f0ycrEBOWnt6/8 y7KGRasJnm29BqtNDYwkxMpOoczoDs6U3drNphPIe5LMDlthyvKdBgy55cSHHA9a82 Ho2lJ6Cx7JN0m32k1UOAD4/xaxkioSXWdI06/7UM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Himanshu Madhani , Bikash Hazarika , Quinn Tran , Nilesh Javali , "Martin K. Petersen" Subject: [PATCH 5.10 052/545] scsi: qla2xxx: Zero undefined mailbox IN registers Date: Fri, 19 Aug 2022 17:37:02 +0200 Message-Id: <20220819153831.563404167@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bikash Hazarika commit 6c96a3c7d49593ef15805f5e497601c87695abc9 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_mbx.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -233,6 +233,8 @@ qla2x00_mailbox_command(scsi_qla_host_t 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;