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 41F9DC4167B for ; Fri, 10 Sep 2021 01:05:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3617E61216 for ; Fri, 10 Sep 2021 01:05:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344232AbhIJBF7 (ORCPT ); Thu, 9 Sep 2021 21:05:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:50208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234302AbhIJAZP (ORCPT ); Thu, 9 Sep 2021 20:25:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DE69E60FC0; Fri, 10 Sep 2021 00:24:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233445; bh=nH4sHP+304l9G2n3ttkn/B9XbPM308IfJGptkYB5ogA=; h=From:To:Cc:Subject:Date:From; b=tiJEXwk21DF698ZIHY1HGJUv5MjIY6OHtzyG4ouHL50GRrfFCu40jGbmYRCwnF/oF oY0KjCKIeVsH4Y1V8pnwV+kd3GgZgwOYGhu/D7TY781VyX3pau/AnB/eXx9tSEb7vT ntlOBdDbJMMSPrZv4OxdMyiOIbNczukpCUEPNcBwAqmdJ+2vh4liBRu0CV+CwZi8sh smcgJVKIPx6e62iX/lqOEPygoVi8JkAcFu0f2W4r5USYODEcqc+aV7cvB7T64hDAR/ NOOjEZO6N0d0rv1ZB/pWSsd75qwNoTfWuvvgA2cRqG+RYdB5t0VS1RVB5XNlhRDUir 2piNVq64NTJ/A== 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.4 01/14] scsi: lpfc: Fix cq_id truncation in rq create Date: Thu, 9 Sep 2021 20:23:50 -0400 Message-Id: <20210910002403.176887-1-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 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 507869bc0673..e7ad2ef86514 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h @@ -1258,7 +1258,7 @@ struct rq_context { uint32_t reserved1; 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