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 94920C433EF for ; Fri, 10 Sep 2021 01:02:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79B2F610C9 for ; Fri, 10 Sep 2021 01:02:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244479AbhIJBDv (ORCPT ); Thu, 9 Sep 2021 21:03:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:49594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234801AbhIJAYY (ORCPT ); Thu, 9 Sep 2021 20:24:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CB4E6611BF; Fri, 10 Sep 2021 00:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233394; bh=OBYyVxljuh1485Y61d5Ahsr0FpEmvyPJJxC3ymkQJZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VDeigyA9hMojcGk4uY4jfege5vzrVj6lEjaSS5pkPwzA9J5eUFqhSDj4UxtzQDihL VHamdXUPuS7yqE6Y07hOaSltUgkDTDogH2tHmHSMeXUl1MXjeAIKJiwV2gofUfvp5P Nt5edXqV0VFl6FU6hxCWyxS1cIbONMbMlusSKePPNBkHn1L3+3z3Br1jp3KAPnLWaW BOqS1ItidBnD0/xlWGWfo5AplKR+qk/y/JhqdSsqwFc09VIZKTVsqOqrXrgZog/OvM e3lHcx1sRE234l1ofZSSFuyEo/Bv3r2MQDALcX10/Dpc3/kjOCesxvJcRvXW2aLoCE vx+Pna7LsiUeg== 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 4.14 03/19] scsi: lpfc: Fix cq_id truncation in rq create Date: Thu, 9 Sep 2021 20:22:53 -0400 Message-Id: <20210910002309.176412-3-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002309.176412-1-sashal@kernel.org> References: <20210910002309.176412-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: linux-kernel@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 f44cdc0153a5..9ea0fffe61a0 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h @@ -1401,7 +1401,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