From patchwork Tue Dec 17 22:06:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Madhani X-Patchwork-Id: 11298811 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3FC3A14D5 for ; Tue, 17 Dec 2019 22:09:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D15F20716 for ; Tue, 17 Dec 2019 22:09:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="IiG3e0y8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726551AbfLQWJL (ORCPT ); Tue, 17 Dec 2019 17:09:11 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:12592 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726536AbfLQWJK (ORCPT ); Tue, 17 Dec 2019 17:09:10 -0500 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBHM5eEn030252; Tue, 17 Dec 2019 14:07:09 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=q04XNAAOYW3TvWkvtWUTQtzDzOYd9j4ICzIvRpM/0no=; b=IiG3e0y8nEAFxGJhI4Wu8jotOseTS7wN9o0+G4Gl08oRmWIIkhafX9qkzj0W/OvHxtQY gRK2VwxzeUAkaYz5dpYOSEOUxPbsB7Skgjjhp3oz2eFUlxqFttc2G41jj2OiakMrujT5 smT1T6yHo3FymyRGJFOoPsTWFSVIPdcw43X1ayGH1XySAsZ21W08GebkX3H+/lyPQqTu yFEbeNP6Pig9Y44nC3bZIRqcXkcBoXO6XOoDbFFXJnbj/hQEK7i3e6jlYqa4yVayNM5u CL0fGGt9zsta8pSqJIDjaTGMXkXNLnvs7WhnW89T7V+D0maLPyCItlX7sNIa8NDlgs1r kA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2wxn0wm22u-8 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 17 Dec 2019 14:07:09 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 17 Dec 2019 14:06:58 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 17 Dec 2019 14:06:57 -0800 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 3BD213F703F; Tue, 17 Dec 2019 14:06:58 -0800 (PST) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id xBHM6wqD028179; Tue, 17 Dec 2019 14:06:58 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id xBHM6wZu028178; Tue, 17 Dec 2019 14:06:58 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH 13/14] qla2xxx: Fix mtcp dump collection failure Date: Tue, 17 Dec 2019 14:06:16 -0800 Message-ID: <20191217220617.28084-14-hmadhani@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20191217220617.28084-1-hmadhani@marvell.com> References: <20191217220617.28084-1-hmadhani@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-17_04:2019-12-17,2019-12-17 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran MTCP dump failed due to MB Reg 10 was picking garbage data from stack memory. Fixes: 81178772b636a ("[SCSI] qla2xxx: Implemetation of mctp.") Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_mbx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index b7c1108c48e2..9e09964f5c0e 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -6152,9 +6152,8 @@ qla2x00_dump_mctp_data(scsi_qla_host_t *vha, dma_addr_t req_dma, uint32_t addr, mcp->mb[7] = LSW(MSD(req_dma)); mcp->mb[8] = MSW(addr); /* Setting RAM ID to valid */ - mcp->mb[10] |= BIT_7; /* For MCTP RAM ID is 0x40 */ - mcp->mb[10] |= 0x40; + mcp->mb[10] = BIT_7 | 0x40; mcp->out_mb |= MBX_10|MBX_8|MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2|MBX_1| MBX_0;