Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1013571pxb; Thu, 9 Sep 2021 18:01:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXEegsrEf7GU4lmJ8z3P1gOQO70HdXCD0JYnmqp4rso0VBZLinb9xtv1ZEQolRSlYdemrx X-Received: by 2002:a17:906:318b:: with SMTP id 11mr6674820ejy.493.1631235664408; Thu, 09 Sep 2021 18:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631235664; cv=none; d=google.com; s=arc-20160816; b=NoydWWvW2BpernaXfFwJcef9ciGUSxBeCpHS3M0PWxplV3SroNPuBhn9+/KAPVcVlP sgmcO87nymtQG0SmVsZjoHIYF+GS1WAMkIXSHTGHNLZkId0rSAQZJzZZVhq8jgwS2/+q cvX4ZpgqC0TEOyxAgxz1itDTFRu4hJgGX+sx6LJaP4PILmgPI/1O3Z01SO17VOdXVrVL U5O3AmZ6HKeeEtkQ8mPdhSygkHcLOCInArp9y6KBi8oJ1guhxjY2FGW5RR64Vk7mfRjc vIjs7zaJc2fsB8l6MKvCroGnISihQaSgdOIYLGpYh57S/gQQrWctqPXh2cZeElDUK18U gskw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gRE8lKvjrvCwkkwz0U/7824YVYsMp9UJ5mMCZ3BKr90=; b=oW//cRiKTtFc1HMPO2JWt1Qnj1XdkefNszIUqi+kDpczDFNwhl8SRPvEGEFep3NijT 5Fl/KmVFAEq2vTQ9PVyfBYKbUfRX6sJ2ozAq+XRJk2KPaA9mUwJ6ahpjwf6I2DhCqZ/G yYvTKo/HrcgD+CazFkfefEez4arE8walrhFWirsUi6xH6ZuGHdNASYuj+jUaXw12dt5T GvMNwyjp+PfbECaGtD/uuf77eaEYLYl3snUCr9Wo97ZDXPtvffKKl6QYOTlyaNYd9/9y 3ObMw5zBStxcUVpp4qiDqX+JIiA3HRhs0KZPyutNh8wtPj+E0VBN+bgLu7jAxMF6mHnq pqUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a838hDHx; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i25si4122071ejd.625.2021.09.09.18.00.39; Thu, 09 Sep 2021 18:01:04 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=a838hDHx; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244226AbhIJA7V (ORCPT + 99 others); Thu, 9 Sep 2021 20:59:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:48576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234205AbhIJAXC (ORCPT ); Thu, 9 Sep 2021 20:23:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1E11B604DC; Fri, 10 Sep 2021 00:21:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233311; bh=dUIRa5DBhjsGy5Ucna1pQyzRuHBitYblONlWaX1sxmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a838hDHxOuso4vFU4X0OPmwrgzmdRt/bo4oll1naNxFCcDeaK89syoigvn6tsEWRY 7LhR12dnmCd9eFkKNcC2DV17PlAsf32QMlaWq9v/NA4MTMm7dKGw6llk4qzpEqyxqQ 4fYwNa5l98jgsq2Gp8Ijku5H+x1OELUTyKhF5DItzu0ogekYwS6DNVRJgVa+RJ2ibg ZbTE+W+D0ONS/f4XLflA017SFJ5h7Qs7MzXsnIiioF5ResteH3vcTU8n2pfEIpq8EE hQIJJmsa9Fh08K1dQVKiA4rB/kwVabheOz3GBdkj8adzPw/xk4UAMq6T5EJFfXu37r uS6aWZXvms+Vw== 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.4 06/37] scsi: lpfc: Fix cq_id truncation in rq create Date: Thu, 9 Sep 2021 20:21:11 -0400 Message-Id: <20210910002143.175731-6-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002143.175731-1-sashal@kernel.org> References: <20210910002143.175731-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 b8a772f80d6c..b4bb82308d7b 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h @@ -1548,7 +1548,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