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 X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D931C43217 for ; Fri, 10 Sep 2021 00:44:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 377B96115A for ; Fri, 10 Sep 2021 00:44:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229456AbhIJApw (ORCPT ); Thu, 9 Sep 2021 20:45:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:47584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233652AbhIJAVt (ORCPT ); Thu, 9 Sep 2021 20:21:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3AE3F611C1; Fri, 10 Sep 2021 00:20:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233239; bh=7jxqIkAz0ZSlWHFH7T+QNT6tIP+640ZtnhB3TOBEp9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C+qnLrvE1eixNmWIPCG9RgPFncOAY4KRTkm3ws/xkRqt1G/MFYSEaQpyL2flTCX2E IK258b/edyjyh9P6P4Bl626URZqYDg8n0n2LmKzY1Kk1dz1SKuRBdgj8wZNTaTE3ti prXki/WmZBkgRga7uo2OALpehLzfBfslqTnU9DCchQ3HTSHtT/ET9uK9Jk4EwMZSXR 40/BmnoBs2rztuHXHka8Y2KjavYsEr7618AV3tbcG274F+tcOZMXv/6YDjLuqttdtc 5UK9TlRq8eECIsnSmN9ksxaEXqHClcgiMaXhpZ8ECUgHEGIT7HtJM+iOx+KPQMT7V1 V8/T/XX3PliNg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: James Smart , Justin Tee , "Martin K . Petersen" , Sasha Levin , linux-scsi@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 07/53] scsi: lpfc: Fix cq_id truncation in rq create Date: Thu, 9 Sep 2021 20:19:42 -0400 Message-Id: <20210910002028.175174-7-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002028.175174-1-sashal@kernel.org> References: <20210910002028.175174-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: James Smart [ Upstream commit df3d78c3eb4eba13b3ef9740a8c664508ee644ae ] On the newer hardware, CQ_ID values can be larger than seen on previous generations. This exposed an issue in the driver where its definition of cq_id in the RQ Create mailbox cmd was too small, thus the cq_id was truncated, causing the command to fail. Revise the RQ_CREATE CQ_ID field to its proper size (16 bits). Link: https://lore.kernel.org/r/20210722221721.74388-3-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/lpfc/lpfc_hw4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index 47e832b7f2c2..5197111c04b5 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h @@ -1552,7 +1552,7 @@ struct rq_context { #define lpfc_rq_context_hdr_size_WORD word1 uint32_t word2; #define lpfc_rq_context_cq_id_SHIFT 16 -#define lpfc_rq_context_cq_id_MASK 0x000003FF +#define lpfc_rq_context_cq_id_MASK 0x0000FFFF #define lpfc_rq_context_cq_id_WORD word2 #define lpfc_rq_context_buf_size_SHIFT 0 #define lpfc_rq_context_buf_size_MASK 0x0000FFFF -- 2.30.2