Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp915509pxb; Wed, 3 Mar 2021 20:55:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5LWUhfNjJGgybf57XoBhNDmoPnrwybPmPFoEwnLtDCwa3kU93ks5CVVNW4iq/y3s44M+C X-Received: by 2002:a05:6402:124a:: with SMTP id l10mr2441466edw.122.1614833739200; Wed, 03 Mar 2021 20:55:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614833739; cv=none; d=google.com; s=arc-20160816; b=QmpPJ+HhC6hoShKXe0rit7lnePu2nCiY43JjBo9RJvRJTaJxi6nq0PC7a13jnRG5Pw mzs2H/eUL7gI+WtXiw6RB/iMxUWtcRtliPP2gL88XKMG20hL+rUM6GR0CgM07jFGFte0 xqZAJuANmyFpvccOBkky8o/Xhubp1gHcWdjpIe9vtpqZV1sqNFSN5LmtA7BDaCiSOa3K Q6ewmXiSOZmRAKtrCow39hgP+g2kT9iyINaYuFQSPYk5t5wsKbP2jVhLYrSXMTCTKlOX X9gu9wHR0zhcQrfWYL0Nf7BxizF5qne1/2/6JERd1AUILjyZEsPqq7b++TIYwzPkO/u8 SWyA== 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=Fy/L/TLpvsOHWeeVy/5Ag3M3voLBfERK1SaiqtqSMiU=; b=KTx2/1/y5oDWRclb2RH0ixYfQ273Vm3Jn38GJSOFDniVkO52bNWBlbCRKa+dHoNkjY JsB3IZH7ieaCedL3GUmaZhamLSwBhmpWBRMvMaVmVmhxwnNPbvYGnHney0sM1gl0jIca ZDWVU8sHlKzKdvLSdwss2bnTUltZ6oUMY0cJsIHrQq2czajw7DWTXEvXB3jbqf/VITzd DbFNpkXx00gVAzC87J3E0eUfyUvZShSgYMLWpYr9G5VbvlPYR7rTxytuBIEXZV6dd0w4 5utzyblqsh37slzbYTUNhLDo8KH2YpNu+8vQEzSGwTkvZK2F3J9ye8PrmgegjqAm7TQU e+ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vVshniCl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j21si17822577ejn.713.2021.03.03.20.55.17; Wed, 03 Mar 2021 20:55:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vVshniCl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1442571AbhCBCOX (ORCPT + 99 others); Mon, 1 Mar 2021 21:14:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:53006 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240808AbhCATlV (ORCPT ); Mon, 1 Mar 2021 14:41:21 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9F0B76514A; Mon, 1 Mar 2021 17:04:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614618290; bh=wXoBJGIedjU+LYSfFDiuM6W1hdQiuqWvxje76qfCJ4k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vVshniClEa2qVMWHcimKwEqc2uMs+MQ0wC5ioaF8fON5wHAYkPgVGRCEwN+iPZohv qdckkiXRvD7B++pLZK7MApwX7vS+OblD8oM58CgavegTFCQj8X7K5mulfAzHBCIxtO 9yM4Haefh4M7R6/BqHSFSi040vroKkYfmXMQlkos= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Himanshu Madhani , Quinn Tran , Nilesh Javali , "Martin K. Petersen" Subject: [PATCH 5.10 006/663] scsi: qla2xxx: Fix mailbox Ch erroneous error Date: Mon, 1 Mar 2021 17:04:14 +0100 Message-Id: <20210301161142.095904786@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Quinn Tran commit 044c218b04503858ca4e17f61899c8baa0ae9ba1 upstream. Mailbox Ch/dump ram extend expects mb register 10 to be set. If not set/clear, firmware can pick up garbage from previous invocation of this mailbox. Example: mctp dump can set mb10. On subsequent flash read which use mailbox cmd Ch, mb10 can retain previous value. Link: https://lore.kernel.org/r/20210111093134.1206-6-njavali@marvell.com Cc: stable@vger.kernel.org Reviewed-by: Himanshu Madhani 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_dbg.c | 1 + drivers/scsi/qla2xxx/qla_mbx.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c @@ -202,6 +202,7 @@ qla24xx_dump_ram(struct qla_hw_data *ha, wrt_reg_word(®->mailbox0, MBC_DUMP_RISC_RAM_EXTENDED); wrt_reg_word(®->mailbox1, LSW(addr)); wrt_reg_word(®->mailbox8, MSW(addr)); + wrt_reg_word(®->mailbox10, 0); wrt_reg_word(®->mailbox2, MSW(LSD(dump_dma))); wrt_reg_word(®->mailbox3, LSW(LSD(dump_dma))); --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -4277,7 +4277,8 @@ qla2x00_dump_ram(scsi_qla_host_t *vha, d if (MSW(addr) || IS_FWI2_CAPABLE(vha->hw)) { mcp->mb[0] = MBC_DUMP_RISC_RAM_EXTENDED; mcp->mb[8] = MSW(addr); - mcp->out_mb = MBX_8|MBX_0; + mcp->mb[10] = 0; + mcp->out_mb = MBX_10|MBX_8|MBX_0; } else { mcp->mb[0] = MBC_DUMP_RISC_RAM; mcp->out_mb = MBX_0;