From patchwork Mon Jan 9 23:33:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 13094504 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42D70C54EBD for ; Mon, 9 Jan 2023 23:22:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237503AbjAIXWj (ORCPT ); Mon, 9 Jan 2023 18:22:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233514AbjAIXWi (ORCPT ); Mon, 9 Jan 2023 18:22:38 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53E6F38BC for ; Mon, 9 Jan 2023 15:22:37 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id c8-20020a17090a4d0800b00225c3614161so14477254pjg.5 for ; Mon, 09 Jan 2023 15:22:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=q3YGfo3Ab/nIS1rG0NDx9hRuWBzX86hr1xQC26F1FiM=; b=I/3v57X5t4isgv3GWZw+QZIdxUO0p9j5BDA9oR6FGTIJBSIvmpX5aMhJBjalWM3vwW n2UHUPKR+kX7cFrOpuCvXxfgGV6SGsA8XvB6PjRy0NsM6MtP0W117fD0C4iyZE5Rupe4 rs25vkxZy4qUP/xrk2xV/hj4gQEDk+EIQNg7fuEJ0gYIwoJJHflhBYZjIg5jHr3SwX5n VR/hi4A7NMDclnOKnGLk2iyx3nt1DN2QbsvrYHAXIs2LXdYHoO5aY1zostup2DvhKvo9 s5RRqtLlj3DxVOFg+KXUkNew9jcoWyaPkIWcGSRHpjdMf2hW49odC0Ge5T3hGAAq9Eqq bQJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q3YGfo3Ab/nIS1rG0NDx9hRuWBzX86hr1xQC26F1FiM=; b=PY/H4/saAaZeysH+KBXJxbUPQvHX2fESrD1v+2c7w4R6ejl1i6/wK/8RsM3zChyWi+ Ykzs9Y9lO/ES/5m3M9eV1xoYyXKarZ4KYf4NtFZcT2n7+so5008jbFAyk2MtRJ6QemXm UjUDAX06t6H0Bd/qrrdzl2fSGRKLTNhhG6OL15onUlzuUZddO2AZhBXNTwJyJhOIw95+ CbQcUaw5DBF7VuHMqDZpw8nR4/Xh7HncIEYM+tn9cwwmurTl03eYOi+clw+ejT+/JZMD C6y+2WoMSxrQCgncb3Eb8m7fmzTwdSTYFbQz3QWxiiUqs28O7Koe0UKD1uy5fLFHtJTy M8Jw== X-Gm-Message-State: AFqh2kptY6zFsuetZd9HW228FhNQhOwxSNAJDOTYk+jLhXWfi/G9CaVF JzDm1f+6xGbPytd8o7HKmBUlGMDX/3c= X-Google-Smtp-Source: AMrXdXvJCBIVcGIAkeJ9c3eJbKTnrPA0cTWm/t2vMNzhMcc1kitKVG98ZrWdWcH8pAiBUWt/ZMM3iA== X-Received: by 2002:a17:902:c643:b0:192:4c84:4508 with SMTP id s3-20020a170902c64300b001924c844508mr61442672pls.20.1673306556726; Mon, 09 Jan 2023 15:22:36 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d22-20020a170902aa9600b001871461688esm6628572plr.175.2023.01.09.15.22.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 15:22:36 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee , kernel test robot Subject: [PATCH 01/12] lpfc: Fix space indentation in lpfc_xcvr_data Date: Mon, 9 Jan 2023 15:33:06 -0800 Message-Id: <20230109233317.54737-2-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230109233317.54737-1-justintee8345@gmail.com> References: <20230109233317.54737-1-justintee8345@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The kernel test robot detected inconsistent indentations for an if statement block in the lpfc_xcvr_data_show routine. This patch reduces the extraneous tabs used for the if statement block in question. Reported-by: kernel test robot Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_attr.c | 46 +++++++++++++++-------------------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 77e1b2911cb4..9df90c0ab44d 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -1941,33 +1941,25 @@ lpfc_xcvr_data_show(struct device *dev, struct device_attribute *attr, &rdp_context->page_a0[SSF_TRANSCEIVER_CODE_B7]; len += scnprintf(buf + len, PAGE_SIZE - len, "Speeds: \t"); - if (*(uint8_t *)trasn_code_byte7 == 0) { - len += scnprintf(buf + len, PAGE_SIZE - len, - "Unknown\n"); - } else { - if (trasn_code_byte7->fc_sp_100MB) - len += scnprintf(buf + len, PAGE_SIZE - len, - "1 "); - if (trasn_code_byte7->fc_sp_200mb) - len += scnprintf(buf + len, PAGE_SIZE - len, - "2 "); - if (trasn_code_byte7->fc_sp_400MB) - len += scnprintf(buf + len, PAGE_SIZE - len, - "4 "); - if (trasn_code_byte7->fc_sp_800MB) - len += scnprintf(buf + len, PAGE_SIZE - len, - "8 "); - if (trasn_code_byte7->fc_sp_1600MB) - len += scnprintf(buf + len, PAGE_SIZE - len, - "16 "); - if (trasn_code_byte7->fc_sp_3200MB) - len += scnprintf(buf + len, PAGE_SIZE - len, - "32 "); - if (trasn_code_byte7->speed_chk_ecc) - len += scnprintf(buf + len, PAGE_SIZE - len, - "64 "); - len += scnprintf(buf + len, PAGE_SIZE - len, "GB\n"); - } + if (*(uint8_t *)trasn_code_byte7 == 0) { + len += scnprintf(buf + len, PAGE_SIZE - len, "Unknown\n"); + } else { + if (trasn_code_byte7->fc_sp_100MB) + len += scnprintf(buf + len, PAGE_SIZE - len, "1 "); + if (trasn_code_byte7->fc_sp_200mb) + len += scnprintf(buf + len, PAGE_SIZE - len, "2 "); + if (trasn_code_byte7->fc_sp_400MB) + len += scnprintf(buf + len, PAGE_SIZE - len, "4 "); + if (trasn_code_byte7->fc_sp_800MB) + len += scnprintf(buf + len, PAGE_SIZE - len, "8 "); + if (trasn_code_byte7->fc_sp_1600MB) + len += scnprintf(buf + len, PAGE_SIZE - len, "16 "); + if (trasn_code_byte7->fc_sp_3200MB) + len += scnprintf(buf + len, PAGE_SIZE - len, "32 "); + if (trasn_code_byte7->speed_chk_ecc) + len += scnprintf(buf + len, PAGE_SIZE - len, "64 "); + len += scnprintf(buf + len, PAGE_SIZE - len, "GB\n"); + } temperature = (rdp_context->page_a2[SFF_TEMPERATURE_B1] << 8 | rdp_context->page_a2[SFF_TEMPERATURE_B0]); vcc = (rdp_context->page_a2[SFF_VCC_B1] << 8 | From patchwork Mon Jan 9 23:33:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 13094505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C3D0C5479D for ; Mon, 9 Jan 2023 23:22:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237525AbjAIXWo (ORCPT ); Mon, 9 Jan 2023 18:22:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234906AbjAIXWn (ORCPT ); Mon, 9 Jan 2023 18:22:43 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E83705FFD for ; Mon, 9 Jan 2023 15:22:40 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id 17so11344398pll.0 for ; Mon, 09 Jan 2023 15:22:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9d5KbCTYqMB3xYbjOw0/jFF8F80T+AZKpqEy/1t0Ljs=; b=oIB1oU9Ok/rluVY6MMuiO4CtZBo5KxRWTRZ7pOxqar/fGaxw4l+TWhQg+Mdi0v1iZJ zjY6zCmbvBpgPKo1xu1xTiKiSKE8q723/2mzKi5QWyHt0Lb3XNnltdbel52eFISPEJDi pUxQuPa0w2nJrYOP0cJGgGYARQVNB2sS0CH7khZwP9XQwu9y5V+4YUJMNBw56qDvwTRm HA/esxGYWCC0Bb6aQFlZb1SElheMn4jm2cTe98vjRJ8rbfhsoGMqQy57iwRk9evxIu4V ebe/QNZSlCWZHo+UluXFqVBfO9lCWwagTyKYXSA37TFcrP6Nz8Fg9iSQ2XcSZRfyL3uu 4Zfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9d5KbCTYqMB3xYbjOw0/jFF8F80T+AZKpqEy/1t0Ljs=; b=6arQWvucbIWgXrBWmVBEADY0NA0tM7T+zV+2z0CumBORma027Pe4QYFUIEjomLJdLK K9Vngd9skvMVYFU2nwY46xSogWerQLXSm7zILOU1dIH+XqwwIuP2qy0w0Sl59ZbHcZtQ BxcCGw9AWgYRpJNwaViNGNtBB15oteNLGN0jEV6pmtO0QvbvsKyi4EjnvsYNg/fut0l0 uOhCIP4yulZjewImtYmXWb7+a4iEs8u4vnLkx8KgRoZrzyB7r5F5PlGAGgrXvAji9DSe 8IexkIxD9tzpB0+EJavbD0u80kDFYFdhebqAk9i5KdBF/V5zccOqgINDuY0F+GKh6fo3 NSbw== X-Gm-Message-State: AFqh2kr3RRYJ8/Td8UjvkKW/jopvjcSuu+nnBpD6RBwn1Od9uy4IbNaV zI/4W2Ab4ziS5Gz9aYLsaKz5FmmjS8k= X-Google-Smtp-Source: AMrXdXtHk8Z9fD+hGd8vdatgZhpfUBfBzE33ngHCcsFot6McpmIvZC4/4ulXEnqwpDIfvMDx3jYT2w== X-Received: by 2002:a17:902:edd1:b0:192:50fe:504a with SMTP id q17-20020a170902edd100b0019250fe504amr62192124plk.16.1673306560302; Mon, 09 Jan 2023 15:22:40 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d22-20020a170902aa9600b001871461688esm6628572plr.175.2023.01.09.15.22.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 15:22:40 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee , kernel test robot Subject: [PATCH 02/12] lpfc: Replace outdated strncpy with strscpy Date: Mon, 9 Jan 2023 15:33:07 -0800 Message-Id: <20230109233317.54737-3-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230109233317.54737-1-justintee8345@gmail.com> References: <20230109233317.54737-1-justintee8345@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The kernel test robot pointed out non-NULL terminated string possibilities when using strncpy in lpfc_xcvr_data_show routine. Although we manually set the NULL character after strncpy, strncpy usage is outdated. Replace all strncpy usages with the preferred strscpy API. Reported-by: kernel test robot Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_attr.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 9df90c0ab44d..c95401225057 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -1905,8 +1905,7 @@ lpfc_xcvr_data_show(struct device *dev, struct device_attribute *attr, goto out_free_rdp; } - strncpy(chbuf, &rdp_context->page_a0[SSF_VENDOR_NAME], 16); - chbuf[16] = 0; + strscpy(chbuf, &rdp_context->page_a0[SSF_VENDOR_NAME], 16); len = scnprintf(buf, PAGE_SIZE - len, "VendorName:\t%s\n", chbuf); len += scnprintf(buf + len, PAGE_SIZE - len, @@ -1914,17 +1913,13 @@ lpfc_xcvr_data_show(struct device *dev, struct device_attribute *attr, (uint8_t)rdp_context->page_a0[SSF_VENDOR_OUI], (uint8_t)rdp_context->page_a0[SSF_VENDOR_OUI + 1], (uint8_t)rdp_context->page_a0[SSF_VENDOR_OUI + 2]); - strncpy(chbuf, &rdp_context->page_a0[SSF_VENDOR_PN], 16); - chbuf[16] = 0; + strscpy(chbuf, &rdp_context->page_a0[SSF_VENDOR_PN], 16); len += scnprintf(buf + len, PAGE_SIZE - len, "VendorPN:\t%s\n", chbuf); - strncpy(chbuf, &rdp_context->page_a0[SSF_VENDOR_SN], 16); - chbuf[16] = 0; + strscpy(chbuf, &rdp_context->page_a0[SSF_VENDOR_SN], 16); len += scnprintf(buf + len, PAGE_SIZE - len, "VendorSN:\t%s\n", chbuf); - strncpy(chbuf, &rdp_context->page_a0[SSF_VENDOR_REV], 4); - chbuf[4] = 0; + strscpy(chbuf, &rdp_context->page_a0[SSF_VENDOR_REV], 4); len += scnprintf(buf + len, PAGE_SIZE - len, "VendorRev:\t%s\n", chbuf); - strncpy(chbuf, &rdp_context->page_a0[SSF_DATE_CODE], 8); - chbuf[8] = 0; + strscpy(chbuf, &rdp_context->page_a0[SSF_DATE_CODE], 8); len += scnprintf(buf + len, PAGE_SIZE - len, "DateCode:\t%s\n", chbuf); len += scnprintf(buf + len, PAGE_SIZE - len, "Identifier:\t%xh\n", (uint8_t)rdp_context->page_a0[SSF_IDENTIFIER]); From patchwork Mon Jan 9 23:33:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 13094506 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D339FC54EBE for ; Mon, 9 Jan 2023 23:22:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237647AbjAIXWp (ORCPT ); Mon, 9 Jan 2023 18:22:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237616AbjAIXWo (ORCPT ); Mon, 9 Jan 2023 18:22:44 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72F3E959C for ; Mon, 9 Jan 2023 15:22:43 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id v23so10427328pju.3 for ; Mon, 09 Jan 2023 15:22:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o7LlczTDnkakB3pGpUedpd+T6vtbUtrg+IgV8/eDmjY=; b=mkdOhJuVvIw/SuETm1m3RemGFCwvottlg3bF6g3dF/7T0WkdaCTO+1SfslE0p/Y7Lh UjLHHcn3stsFoxARCF06Y3tAZm9Er/iH3CvEt2g74DKyRLE08OiNnnjngEiqmquf/js4 XdSUzG8CfsrsaCigZiXSuIthsaZEhjaSD4ZF6SetOBwrZlnx50f6Od/xjRUvaGvo+sL7 CeAJzktPIfuHGHXK4cZ6/AgKQqk3Lf0TtFuS55E9BWvV3ZQE2Gaef2l0eS3a4IYQrFA2 Iq3/ZQ92J8BkO/nclJ5mjjOhTOOR1BokaNbz2on+q3tn4I8sizr2AGGeexeZn1i2+RjN NAgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o7LlczTDnkakB3pGpUedpd+T6vtbUtrg+IgV8/eDmjY=; b=e4Qy8Q1DZu5l+haU5UHx6UWWXkILP4Z6VhYtzyJQ0iX+P4YY3SPv+SkaRokvmhDbcy nEvwDOAK7VqtEtSf3eb/aZeBCal1cbp2fEqII8750ZoTBfl3sMT/4mbfRRqkA8AglDGE JmI6eqSVXcNGGOm2p6lEnS8mntE8XIThA2oqLsl/tX+5ZHRLkG+ymcwXBGIkp6WmDwA/ 8vaZDPH7rVj+af7nmMbbHkSju3emJ4b3BqhkD5eM44AK2nbhvR9C+h8WZyEGkKWBGTy3 X6M9a5ytjL9vwWUHDgXUVu7Ti7nqZ2HcSckas9JnnJ3sddMwNnengeBe4dFiecSQPUEA iLUA== X-Gm-Message-State: AFqh2konSZNnGkeNlRxBrXozFuwjand7ffs27FxBSkVo80wXf8NLVM14 YbqpkJBt2xrBCXcGbcWcRgfp2DA4uZY= X-Google-Smtp-Source: AMrXdXsr5Oh1n2fKYmGerCEljFc+FmqcJ6h1++Cw+WPyuFcsX7wFNikQC7aFNWcqR2Onytrg6dzkmA== X-Received: by 2002:a17:902:e5c5:b0:189:c57c:9a19 with SMTP id u5-20020a170902e5c500b00189c57c9a19mr90090502plf.58.1673306562726; Mon, 09 Jan 2023 15:22:42 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d22-20020a170902aa9600b001871461688esm6628572plr.175.2023.01.09.15.22.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 15:22:42 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 03/12] lpfc: Resolve miscellaneous variable set but not used compiler warnings Date: Mon, 9 Jan 2023 15:33:08 -0800 Message-Id: <20230109233317.54737-4-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230109233317.54737-1-justintee8345@gmail.com> References: <20230109233317.54737-1-justintee8345@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The local variables called curr_data are incremented, but not actually used for anything so they are removed. The return value of lpfc_sli4_poll_eq is not used anywhere and is not called outside of lpfc_sli.c. Thus, its declaration is removed from lpfc_crtn.h Also, lpfc_sli4_poll_eq's path argument is not used in the routine so it is removed along with corresponding macros. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc.h | 2 -- drivers/scsi/lpfc/lpfc_crtn.h | 1 - drivers/scsi/lpfc/lpfc_scsi.c | 6 ++-- drivers/scsi/lpfc/lpfc_sli.c | 62 ++++++++++++++++------------------- 4 files changed, 31 insertions(+), 40 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 9ad233b40a9e..1095595ca3a2 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -1592,8 +1592,6 @@ struct lpfc_hba { struct timer_list cpuhp_poll_timer; struct list_head poll_list; /* slowpath eq polling list */ #define LPFC_POLL_HB 1 /* slowpath heartbeat */ -#define LPFC_POLL_FASTPATH 0 /* called from fastpath */ -#define LPFC_POLL_SLOWPATH 1 /* called from slowpath */ char os_host_name[MAXHOSTNAMELEN]; diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index 8928f016d09e..6f63e0acf9dd 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h @@ -253,7 +253,6 @@ int lpfc_read_object(struct lpfc_hba *phba, char *s, uint32_t *datap, uint32_t len); void lpfc_sli4_cleanup_poll_list(struct lpfc_hba *phba); -int lpfc_sli4_poll_eq(struct lpfc_queue *q, uint8_t path); void lpfc_sli4_poll_hbtimer(struct timer_list *t); void lpfc_sli4_start_polling(struct lpfc_queue *q); void lpfc_sli4_stop_polling(struct lpfc_queue *q); diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 7a1563564df7..9b6580eb7ed6 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -1689,7 +1689,7 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, struct lpfc_pde6 *pde6 = NULL; struct lpfc_pde7 *pde7 = NULL; dma_addr_t dataphysaddr, protphysaddr; - unsigned short curr_data = 0, curr_prot = 0; + unsigned short curr_prot = 0; unsigned int split_offset; unsigned int protgroup_len, protgroup_offset = 0, protgroup_remainder; unsigned int protgrp_blks, protgrp_bytes; @@ -1858,7 +1858,6 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, bpl->tus.w = le32_to_cpu(bpl->tus.w); num_bde++; - curr_data++; if (split_offset) break; @@ -2119,7 +2118,7 @@ lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, struct scatterlist *sgpe = NULL; /* s/g prot entry */ struct sli4_sge_diseed *diseed = NULL; dma_addr_t dataphysaddr, protphysaddr; - unsigned short curr_data = 0, curr_prot = 0; + unsigned short curr_prot = 0; unsigned int split_offset; unsigned int protgroup_len, protgroup_offset = 0, protgroup_remainder; unsigned int protgrp_blks, protgrp_bytes; @@ -2364,7 +2363,6 @@ lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, dma_offset += dma_len; num_sge++; - curr_data++; if (split_offset) { sgl++; diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 182aaae60386..c21187c93a5f 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -11270,6 +11270,30 @@ lpfc_sli4_calc_ring(struct lpfc_hba *phba, struct lpfc_iocbq *piocb) } } +inline void lpfc_sli4_poll_eq(struct lpfc_queue *eq) +{ + struct lpfc_hba *phba = eq->phba; + + /* + * Unlocking an irq is one of the entry point to check + * for re-schedule, but we are good for io submission + * path as midlayer does a get_cpu to glue us in. Flush + * out the invalidate queue so we can see the updated + * value for flag. + */ + smp_rmb(); + + if (READ_ONCE(eq->mode) == LPFC_EQ_POLL) + /* We will not likely get the completion for the caller + * during this iteration but i guess that's fine. + * Future io's coming on this eq should be able to + * pick it up. As for the case of single io's, they + * will be handled through a sched from polling timer + * function which is currently triggered every 1msec. + */ + lpfc_sli4_process_eq(phba, eq, LPFC_QUEUE_NOARM); +} + /** * lpfc_sli_issue_iocb - Wrapper function for __lpfc_sli_issue_iocb * @phba: Pointer to HBA context object. @@ -11309,7 +11333,7 @@ lpfc_sli_issue_iocb(struct lpfc_hba *phba, uint32_t ring_number, rc = __lpfc_sli_issue_iocb(phba, ring_number, piocb, flag); spin_unlock_irqrestore(&pring->ring_lock, iflags); - lpfc_sli4_poll_eq(eq, LPFC_POLL_FASTPATH); + lpfc_sli4_poll_eq(eq); } else { /* For now, SLI2/3 will still use hbalock */ spin_lock_irqsave(&phba->hbalock, iflags); @@ -15625,12 +15649,11 @@ void lpfc_sli4_poll_hbtimer(struct timer_list *t) { struct lpfc_hba *phba = from_timer(phba, t, cpuhp_poll_timer); struct lpfc_queue *eq; - int i = 0; rcu_read_lock(); list_for_each_entry_rcu(eq, &phba->poll_list, _poll_list) - i += lpfc_sli4_poll_eq(eq, LPFC_POLL_SLOWPATH); + lpfc_sli4_poll_eq(eq); if (!list_empty(&phba->poll_list)) mod_timer(&phba->cpuhp_poll_timer, jiffies + msecs_to_jiffies(LPFC_POLL_HB)); @@ -15638,33 +15661,6 @@ void lpfc_sli4_poll_hbtimer(struct timer_list *t) rcu_read_unlock(); } -inline int lpfc_sli4_poll_eq(struct lpfc_queue *eq, uint8_t path) -{ - struct lpfc_hba *phba = eq->phba; - int i = 0; - - /* - * Unlocking an irq is one of the entry point to check - * for re-schedule, but we are good for io submission - * path as midlayer does a get_cpu to glue us in. Flush - * out the invalidate queue so we can see the updated - * value for flag. - */ - smp_rmb(); - - if (READ_ONCE(eq->mode) == LPFC_EQ_POLL) - /* We will not likely get the completion for the caller - * during this iteration but i guess that's fine. - * Future io's coming on this eq should be able to - * pick it up. As for the case of single io's, they - * will be handled through a sched from polling timer - * function which is currently triggered every 1msec. - */ - i = lpfc_sli4_process_eq(phba, eq, LPFC_QUEUE_NOARM); - - return i; -} - static inline void lpfc_sli4_add_to_poll_list(struct lpfc_queue *eq) { struct lpfc_hba *phba = eq->phba; @@ -21276,7 +21272,7 @@ lpfc_sli4_issue_wqe(struct lpfc_hba *phba, struct lpfc_sli4_hdw_queue *qp, lpfc_sli_ringtxcmpl_put(phba, pring, pwqe); spin_unlock_irqrestore(&pring->ring_lock, iflags); - lpfc_sli4_poll_eq(qp->hba_eq, LPFC_POLL_FASTPATH); + lpfc_sli4_poll_eq(qp->hba_eq); return 0; } @@ -21298,7 +21294,7 @@ lpfc_sli4_issue_wqe(struct lpfc_hba *phba, struct lpfc_sli4_hdw_queue *qp, lpfc_sli_ringtxcmpl_put(phba, pring, pwqe); spin_unlock_irqrestore(&pring->ring_lock, iflags); - lpfc_sli4_poll_eq(qp->hba_eq, LPFC_POLL_FASTPATH); + lpfc_sli4_poll_eq(qp->hba_eq); return 0; } @@ -21328,7 +21324,7 @@ lpfc_sli4_issue_wqe(struct lpfc_hba *phba, struct lpfc_sli4_hdw_queue *qp, lpfc_sli_ringtxcmpl_put(phba, pring, pwqe); spin_unlock_irqrestore(&pring->ring_lock, iflags); - lpfc_sli4_poll_eq(qp->hba_eq, LPFC_POLL_FASTPATH); + lpfc_sli4_poll_eq(qp->hba_eq); return 0; } return WQE_ERROR; From patchwork Mon Jan 9 23:33:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 13094507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D6CEC5479D for ; Mon, 9 Jan 2023 23:22:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237724AbjAIXWw (ORCPT ); Mon, 9 Jan 2023 18:22:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234906AbjAIXWp (ORCPT ); Mon, 9 Jan 2023 18:22:45 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1818738BC for ; Mon, 9 Jan 2023 15:22:45 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id h7-20020a17090aa88700b00225f3e4c992so14531528pjq.1 for ; Mon, 09 Jan 2023 15:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/uaJGJ1BZuv6e4vCgomB4MPdWevpdOOTroMzTdk8lkk=; b=Fty/lBOflVU1MVVUfgf8cJ1iWQhdP2M64L+mh4lSRXlZI6ARi0tOQB3GXFFKuOFJPu 5+wL4SIZyRdmxW/YwrbvG14WUbIZ6CqHDfZxFF8EaVBvtvunzCSVfnbkq9MMr8KnCG1k sCJX7Mv1mVBTNvglZBfwAXq51KMEGrvQ8+BiHscOMY+pLAcegKYxplZGFcwsAQiK72Ym yHrEK/+mIs4sDsmema6vOt26vhfMSfDAwH6kfPO07Ql1G0AILZ7bOSnNHWUEYA5rtg2T BWYDdXI3zI/VHM9vvJJa9UN5ihuQLc3qRzD/CtJujpwtjbclqOq2RA9NEmwE2p3oJLaK +M+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/uaJGJ1BZuv6e4vCgomB4MPdWevpdOOTroMzTdk8lkk=; b=xLosa2qKShBGwn73c6j3qI6dD43sCIM/cN7/EdcCQ+lp/i/Y3UTbeUTV6Ph1YD9OL8 VH4FWrjZMIyH/Em0PG+ZhFbzgt6BLyaf8Hxm3R3JOUyA5v8ewWXD8PfsDlty6N8Ypm6J zn1SXMO4QPjK1NdCY0Jojy+Z1pbs2GcdKJ44/vkNpWsLlzWZkD2gXr5zz4uhtvkHUFpA n9yrE+pfQxcPnqKUQD7JHOTB+F5M52oIevPHEFQ5xPmaczDgq86bwIBcijEa95mYGcqY W990osZnm2cXVLLsCQQdEzniJ2WLc+lorh8i5yETIr/pGAc5EKv16D1o2K7nwo5urrN6 OJFg== X-Gm-Message-State: AFqh2kr3YcOAatdLd0rSjsGHXA+pRJ+mflLRs3YdWuVqave081wdJ7km o+6cpWAOzO80vF9uPQAMSJ2Rv/1oyiQ= X-Google-Smtp-Source: AMrXdXttaY9ozzgAFkorgy7SRJGutfIjVs5NZ+iqDProZ/V6+rzzGYB+jesTjwJK8giZ/zQFRhGjuA== X-Received: by 2002:a17:902:6bcb:b0:192:eb8d:4d62 with SMTP id m11-20020a1709026bcb00b00192eb8d4d62mr18486108plt.13.1673306564504; Mon, 09 Jan 2023 15:22:44 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d22-20020a170902aa9600b001871461688esm6628572plr.175.2023.01.09.15.22.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 15:22:44 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 04/12] lpfc: Set max dma segment size to hba supported SGE length Date: Mon, 9 Jan 2023 15:33:09 -0800 Message-Id: <20230109233317.54737-5-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230109233317.54737-1-justintee8345@gmail.com> References: <20230109233317.54737-1-justintee8345@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org During I/O, the following warning message occasionally appears. DMA-API: lpfc 0000:04:00.0: mapping sg segment longer than device claims to support [len=131072] [max=65536] The hba is capable of supporting 131,072 bytes, so notify DMA layer via the dma_set_max_seg_size API during hba initialization. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_init.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 25ba20e42825..4d58373f6ab6 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -13917,6 +13917,13 @@ lpfc_get_sli4_parameters(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) if (sli4_params->sge_supp_len > LPFC_MAX_SGE_SIZE) sli4_params->sge_supp_len = LPFC_MAX_SGE_SIZE; + rc = dma_set_max_seg_size(&phba->pcidev->dev, sli4_params->sge_supp_len); + if (unlikely(rc)) { + lpfc_printf_log(phba, KERN_INFO, LOG_INIT, + "6400 Can't set dma maximum segment size\n"); + return rc; + } + /* * Check whether the adapter supports an embedded copy of the * FCP CMD IU within the WQE for FCP_Ixxx commands. In order From patchwork Mon Jan 9 23:33:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 13094508 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4107C54EBE for ; Mon, 9 Jan 2023 23:22:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237743AbjAIXWy (ORCPT ); Mon, 9 Jan 2023 18:22:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237616AbjAIXWv (ORCPT ); Mon, 9 Jan 2023 18:22:51 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CEDD959C for ; Mon, 9 Jan 2023 15:22:47 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id jl4so11288692plb.8 for ; Mon, 09 Jan 2023 15:22:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ir9HGZ45FJzt0JfYeTk3McJ+X2KaO54ZpeNTElTDStE=; b=oKLj8WKoCvLJ0Y+mWcyeGfwvr3lXIr3dcv3KW2NjBwWN6+O7MAc8L200WPbdpYCP1X 8N6nOwSANteq0xVV6uYwf5iJi/UCatoNk/4r31OpX1r6jaf2dXIr8EREr8u5KIMmDJi2 tJnF8BuAdeworZLeHfp8elobwRCKAN0PkRqkqclo7k6n03SgYQxR8qb1sh5AA5mdGOa2 V6BtJ0tKfg/1a8hue/ST6Cd++S0VjdFjNF+uZ8D+Paf/vCfN77tyAalY7FYNYMvKPurf gamTt74IMwmu4BN4zK8BXqHBuudynGS8Qt9IyEf0LQgF6fqdQUqCg5exmgEq1qeC65qV 4HlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ir9HGZ45FJzt0JfYeTk3McJ+X2KaO54ZpeNTElTDStE=; b=kAIgBdBQo/j8mPNrihb2Xw90yL053ckmUDS9PtXd0nAlGhI6thS4EFT7ahWz06cA4v p1ExdEVCze/0jDrLbw0P457sbW0QPm/Bha+hvN5k+fLHlEMZVIh9OanZ1MD48hbr1dds nN7rtNEESkcUoLd8mAtlliTYUpaevwD48k436KSeXq+X34pg62uFvJU1aNnzrFEqD1Jj YA3wHqrF8SusyjGUhGYkZog1BruJhXrKJ7IYYpl/lJrV7vGgtlVV3cKaylHD/0Nl4TYk tlSDMp0JFAyp1Y/lvbdNgUGqV14agwwqPEUpOdLZn2XsOYqsImALDE3Ku2dk822nH2Ov 3LlA== X-Gm-Message-State: AFqh2kp0OmFTCWcyV8HURJC3ddrxrNnr0Ium/z8SdqTmibYjMuyL7elw rGp3AH6JtMJOmazHS/GEyLWdteEsIt0= X-Google-Smtp-Source: AMrXdXsrqGevRoCXUPf5LTStJbPKSBfAkN1qAFYPNkvqF6FYaOUIy4GQPJjftOHIednitIvwlilTPg== X-Received: by 2002:a17:902:74c1:b0:193:2bc9:eb25 with SMTP id f1-20020a17090274c100b001932bc9eb25mr6146244plt.20.1673306566478; Mon, 09 Jan 2023 15:22:46 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d22-20020a170902aa9600b001871461688esm6628572plr.175.2023.01.09.15.22.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 15:22:46 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 05/12] lpfc: Remove redundant clean up code in disable_vport Date: Mon, 9 Jan 2023 15:33:10 -0800 Message-Id: <20230109233317.54737-6-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230109233317.54737-1-justintee8345@gmail.com> References: <20230109233317.54737-1-justintee8345@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The disable_vport path calls the discovery state machine on all ndlps, puts them into NPR state, and then calls lpfc_cleanup_rpis with the remove flag set. This unintentionally decrements an ndlp's kref twice and can result in premature release of an ndlp because lpfc_dev_loss_tmo_handler triggers clean up of the ndlp again later. Remove redundant code in disable_vport that sets all the ndlps to NPR, and change the call to cleanup_rpis to not remove the ndlps. lpfc_dev_loss_tmo_handler will handle final removal of the ndlps. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_vport.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index 4d171f5c213f..5aeda245369b 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c @@ -534,7 +534,7 @@ disable_vport(struct fc_vport *fc_vport) { struct lpfc_vport *vport = *(struct lpfc_vport **)fc_vport->dd_data; struct lpfc_hba *phba = vport->phba; - struct lpfc_nodelist *ndlp = NULL, *next_ndlp = NULL; + struct lpfc_nodelist *ndlp = NULL; struct Scsi_Host *shost = lpfc_shost_from_vport(vport); /* Can't disable during an outstanding delete. */ @@ -546,17 +546,7 @@ disable_vport(struct fc_vport *fc_vport) (void)lpfc_send_npiv_logo(vport, ndlp); lpfc_sli_host_down(vport); - - /* Mark all nodes for discovery so we can remove them by - * calling lpfc_cleanup_rpis(vport, 1) - */ - list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) { - if (ndlp->nlp_state == NLP_STE_UNUSED_NODE) - continue; - lpfc_disc_state_machine(vport, ndlp, NULL, - NLP_EVT_DEVICE_RECOVERY); - } - lpfc_cleanup_rpis(vport, 1); + lpfc_cleanup_rpis(vport, 0); lpfc_stop_vport_timers(vport); lpfc_unreg_all_rpis(vport); From patchwork Mon Jan 9 23:33:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 13094511 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51168C5479D for ; Mon, 9 Jan 2023 23:23:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237739AbjAIXW6 (ORCPT ); Mon, 9 Jan 2023 18:22:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234906AbjAIXWx (ORCPT ); Mon, 9 Jan 2023 18:22:53 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 038695591 for ; Mon, 9 Jan 2023 15:22:49 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id z9-20020a17090a468900b00226b6e7aeeaso11479270pjf.1 for ; Mon, 09 Jan 2023 15:22:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8uUq+HbvoXMZpOyoCQi3I8VvGWUAYK/4dmUAWPinMXY=; b=fJfBiFewz9Tydb5FY3MpwnyDfmVn5pZxIJSDOY809dI0wxKBEqCUrNQxt+cJHi+5Fk r7CyqMr5xKmdx+su8qfXo4ZeXjjINuCznlyTTUmgGWnuXVKp9b583wgJUZ6NyBZOnc1G 2GNEFqp8WitmAQ2AmyyLjfLzzarT5HX9IK5UhHYH5XtXmhEWGIE5gsE7yXcFlSeVHhyU noHOsyppUDIbVX1+2kZUYN/xEXgeC/c0tkPt3xgUjC2uScojXZMd5eafHN9iCixAvUIQ ZnwQ65fR+rt/8KA+zjUNO9O0jPxw7g6MG+3n/62ZgP4fxxglVVSdFIsg8fPku370eWpd iSig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8uUq+HbvoXMZpOyoCQi3I8VvGWUAYK/4dmUAWPinMXY=; b=MrywLvEkKZPphN20cLmCp+7W0OFQCDmUeGrgoJRKnMnVRVeiNMDFzEtVlIs67Wxv99 OIMCG6PdFzIU40iXmOpy9g8OSp2z8nUHq1q1Gg1EEN2Et2VTmQdj3flahsdwU8ha9iwN NixeiOgn6f0FdMbymtaomrGgbCDBKN2oidIqujIAg3y1FnUnHnHwLN+tYK4TUhV56dsg vEyLv47v3/164fQxAogcye1VxeQIM/9DIGqsQEb0PaqwzmNh5PISerE83eXW80o3JH0e SiHMLymxs+25kQwMclio1JcTyAfPi2vLj43lduoFOiNET1R8DmuwP57lEAcaDvnTMHiU EBrA== X-Gm-Message-State: AFqh2kprkoZkpUFJbapDdZU1tDVXEod+RGs8nNRwX3s1cusgPI9ZZVNh vhbug3kaLB1iNo3kGrHQUXl3ICXKfeE= X-Google-Smtp-Source: AMrXdXvjYQ5vgBJssrm+0x9zjgAmVMFWUvYlfVVM5aUTtRxoRaGaWnxsivzAhtN9SdXSXjTDp0xTZA== X-Received: by 2002:a17:903:2785:b0:194:3e2f:e078 with SMTP id jw5-20020a170903278500b001943e2fe078mr902914plb.43.1673306568267; Mon, 09 Jan 2023 15:22:48 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d22-20020a170902aa9600b001871461688esm6628572plr.175.2023.01.09.15.22.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 15:22:48 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 06/12] lpfc: Remove duplicate ndlp kref decrement in lpfc_cleanup_rpis Date: Mon, 9 Jan 2023 15:33:11 -0800 Message-Id: <20230109233317.54737-7-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230109233317.54737-1-justintee8345@gmail.com> References: <20230109233317.54737-1-justintee8345@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org With faulty cables in PT2PT topology, an unintentional ndlp double kref decrement can occur. If a FLOGI request is outstanding before the link goes down, the missing FLOGI_ACC causes an F_Port ndlp to remain in the UNUSED state. During link down, lpfc_cleanup_rpis is called and decrements an ndlp kref. Additionally, when the driver later decides to abort the FLOGI, the FLOGI completion handler decrements the ndlp kref a second time. Remove duplicate clean up logic in lpfc_cleanup_rpis because the updated FLOGI completion handler already handles the ndlp kref decrement. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_hbadisc.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 80375d73b732..af0acf55b343 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -1129,21 +1129,6 @@ lpfc_cleanup_rpis(struct lpfc_vport *vport, int remove) struct lpfc_nodelist *ndlp, *next_ndlp; list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) { - if (ndlp->nlp_state == NLP_STE_UNUSED_NODE) { - /* It's possible the FLOGI to the fabric node never - * successfully completed and never registered with the - * transport. In this case there is no way to clean up - * the node. - */ - if (ndlp->nlp_DID == Fabric_DID) { - if (ndlp->nlp_prev_state == - NLP_STE_UNUSED_NODE && - !ndlp->fc4_xpt_flags) - lpfc_nlp_put(ndlp); - } - continue; - } - if ((phba->sli3_options & LPFC_SLI3_VPORT_TEARDOWN) || ((vport->port_type == LPFC_NPIV_PORT) && ((ndlp->nlp_DID == NameServer_DID) || From patchwork Mon Jan 9 23:33:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 13094509 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF0A4C54EBD for ; Mon, 9 Jan 2023 23:22:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235571AbjAIXWz (ORCPT ); Mon, 9 Jan 2023 18:22:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237653AbjAIXWv (ORCPT ); Mon, 9 Jan 2023 18:22:51 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8D305FFD for ; Mon, 9 Jan 2023 15:22:50 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id jn22so11266665plb.13 for ; Mon, 09 Jan 2023 15:22:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sTGlDQjCAI8x+EKU12D0EsHSkX6w9bmXQmp0JVE1HUE=; b=EfZ3JgQ49IdE4G8GUjHUT2/Cvwe951W1bS9tuM+cUhJFAP5xj+Yy9WLSDeNE1HkEmR 6NnNlRu87OVw9ES0xqkutooDB+8Y4ckKWgBlPNuwQJgytDDnj688rORN2t6EvCpQcJZB VRdbGi6jYJJwJAy3yBoqcFlp0/qLAqfEuXDbWTodWNcizmC1sYtaz4AqJwCT/5lYUKW3 zto0+dLXwSS5AvZXC6l5PuupeBytaVFWMljpquUEgEXrojFF2JVfx758f+YSVH77y5PU wx7kZ5sW9rZeWfGMFMqP7k/Hoqv5tTRt8p2zSTgVTPnEW7Vho2u8Z1sZJeXoFgjNyT5G QhfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sTGlDQjCAI8x+EKU12D0EsHSkX6w9bmXQmp0JVE1HUE=; b=bTZWimm03/BOSv9xIrnVpa5sZDpb5ni7Jc0tPEJfE+cljlQ2MA+3306EqHZkcvFcgs ST467wW9gB3Ti1iyFiFp6PzADKir4yQvANRKfOjAdFP1T3Qq9dQF1KRLu1HW7ZqvvprI mya3mD3VoHXdQ2Nvtmd6UV4qh4czXT5HNao7TnyB9l0//QPjJ9qJqpYdmEj7sDsJUiSZ RwNc/QqIOjThLYotM+pojyETFa/Lmn5EyxiZXe8IilpmeWL0rJfKLfbAShtdvAHDrHLj 1TIj9xvSXHc+AgZl6yzAOeEeUnI7S63OJqdhIxX8elrCwJAC8U0lxk4c3jZWcyTJvm3T fdhQ== X-Gm-Message-State: AFqh2kqwWajU3CQeXTch3T0u/Bpuq58XpVWgl44Ul/epLWr7s9Rd/CeL MdBTYT2tSz67J8VTq0obtBJ6p5nUrEQ= X-Google-Smtp-Source: AMrXdXtg1QlkaT9H8QMRxure/acA2kdIH4LufT2ZeyRwoSBoX1nTboTg7RArJdyJCcAXdwTiFM5YCQ== X-Received: by 2002:a17:903:240b:b0:192:991f:d8e8 with SMTP id e11-20020a170903240b00b00192991fd8e8mr47417222plo.53.1673306570073; Mon, 09 Jan 2023 15:22:50 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d22-20020a170902aa9600b001871461688esm6628572plr.175.2023.01.09.15.22.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 15:22:49 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 07/12] lpfc: Exit PRLI completion handling early if ndlp not in PRLI_ISSUE state Date: Mon, 9 Jan 2023 15:33:12 -0800 Message-Id: <20230109233317.54737-8-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230109233317.54737-1-justintee8345@gmail.com> References: <20230109233317.54737-1-justintee8345@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org In a large SAN testing configuration, frequent target port toggle tests are occasionally resulting in missing lun path rediscoveries. An outstanding PRLI can be inflight when a target RSCN dissappearance occurs, causing the driver to retry PRLIs using invalid rpi contexts. Fix by verifying that an ndlp's state was not restarted from PRLI_ISSUE due to an intermediate RSCN. If not in a valid state, early exit PRLI completion handling. The last follow up RSCN indicating target reappearance retriggers PLOGI/PRLI with a valid rpi context and is expected to succeed in lun path rediscovery. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_els.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 919741bbe267..4d3b8f2036d2 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -2373,15 +2373,30 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, /* PRLI failed */ lpfc_printf_vlog(vport, mode, loglevel, "2754 PRLI failure DID:%06X Status:x%x/x%x, " - "data: x%x\n", + "data: x%x x%x\n", ndlp->nlp_DID, ulp_status, - ulp_word4, ndlp->fc4_prli_sent); + ulp_word4, ndlp->nlp_state, + ndlp->fc4_prli_sent); /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ if (!lpfc_error_lost_link(ulp_status, ulp_word4)) lpfc_disc_state_machine(vport, ndlp, cmdiocb, NLP_EVT_CMPL_PRLI); + /* The following condition catches an inflight transition + * mismatch typically caused by an RSCN. Skip any + * processing to allow recovery. + */ + if (ndlp->nlp_state >= NLP_STE_PLOGI_ISSUE && + ndlp->nlp_state <= NLP_STE_REG_LOGIN_ISSUE) { + lpfc_printf_vlog(vport, KERN_WARNING, LOG_NODE, + "2784 PRLI cmpl: state mismatch " + "DID x%06x nstate x%x nflag x%x\n", + ndlp->nlp_DID, ndlp->nlp_state, + ndlp->nlp_flag); + goto out; + } + /* * For P2P topology, retain the node so that PLOGI can be * attempted on it again. @@ -4673,6 +4688,15 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, /* the nameserver fails */ maxretry = 0; delay = 100; + } else if (cmd == ELS_CMD_PRLI && + ndlp->nlp_state != NLP_STE_PRLI_ISSUE) { + /* State-command disagreement. The PRLI was + * failed with an invalid rpi meaning there + * some unexpected state change. Don't retry. + */ + maxretry = 0; + retry = 0; + break; } retry = 1; break; From patchwork Mon Jan 9 23:33:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 13094510 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 829BFC63797 for ; Mon, 9 Jan 2023 23:22:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237824AbjAIXW4 (ORCPT ); Mon, 9 Jan 2023 18:22:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237557AbjAIXWx (ORCPT ); Mon, 9 Jan 2023 18:22:53 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C32838BC for ; Mon, 9 Jan 2023 15:22:52 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id jn22so11266730plb.13 for ; Mon, 09 Jan 2023 15:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WvEXd7AdBlyGZ8KpDI3u38Yqrgqo1XAo/GSGWUCVwYQ=; b=i3jQbQX/ZlPK80GhNyQkPS35ArdyEnp1dd/lNmrA1GyOj3Rch8FatKhoLuQHSuRrTm 9ayLcAzrUScMX3eDwLd00auTCOBGuimdzInwjbs1mYe1Wr24nFLXknxssidNhbPFaQE1 w4ZU1b7yzyM2YuAqO2wfzQDF0RAcIrA1yYFB+NyfCDGhZJJhDlc+HOnvRbKj+cHWOgd+ HML/eCSOKkceRjRHS5Na4IQukKTATzGWrxbGBqGqDIErFuXSgAiNREclfJs25eXcrEXr OPJn/BqcsmxvPq1Mb5cTWRoymQxsdMy8Q6sbMp+azxRMAARXHcjzNeWHAK91gWNFKMeQ +kqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WvEXd7AdBlyGZ8KpDI3u38Yqrgqo1XAo/GSGWUCVwYQ=; b=Mvda9Mb2NiYL4bPz1OkQdbbbss1UFsddDxijfi/DzY6sulNmVnhHptxbU6Ll0mUoGF aq4bgMiOenCKifs8NGheetygGvD7kqsQA7m8qcZrNt3hSz64uOdgbY2sTn8HlzV/x4Wv lfwbqA+JKH4joEjV7swbz5OxDQol3DhLtCK0IkfR10UCvOrQvakbxYXHEpEUSj5992b9 /sSjrWerRH29fl29lBKR9FXSqurT+eXWcNXhowmNMXQRlMm+9SGVyuaQ83FYgjSRxPaY cVbx0gP7YP2MhCSpZQhZMVuOgknwYzQo1hEbP39K7tyJUQWm/W0krlfyKJtHdsJI7bra xMeQ== X-Gm-Message-State: AFqh2kpM5S4pGBGkKNhJyig+r3YEvQDcIP/JSSFosifmF+Ada5NzXSfQ SWU1WLQIEmjDE26SksmBgrHyXjfF2hE= X-Google-Smtp-Source: AMrXdXtIoiuYBkyOlkniSGSH9SENgvTG6jfDZpp4NOSjRw10DO00AR3SFMHs06mP3SrifVvns9mXTQ== X-Received: by 2002:a17:903:181:b0:193:3154:625c with SMTP id z1-20020a170903018100b001933154625cmr6679618plg.35.1673306571924; Mon, 09 Jan 2023 15:22:51 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d22-20020a170902aa9600b001871461688esm6628572plr.175.2023.01.09.15.22.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 15:22:51 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 08/12] lpfc: Fix use-after-free KFENCE violation during sysfs firmware write Date: Mon, 9 Jan 2023 15:33:13 -0800 Message-Id: <20230109233317.54737-9-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230109233317.54737-1-justintee8345@gmail.com> References: <20230109233317.54737-1-justintee8345@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org During the sysfs firmware write process, a use-after-free read warning is logged from the lpfc_wr_object routine. BUG: KFENCE: use-after-free read in lpfc_wr_object+0x235/0x310 [lpfc] Use-after-free read at 0x0000000000cf164d (in kfence-#111): lpfc_wr_object+0x235/0x310 [lpfc] lpfc_write_firmware.cold+0x206/0x30d [lpfc] lpfc_sli4_request_firmware_update+0xa6/0x100 [lpfc] lpfc_request_firmware_upgrade_store+0x66/0xb0 [lpfc] kernfs_fop_write_iter+0x121/0x1b0 new_sync_write+0x11c/0x1b0 vfs_write+0x1ef/0x280 ksys_write+0x5f/0xe0 do_syscall_64+0x59/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd The driver accessed wr_object pointer data, which was initialized into mailbox payload memory, after the mailbox object was released back to the mailbox pool. Fix by moving the mailbox free calls to the end of the routine ensuring that we don't reference internal mailbox memory after release. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_sli.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index c21187c93a5f..55dfab9ae3c9 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -20815,6 +20815,7 @@ lpfc_wr_object(struct lpfc_hba *phba, struct list_head *dmabuf_list, struct lpfc_mbx_wr_object *wr_object; LPFC_MBOXQ_t *mbox; int rc = 0, i = 0; + int mbox_status = 0; uint32_t shdr_status, shdr_add_status, shdr_add_status_2; uint32_t shdr_change_status = 0, shdr_csf = 0; uint32_t mbox_tmo; @@ -20860,11 +20861,15 @@ lpfc_wr_object(struct lpfc_hba *phba, struct list_head *dmabuf_list, wr_object->u.request.bde_count = i; bf_set(lpfc_wr_object_write_length, &wr_object->u.request, written); if (!phba->sli4_hba.intr_enable) - rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL); + mbox_status = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL); else { mbox_tmo = lpfc_mbox_tmo_val(phba, mbox); - rc = lpfc_sli_issue_mbox_wait(phba, mbox, mbox_tmo); + mbox_status = lpfc_sli_issue_mbox_wait(phba, mbox, mbox_tmo); } + + /* The mbox status needs to be maintained to detect MBOX_TIMEOUT. */ + rc = mbox_status; + /* The IOCTL status is embedded in the mailbox subheader. */ shdr_status = bf_get(lpfc_mbox_hdr_status, &wr_object->header.cfg_shdr.response); @@ -20879,10 +20884,6 @@ lpfc_wr_object(struct lpfc_hba *phba, struct list_head *dmabuf_list, &wr_object->u.response); } - if (!phba->sli4_hba.intr_enable) - mempool_free(mbox, phba->mbox_mem_pool); - else if (rc != MBX_TIMEOUT) - mempool_free(mbox, phba->mbox_mem_pool); if (shdr_status || shdr_add_status || shdr_add_status_2 || rc) { lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, "3025 Write Object mailbox failed with " @@ -20900,6 +20901,12 @@ lpfc_wr_object(struct lpfc_hba *phba, struct list_head *dmabuf_list, lpfc_log_fw_write_cmpl(phba, shdr_status, shdr_add_status, shdr_add_status_2, shdr_change_status, shdr_csf); + + if (!phba->sli4_hba.intr_enable) + mempool_free(mbox, phba->mbox_mem_pool); + else if (mbox_status != MBX_TIMEOUT) + mempool_free(mbox, phba->mbox_mem_pool); + return rc; } From patchwork Mon Jan 9 23:33:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 13094512 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2500CC54EBD for ; Mon, 9 Jan 2023 23:23:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237850AbjAIXXG (ORCPT ); Mon, 9 Jan 2023 18:23:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237653AbjAIXW4 (ORCPT ); Mon, 9 Jan 2023 18:22:56 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C8F65591 for ; Mon, 9 Jan 2023 15:22:54 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id d15so11295293pls.6 for ; Mon, 09 Jan 2023 15:22:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ENG+xXxIpzNakvIl6g76frXEgokYLHb09WosjLbHNdk=; b=Nf7qUMXloYgvjvOcW4tEoV+CLDF1/7lFQl4OoP9OQF7xU9+1Op/43fIRmofAlqr+xh HlYo+WMuXwHh6CuJVn6v6q5JXyfvQ6l8ekFrMUg/To8CIcjumFavngjQmPjHI6wN9Tww cKp3folvaYN9si0TKL7j1k5+yn/jeDT7SVyQW04vPlZJRwJUVjCphmnKc6BitmIr30vB OWDLsHZHe/vASBaEOr8VjuF2IRp//vLrXgT0Cvf023lGPDZBvsWobyHcjyZzxJmcA9aw xTBcX+tXRMRsu2Ht9SNasJBg3kH6YfHSS9czIQlF2OK+9xshVqumktQVUa3f3DuxFKJi eDSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ENG+xXxIpzNakvIl6g76frXEgokYLHb09WosjLbHNdk=; b=s60oJYTLF9/9INdCqxH6DRtn2iX30I9MXDs1yrMHVA0v68goXvtNqM6LkTNt6QXVU9 sPgnmRJzjfCdCgiXx94xvoaKDNIUXVvr9SA+2fyhkRyBTFGHJbDyolfvmMoS7K8JCI1Q x7O4U8xTyKdkNJK+ZGnkb24p3x23J2BNhTLpJQNDuqtwJJ3Jwc6gmuG8upwSX5xcS5fW Rxkjz549Ir0sG7j/1wmMWWZANzVUvyBTirleJ8i1xWGX+VG1yL+LTW94NpjiM+FM58Ba 7jS0gk5uXtFONKUnigsC3QS4dLnHamaP7t4h911QZyL5g28D4/8A1GlRuUoz+HUsrAo4 LKZw== X-Gm-Message-State: AFqh2krlA4ZkWZk7bMdCLS92DOuOcPP4/bo3b4PSuCOSpc4Ov72wsdN8 chGmSPOTX62wbqL1EWdPaUKPgFs8c0A= X-Google-Smtp-Source: AMrXdXshcsfb6HWWeVCeWTSBSzC4VwGUZvYoZLG+x/fFk1jX31Kbviqcn+jqXcmpHPXGgMH1kBb2ww== X-Received: by 2002:a17:902:ce85:b0:18f:a0de:6ad0 with SMTP id f5-20020a170902ce8500b0018fa0de6ad0mr88325421plg.55.1673306573841; Mon, 09 Jan 2023 15:22:53 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d22-20020a170902aa9600b001871461688esm6628572plr.175.2023.01.09.15.22.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 15:22:53 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 09/12] lpfc: Reinitialize internal VMID data structures after FLOGI completion Date: Mon, 9 Jan 2023 15:33:14 -0800 Message-Id: <20230109233317.54737-10-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230109233317.54737-1-justintee8345@gmail.com> References: <20230109233317.54737-1-justintee8345@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org After enabling VMID, an issue lip test was erasing fabric switch VMID information. Introduce a lpfc_reinit_vmid routine, which reinitializes all VMID data structures upon FLOGI completion in fabric topology. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_crtn.h | 1 + drivers/scsi/lpfc/lpfc_els.c | 3 +++ drivers/scsi/lpfc/lpfc_vmid.c | 39 +++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index 6f63e0acf9dd..e72a2504163a 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h @@ -683,6 +683,7 @@ int lpfc_vmid_get_appid(struct lpfc_vport *vport, char *uuid, union lpfc_vmid_io_tag *tag); void lpfc_vmid_vport_cleanup(struct lpfc_vport *vport); int lpfc_issue_els_qfpa(struct lpfc_vport *vport); +void lpfc_reinit_vmid(struct lpfc_vport *vport); void lpfc_sli_rpi_release(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp); diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 4d3b8f2036d2..264a3db6cd69 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1123,6 +1123,9 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, if (sp->cmn.priority_tagging) vport->phba->pport->vmid_flag |= (LPFC_VMID_ISSUE_QFPA | LPFC_VMID_TYPE_PRIO); + /* reinitialize the VMID datastructure before returning */ + if (lpfc_is_vmid_enabled(phba)) + lpfc_reinit_vmid(vport); /* * Address a timing race with dev_loss. If dev_loss is active on diff --git a/drivers/scsi/lpfc/lpfc_vmid.c b/drivers/scsi/lpfc/lpfc_vmid.c index ed1d7f7b88a3..9175982066f8 100644 --- a/drivers/scsi/lpfc/lpfc_vmid.c +++ b/drivers/scsi/lpfc/lpfc_vmid.c @@ -284,3 +284,42 @@ int lpfc_vmid_get_appid(struct lpfc_vport *vport, char *uuid, } return rc; } + +/* + * lpfc_reinit_vmid - reinitializes the vmid data structure + * @vport: pointer to vport data structure + * + * This routine reinitializes the vmid post flogi completion + * + * Return codes + * None + */ +void +lpfc_reinit_vmid(struct lpfc_vport *vport) +{ + u32 bucket, i, cpu; + struct lpfc_vmid *cur; + struct lpfc_vmid *vmp = NULL; + struct hlist_node *tmp; + + write_lock(&vport->vmid_lock); + vport->cur_vmid_cnt = 0; + + for (i = 0; i < vport->max_vmid; i++) { + vmp = &vport->vmid[i]; + vmp->flag = LPFC_VMID_SLOT_FREE; + memset(vmp->host_vmid, 0, sizeof(vmp->host_vmid)); + vmp->io_rd_cnt = 0; + vmp->io_wr_cnt = 0; + + if (vmp->last_io_time) + for_each_possible_cpu(cpu) + *per_cpu_ptr(vmp->last_io_time, cpu) = 0; + } + + /* for all elements in the hash table */ + if (!hash_empty(vport->hash_table)) + hash_for_each_safe(vport->hash_table, bucket, tmp, cur, hnode) + hash_del(&cur->hnode); + write_unlock(&vport->vmid_lock); +} From patchwork Mon Jan 9 23:33:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 13094513 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB516C5479D for ; Mon, 9 Jan 2023 23:23:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237841AbjAIXXH (ORCPT ); Mon, 9 Jan 2023 18:23:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237745AbjAIXW5 (ORCPT ); Mon, 9 Jan 2023 18:22:57 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60D94959C for ; Mon, 9 Jan 2023 15:22:56 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id d3so11277159plr.10 for ; Mon, 09 Jan 2023 15:22:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xNjnenLgmHscIgh8ZHvPtXCMJHVu7Vx+kT9mf5z0Hco=; b=TM9D3MvkgIfQGqR0OZ4qqrgYGLUVgKMVyA49nJQnUBLR4xl9kg3WXm667CYrG/132y ZHYNUVt0JoB9b/+Z/tmjSEuedsK69Cy+iTUlLojpy3Led3jB6lhsRjm72MAjUVq8pxFg F87BiwSydveGiGJ21Kd471pEQiwrA0TbcmPVGBtxncg0rCJhthP6Cmj6YDLmC+ikZ8sh ojSIjsHlnIPT6jg3SbLR5Zv/iSWPhXoSMtBx8viPUyZ4jjEoTZoSBsuV5Vfab8QTLGKP T0bhEtKLTuAQhBSljMFIVgyUl08JX8rqLF7OzHD99SdPe3+ytgRnQv/lbpkKd9dAQkaH Aq5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xNjnenLgmHscIgh8ZHvPtXCMJHVu7Vx+kT9mf5z0Hco=; b=A9WUhUgEQ4SfoCjjO1cn9gnvQQ8RAcYw+QPZ5NHYBLm3BDG7jSJfYCRrm0KnZVAUFL FzzffyjPdZYgQtEOqnRn2LC4a7Vy4OvoENvWSPk4YILMjTZKPErdrEhZqLoIT1BkqF25 iMq7QQYwtqBMuPznhHWhHxwbSTo95oNqB5lfTJuAeqj4Vq33ZxlziIl1swACI2uVAt9Y 1gDq9pPNmIDAIByivbe6/nmfnQhS45YaoOpQqgybwHY1NH7CyrQh5JkRF6uKe9UOcD4Z QfM8HlSiFdOxCLgotXkLq49P3kcKcrZACoDNkFm16T/utIKeN7p3jJu5ffsR8/6HyPu/ SeQA== X-Gm-Message-State: AFqh2kqGBjvlXBpnpBF1cmumF1Ex68lOQhCqb83bElhSkPhzCK+ewKGt JwDuta6SGNcErkOshDH4tAk9WKc+gp4= X-Google-Smtp-Source: AMrXdXuY0TYB+1BJUI6rfd2mMR6WepxFWNVxVYjYkRBJqqxZdYOf28fIwzDej1XHeLYlTYMO/49sOA== X-Received: by 2002:a17:902:edc3:b0:189:e577:c83d with SMTP id q3-20020a170902edc300b00189e577c83dmr59695846plk.66.1673306575638; Mon, 09 Jan 2023 15:22:55 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d22-20020a170902aa9600b001871461688esm6628572plr.175.2023.01.09.15.22.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 15:22:55 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 10/12] lpfc: Introduce new attention types for lpfc_sli4_async_fc_evt hdlr Date: Mon, 9 Jan 2023 15:33:15 -0800 Message-Id: <20230109233317.54737-11-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230109233317.54737-1-justintee8345@gmail.com> References: <20230109233317.54737-1-justintee8345@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Define new FC Link ACQE with new attention types 0x8 (Link Activation Failure) and 0x9 (Link Reset Protocol Event). Both attention types are meant to be informational-only type ACQEs with no action required. 0x8 is reported for diagnostic purposes, while 0x9 is posted during a normal link up transition when activating BB Credit Recovery feature. As such, modify lpfc_sli4_async_fc_evt logic to log the attention types according to its severity and early return when informational-only attention types are encountered. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_hw4.h | 5 +++ drivers/scsi/lpfc/lpfc_init.c | 85 ++++++++++++++++++++++++++++------- drivers/scsi/lpfc/lpfc_sli4.h | 3 +- 3 files changed, 77 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index fb3504dbb899..58589eb1a358 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h @@ -4201,6 +4201,8 @@ struct lpfc_acqe_fc_la { #define LPFC_FC_LA_TYPE_MDS_LOOPBACK 0x5 #define LPFC_FC_LA_TYPE_UNEXP_WWPN 0x6 #define LPFC_FC_LA_TYPE_TRUNKING_EVENT 0x7 +#define LPFC_FC_LA_TYPE_ACTIVATE_FAIL 0x8 +#define LPFC_FC_LA_TYPE_LINK_RESET_PRTCL_EVT 0x9 #define lpfc_acqe_fc_la_port_type_SHIFT 6 #define lpfc_acqe_fc_la_port_type_MASK 0x00000003 #define lpfc_acqe_fc_la_port_type_WORD word0 @@ -4242,6 +4244,9 @@ struct lpfc_acqe_fc_la { #define lpfc_acqe_fc_la_fault_SHIFT 0 #define lpfc_acqe_fc_la_fault_MASK 0x000000FF #define lpfc_acqe_fc_la_fault_WORD word1 +#define lpfc_acqe_fc_la_link_status_SHIFT 8 +#define lpfc_acqe_fc_la_link_status_MASK 0x0000007F +#define lpfc_acqe_fc_la_link_status_WORD word1 #define lpfc_acqe_fc_la_trunk_fault_SHIFT 0 #define lpfc_acqe_fc_la_trunk_fault_MASK 0x0000000F #define lpfc_acqe_fc_la_trunk_fault_WORD word1 diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 4d58373f6ab6..0fef8cd38ecf 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -5189,16 +5189,25 @@ static void lpfc_sli4_parse_latt_fault(struct lpfc_hba *phba, struct lpfc_acqe_link *acqe_link) { - switch (bf_get(lpfc_acqe_link_fault, acqe_link)) { - case LPFC_ASYNC_LINK_FAULT_NONE: - case LPFC_ASYNC_LINK_FAULT_LOCAL: - case LPFC_ASYNC_LINK_FAULT_REMOTE: - case LPFC_ASYNC_LINK_FAULT_LR_LRR: + switch (bf_get(lpfc_acqe_fc_la_att_type, acqe_link)) { + case LPFC_FC_LA_TYPE_LINK_DOWN: + case LPFC_FC_LA_TYPE_TRUNKING_EVENT: + case LPFC_FC_LA_TYPE_ACTIVATE_FAIL: + case LPFC_FC_LA_TYPE_LINK_RESET_PRTCL_EVT: break; default: - lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, - "0398 Unknown link fault code: x%x\n", - bf_get(lpfc_acqe_link_fault, acqe_link)); + switch (bf_get(lpfc_acqe_link_fault, acqe_link)) { + case LPFC_ASYNC_LINK_FAULT_NONE: + case LPFC_ASYNC_LINK_FAULT_LOCAL: + case LPFC_ASYNC_LINK_FAULT_REMOTE: + case LPFC_ASYNC_LINK_FAULT_LR_LRR: + break; + default: + lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, + "0398 Unknown link fault code: x%x\n", + bf_get(lpfc_acqe_link_fault, acqe_link)); + break; + } break; } } @@ -6281,6 +6290,7 @@ lpfc_sli4_async_fc_evt(struct lpfc_hba *phba, struct lpfc_acqe_fc_la *acqe_fc) LPFC_MBOXQ_t *pmb; MAILBOX_t *mb; struct lpfc_mbx_read_top *la; + char *log_level; int rc; if (bf_get(lpfc_trailer_type, acqe_fc) != @@ -6312,25 +6322,70 @@ lpfc_sli4_async_fc_evt(struct lpfc_hba *phba, struct lpfc_acqe_fc_la *acqe_fc) bf_get(lpfc_acqe_fc_la_port_number, acqe_fc); phba->sli4_hba.link_state.fault = bf_get(lpfc_acqe_link_fault, acqe_fc); + phba->sli4_hba.link_state.link_status = + bf_get(lpfc_acqe_fc_la_link_status, acqe_fc); - if (bf_get(lpfc_acqe_fc_la_att_type, acqe_fc) == - LPFC_FC_LA_TYPE_LINK_DOWN) - phba->sli4_hba.link_state.logical_speed = 0; - else if (!phba->sli4_hba.conf_trunk) - phba->sli4_hba.link_state.logical_speed = + /* + * Only select attention types need logical speed modification to what + * was previously set. + */ + if (phba->sli4_hba.link_state.status >= LPFC_FC_LA_TYPE_LINK_UP && + phba->sli4_hba.link_state.status < LPFC_FC_LA_TYPE_ACTIVATE_FAIL) { + if (bf_get(lpfc_acqe_fc_la_att_type, acqe_fc) == + LPFC_FC_LA_TYPE_LINK_DOWN) + phba->sli4_hba.link_state.logical_speed = 0; + else if (!phba->sli4_hba.conf_trunk) + phba->sli4_hba.link_state.logical_speed = bf_get(lpfc_acqe_fc_la_llink_spd, acqe_fc) * 10; + } lpfc_printf_log(phba, KERN_INFO, LOG_SLI, "2896 Async FC event - Speed:%dGBaud Topology:x%x " "LA Type:x%x Port Type:%d Port Number:%d Logical speed:" - "%dMbps Fault:%d\n", + "%dMbps Fault:x%x Link Status:x%x\n", phba->sli4_hba.link_state.speed, phba->sli4_hba.link_state.topology, phba->sli4_hba.link_state.status, phba->sli4_hba.link_state.type, phba->sli4_hba.link_state.number, phba->sli4_hba.link_state.logical_speed, - phba->sli4_hba.link_state.fault); + phba->sli4_hba.link_state.fault, + phba->sli4_hba.link_state.link_status); + + /* + * The following attention types are informational only, providing + * further details about link status. Overwrite the value of + * link_state.status appropriately. No further action is required. + */ + if (phba->sli4_hba.link_state.status >= LPFC_FC_LA_TYPE_ACTIVATE_FAIL) { + switch (phba->sli4_hba.link_state.status) { + case LPFC_FC_LA_TYPE_ACTIVATE_FAIL: + log_level = KERN_WARNING; + phba->sli4_hba.link_state.status = + LPFC_FC_LA_TYPE_LINK_DOWN; + break; + case LPFC_FC_LA_TYPE_LINK_RESET_PRTCL_EVT: + /* + * During bb credit recovery establishment, receiving + * this attention type is normal. Link Up attention + * type is expected to occur before this informational + * attention type so keep the Link Up status. + */ + log_level = KERN_INFO; + phba->sli4_hba.link_state.status = + LPFC_FC_LA_TYPE_LINK_UP; + break; + default: + log_level = KERN_INFO; + break; + } + lpfc_log_msg(phba, log_level, LOG_SLI, + "2992 Async FC event - Informational Link " + "Attention Type x%x\n", + bf_get(lpfc_acqe_fc_la_att_type, acqe_fc)); + return; + } + pmb = (LPFC_MBOXQ_t *)mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); if (!pmb) { lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h index f927c2a25d54..babdf29245d4 100644 --- a/drivers/scsi/lpfc/lpfc_sli4.h +++ b/drivers/scsi/lpfc/lpfc_sli4.h @@ -291,8 +291,9 @@ struct lpfc_sli4_link { uint8_t type; uint8_t number; uint8_t fault; - uint32_t logical_speed; + uint8_t link_status; uint16_t topology; + uint32_t logical_speed; }; struct lpfc_fcf_rec { From patchwork Mon Jan 9 23:33:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 13094514 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B668C5479D for ; Mon, 9 Jan 2023 23:23:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237718AbjAIXXK (ORCPT ); Mon, 9 Jan 2023 18:23:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237836AbjAIXW6 (ORCPT ); Mon, 9 Jan 2023 18:22:58 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5A7AA476 for ; Mon, 9 Jan 2023 15:22:57 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id fz16-20020a17090b025000b002269d6c2d83so181664pjb.0 for ; Mon, 09 Jan 2023 15:22:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HsYUTZKmVQD83NnPKk/jgZWiXyc8A+S9jJmsa33k7dA=; b=QKZvqq9RdE4OP7aEpp9OtXzVeZ2ckHhre9cksbfDuF/0IJpixLZOcF2dvFRqMX26Kw X8TVrhwSkJB5IVixzVvLlYtEzd8G2kg2rSNU3XyGV3Do0nUAK+T9SM7UIMHZJchUBwXz P11blNCQm0lkv8TLQT/7TAGCkTrtx3k9tq/+vR7r3cG6AjvNOx8WLJsLRcEaYNk0jggu x/NQdoMczwcuR+6AV6AxDu1tgLgGfI1EeyMPDEoAOeopULDjKmEUh0QGGliOyXykaa5Q xrPXAGitVWcEhQS07tU/eYMgtZToD5tWscektWZAOaW1r4EE0NKKXNrSB2Jg9zwyAnHv 25Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HsYUTZKmVQD83NnPKk/jgZWiXyc8A+S9jJmsa33k7dA=; b=t6NBCRG+s9tcZctIaaJYvhf8pGps01PhVVwb/f0BvKh3BPXoeIWyj8AtmjRa3cSAd4 hdRj/YlcBka11mgGe90sKj6EHQBevADZimN6m8jlCuafuWR3CyY8K/wOJ+/c1kY7DhjQ R1W3HD3h6Vy+DGnL0i3CLCKeUHwOUUxYSEUeCXuE3C6guJ5g4SBWf1BexBjv6VzcNFUm qvcFjJS3z7gqe/CR2zpmBkqdBWd8DaN6eX4wpbij1BFqLCwB23aB2IOdsg7YYkdlzB0t 8FgDPNiboRQQTKf+MFAVZa/xcEW6o6xSI6boGNQ4Rja0eSsSkc998RZvR4ILQC7XTP9S PWRg== X-Gm-Message-State: AFqh2koZ1ZJWqelKj1V8DuLcoOe2Yq1p7/q9HzJRwuYwDZc9o40yeEL3 4YtGspnrjlukmvuVJ0rhh+rY9qgPkgg= X-Google-Smtp-Source: AMrXdXtI6qIZUUOnYJyeECfh9VHnaDvLGaSZ58roganh5WXUW5hz0yMAsezHNY+oYAP6DGP+9OdNug== X-Received: by 2002:a17:903:54d:b0:189:81a2:d616 with SMTP id jo13-20020a170903054d00b0018981a2d616mr64591834plb.16.1673306577264; Mon, 09 Jan 2023 15:22:57 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d22-20020a170902aa9600b001871461688esm6628572plr.175.2023.01.09.15.22.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 15:22:57 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 11/12] lpfc: Update lpfc version to 14.2.0.10 Date: Mon, 9 Jan 2023 15:33:16 -0800 Message-Id: <20230109233317.54737-12-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230109233317.54737-1-justintee8345@gmail.com> References: <20230109233317.54737-1-justintee8345@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Update lpfc version to 14.2.0.10 Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h index 41a1128f8651..c06d981cf8c9 100644 --- a/drivers/scsi/lpfc/lpfc_version.h +++ b/drivers/scsi/lpfc/lpfc_version.h @@ -20,7 +20,7 @@ * included with this package. * *******************************************************************/ -#define LPFC_DRIVER_VERSION "14.2.0.9" +#define LPFC_DRIVER_VERSION "14.2.0.10" #define LPFC_DRIVER_NAME "lpfc" /* Used for SLI 2/3 */ From patchwork Mon Jan 9 23:33:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Justin Tee X-Patchwork-Id: 13094515 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37065C54EBD for ; Mon, 9 Jan 2023 23:23:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237851AbjAIXXM (ORCPT ); Mon, 9 Jan 2023 18:23:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237804AbjAIXXB (ORCPT ); Mon, 9 Jan 2023 18:23:01 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E651BC14 for ; Mon, 9 Jan 2023 15:23:00 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id dw9so9003959pjb.5 for ; Mon, 09 Jan 2023 15:23:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o52mlmG+wYwEzC1C8pOro/22gWkaauNZDgRAB4INKHo=; b=QgmX1BieZfahRhos5NgsdYrS+2hkezpWKGy96/mqp8NW/vnrhzJRbR938cNwI6aZEv v8BYT6vG7+KJvQh5xJQZdVdmZYHKBF/cLDR8f5z/sAE+csr3baThuCKlJmfPZj7UJ/OR 7wZe1ZCp9zTg1lxXlNoCpPkSJTaOspCCnGuxWuyhFVrkv5EHg7PjWet1AksnRhAm6x/4 msjGQXPFu0u/2Z8+sA/yW7FwjDBhRYBvmvCfWLvNk/aVZw9Z1BaFyqwB27ITvMWZPjS/ BnEaOBfbLIV/UerS3gJF1y0rRO6kfOtScuFPuxXHom69H19gMnQWjr4YHU2L9Aiag6OW QajQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o52mlmG+wYwEzC1C8pOro/22gWkaauNZDgRAB4INKHo=; b=tdZ2LICtAjQQddciH9FA3JgzrfX7SXB6T+jdVl9pwMtzfGwnQDlbfNZOQ+IjbgR6Qg 1EX0jMR4I2uJciLEfFPSaGD6UIn0FTctTmzojUszAH2BtkHmCaUw6uz+aZTAaicKiyZx 5vJ0aT9gFRgjkg0yUf698BV2oyaXI27HZ2ABBhTtkbg4lnCnhRBEXJzY3zdBYjOXFnmX OuM4TaZ1CW0w24J+hPYAfQuoHTl0DCmgjirKxNhtr2NCrOun953Nshci6h58Hu5Qex1S OFi7fgU//w+VtuwJubhtF2rBmrooOZh0XsMyIMaTjRWEMtVmH72iHIha4vev1Lc3gzxz 14FA== X-Gm-Message-State: AFqh2kqf6g9UrtjWkGSC0e2DtmlKaW++0pfWTogjbID24JQvWienDChW NtrYOr03ay2m2+2GYpeWH4X1PFljaJY= X-Google-Smtp-Source: AMrXdXv5bGHilCbzbENtLVZmozS7zgCeg2MnYwxnbRG+EFSvQ5CKdK7DhvBFnuH3EMrukbXGRJtTSg== X-Received: by 2002:a17:903:268a:b0:193:3980:98d5 with SMTP id jf10-20020a170903268a00b00193398098d5mr2972494plb.57.1673306579399; Mon, 09 Jan 2023 15:22:59 -0800 (PST) Received: from dhcp-10-231-55-133.dhcp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d22-20020a170902aa9600b001871461688esm6628572plr.175.2023.01.09.15.22.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 15:22:59 -0800 (PST) From: Justin Tee To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, justin.tee@broadcom.com, Justin Tee Subject: [PATCH 12/12] Copyright updates for 14.2.0.10 patches Date: Mon, 9 Jan 2023 15:33:17 -0800 Message-Id: <20230109233317.54737-13-justintee8345@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230109233317.54737-1-justintee8345@gmail.com> References: <20230109233317.54737-1-justintee8345@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Update copyrights to 2023 for files modified in the 14.2.0.10 patch set. Signed-off-by: Justin Tee --- drivers/scsi/lpfc/lpfc.h | 2 +- drivers/scsi/lpfc/lpfc_attr.c | 2 +- drivers/scsi/lpfc/lpfc_crtn.h | 2 +- drivers/scsi/lpfc/lpfc_els.c | 2 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 2 +- drivers/scsi/lpfc/lpfc_hw4.h | 2 +- drivers/scsi/lpfc/lpfc_init.c | 2 +- drivers/scsi/lpfc/lpfc_scsi.c | 2 +- drivers/scsi/lpfc/lpfc_sli.c | 2 +- drivers/scsi/lpfc/lpfc_sli4.h | 2 +- drivers/scsi/lpfc/lpfc_version.h | 4 ++-- drivers/scsi/lpfc/lpfc_vmid.c | 2 +- drivers/scsi/lpfc/lpfc_vport.c | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 1095595ca3a2..cf55f8e3bd9f 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index c95401225057..76c3434f8976 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index e72a2504163a..976fd5ee7f7e 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 264a3db6cd69..569639dc8b2c 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index af0acf55b343..a6df0a5b4006 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index 58589eb1a358..58fa39c403a0 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2009-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 0fef8cd38ecf..faaaeae25d44 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 9b6580eb7ed6..e989f130434e 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 55dfab9ae3c9..edbd81c3b643 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h index babdf29245d4..3b62c4032c31 100644 --- a/drivers/scsi/lpfc/lpfc_sli4.h +++ b/drivers/scsi/lpfc/lpfc_sli4.h @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2009-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h index c06d981cf8c9..0238208cdd11 100644 --- a/drivers/scsi/lpfc/lpfc_version.h +++ b/drivers/scsi/lpfc/lpfc_version.h @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * @@ -32,6 +32,6 @@ #define LPFC_MODULE_DESC "Emulex LightPulse Fibre Channel SCSI driver " \ LPFC_DRIVER_VERSION -#define LPFC_COPYRIGHT "Copyright (C) 2017-2022 Broadcom. All Rights " \ +#define LPFC_COPYRIGHT "Copyright (C) 2017-2023 Broadcom. All Rights " \ "Reserved. The term \"Broadcom\" refers to Broadcom Inc. " \ "and/or its subsidiaries." diff --git a/drivers/scsi/lpfc/lpfc_vmid.c b/drivers/scsi/lpfc/lpfc_vmid.c index 9175982066f8..cf8ba840d0ea 100644 --- a/drivers/scsi/lpfc/lpfc_vmid.c +++ b/drivers/scsi/lpfc/lpfc_vmid.c @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index 5aeda245369b..6c7559cf1a4b 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *