From patchwork Fri Jul 1 21:14:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12903785 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 B03CAC433EF for ; Fri, 1 Jul 2022 21:15:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230094AbiGAVPD (ORCPT ); Fri, 1 Jul 2022 17:15:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbiGAVPA (ORCPT ); Fri, 1 Jul 2022 17:15:00 -0400 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 417223F325 for ; Fri, 1 Jul 2022 14:14:59 -0700 (PDT) Received: by mail-qt1-x82a.google.com with SMTP id h19so1361127qtp.6 for ; Fri, 01 Jul 2022 14:14:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Tb11acEat9t/ITib8DtiU3CeP5r7Um+jRtEBNvOSIyc=; b=KHYjICWc+vDg5ZVBFg1MRO7dmZHoz3Qda5nYLKrX9bBWFnk+nv8xpQdXw8nnIQywVa 1eMsEafULnY3n6Jr5g+9yKpWWLBOw6pU0hMtPj/Nmu6r7W2mhtZOyasAQo9SunrUI2Yf pu6IrVodytEbgAGuEKeXok6biKwoAIluJ5tJraEt1kf4u7m04DV8iDDhGNxnkqLY40ad asFKEuszKF30BSGP6cd7h1bJvVIAlFEJq77yYaXakHBLuhHgQvETqhBsS7NBStmqMzhC XQ1U2Kk5c2TTGeD5GWCiZhr6aAebQCu8lhQViHTdG/dzvko0fEjOEbKTxkoKdO56MIou Yvkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Tb11acEat9t/ITib8DtiU3CeP5r7Um+jRtEBNvOSIyc=; b=SUBDhB5lhwBSBkUV3W5Ld1GPFktVkPZY0CtQCYT6Mv5sLS2fdOpQ6NoNNEm/e6C09W Z3TiiK26VHheDiwPsU1z3JlCEnqHQz9hJd6uGKblu9vjBafE7O2alRs9OoEufgAFkK56 W7eWfJGYInpHHzuErev6nSUMqfBEgq6BVN5aAo1CRg7Zbq21xSXDv9V5ItW870bpJ2wW m8TOKdU+kQCrufQhVRxlVoanFVESgJcomPXGZmp1M3Re6tQcq6n8R+eFSeHNbQCACt4D XPhDjrYB1z+nnVFqZfIETUOo1qRSOrZMWJUpXQrIwiFp/1l33U/FQynIJxCpx66QofwP Rj3Q== X-Gm-Message-State: AJIora/yTeh8VLQW8fc5kgi2p4rtNRQgCUgRCYnhvHzDDhiwFttfEpqi 911jRt+HizzHMhxVEkCwuPbog1XHDw8= X-Google-Smtp-Source: AGRyM1sknactjF5O/MjEqDU/CiC/sp3PGwncDM5LrL3N9NU0bw5vtZlIWaJHGAIaljyg5/2Fr1y5wg== X-Received: by 2002:a0c:e3cd:0:b0:470:5aec:e158 with SMTP id e13-20020a0ce3cd000000b004705aece158mr19865151qvl.42.1656710098177; Fri, 01 Jul 2022 14:14:58 -0700 (PDT) Received: from mail-lvn-it-01.broadcom.com ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020ac842c6000000b00317ccc66971sm14584509qtm.52.2022.07.01.14.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 14:14:57 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 01/12] lpfc: Fix uninitialized cqe field in lpfc_nvme_cancel_iocb Date: Fri, 1 Jul 2022 14:14:14 -0700 Message-Id: <20220701211425.2708-2-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com> References: <20220701211425.2708-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org In lpfc_nvme_cancel_iocb(), a cqe is created locally from stack storage. The code didn't initialize the total_data_placed word, inheriting stack content. Initialize the total_data_placed word. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvme.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index cd10ee6482fc..152245f7cacc 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -2824,6 +2824,7 @@ lpfc_nvme_cancel_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn, wcqep->word0 = 0; bf_set(lpfc_wcqe_c_status, wcqep, stat); wcqep->parameter = param; + wcqep->total_data_placed = 0; wcqep->word3 = 0; /* xb is 0 */ /* Call release with XB=1 to queue the IO into the abort list. */ From patchwork Fri Jul 1 21:14:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12903786 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 971CDC43334 for ; Fri, 1 Jul 2022 21:15:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230250AbiGAVPE (ORCPT ); Fri, 1 Jul 2022 17:15:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229955AbiGAVPC (ORCPT ); Fri, 1 Jul 2022 17:15:02 -0400 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9734D3DA7E for ; Fri, 1 Jul 2022 14:15:00 -0700 (PDT) Received: by mail-qk1-x732.google.com with SMTP id v6so2731457qkh.2 for ; Fri, 01 Jul 2022 14:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mf1n3IfYE4tkuvBXa7TSqXP0sfdAmMoJONStgoSsKbU=; b=nT9dHr5PBsmOf6Nwqb1wUZKGG14pjyt5vxuBIjQ6vXhGK5Cxxz1/+mJZnteW4YJEay c5iNUDnCSYm2Bzga7OTZ0jCwR3b7FwgrhmNX7oavpT0S+4JsnSrMW/6PEsMrKk6BukY7 B689zD6ZdggWLQsbun6dEwBh7VwFR7bOdzpNOYnCa4HqML2RHcOWQHbSd2JQGr3VzNCd TfZ5GK6nYZ0536/R+ugtmmpBOAZQmBTUT1fncGs16igkbJ8CURmbv+3Qhp3u56nNeSq4 S0cOSnmGTcux9ZVJ1WuglTOYfASMJBjSw0s5FhfEwzxZHv1yTa0k3zzD8469zzqYoaw4 hUAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mf1n3IfYE4tkuvBXa7TSqXP0sfdAmMoJONStgoSsKbU=; b=DkySJf4JiNUmPg8cITzv8evYkNMbmux5ld+QUqrpgWlD8pUXlI+rGKkJuvJR6Wpgvy jtUsw6DWLc4znPivwsaQitr/Np2j8+FyT2lsY4ME+zvnkCpxHAe+b09g84/yqtKewXGi 36AjTUv/Y7U4kz1w5K8WDDtM8ktFXJSFFC30i/FXzfH0h8MvVrTs3Gs+hjJFa32LRHE4 IewZCo81M/Q1wONFdqGI1QlkGaLsSR9PdnAf2bgqE0PaxNs3Ng54ijkDddQC3S+JcMfH KLwZjepnh7NBJPC446brSM3GIMTtiHOInFSh8TdknEyZWb2Xc2odG4zwYaZMn8JM/BMn i87A== X-Gm-Message-State: AJIora8BSO9HiDfoSrtJYl8gpDkVi0x4sUY6xn2MToc+Av8gKcj9mGDz L0wyat7ERWWXKkK3KGIbHXYlpCL5LMw= X-Google-Smtp-Source: AGRyM1sfV0R/srlDkDKmRleXB/YmYW4bSP3vGARo0WK+83p8CRgeJ5bhPbqkDLXwEXZFBMM6Tx9BPQ== X-Received: by 2002:a05:620a:2607:b0:6af:1442:9c61 with SMTP id z7-20020a05620a260700b006af14429c61mr12420476qko.148.1656710099642; Fri, 01 Jul 2022 14:14:59 -0700 (PDT) Received: from mail-lvn-it-01.broadcom.com ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020ac842c6000000b00317ccc66971sm14584509qtm.52.2022.07.01.14.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 14:14:58 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 02/12] lpfc: Prevent buffer overflow crashes in debugfs with malformed user input Date: Fri, 1 Jul 2022 14:14:15 -0700 Message-Id: <20220701211425.2708-3-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com> References: <20220701211425.2708-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Malformed user input to debugfs results in buffer overflow crashes. Adapt input string lengths to fit within internal buffers, leaving space for NULL terminators. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_debugfs.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index 7b24c932e812..25deacc92b02 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c @@ -2607,8 +2607,8 @@ lpfc_debugfs_multixripools_write(struct file *file, const char __user *buf, struct lpfc_sli4_hdw_queue *qp; struct lpfc_multixri_pool *multixri_pool; - if (nbytes > 64) - nbytes = 64; + if (nbytes > sizeof(mybuf) - 1) + nbytes = sizeof(mybuf) - 1; memset(mybuf, 0, sizeof(mybuf)); @@ -2688,8 +2688,8 @@ lpfc_debugfs_nvmestat_write(struct file *file, const char __user *buf, if (!phba->targetport) return -ENXIO; - if (nbytes > 64) - nbytes = 64; + if (nbytes > sizeof(mybuf) - 1) + nbytes = sizeof(mybuf) - 1; memset(mybuf, 0, sizeof(mybuf)); @@ -2826,8 +2826,8 @@ lpfc_debugfs_ioktime_write(struct file *file, const char __user *buf, char mybuf[64]; char *pbuf; - if (nbytes > 64) - nbytes = 64; + if (nbytes > sizeof(mybuf) - 1) + nbytes = sizeof(mybuf) - 1; memset(mybuf, 0, sizeof(mybuf)); @@ -2954,8 +2954,8 @@ lpfc_debugfs_nvmeio_trc_write(struct file *file, const char __user *buf, char mybuf[64]; char *pbuf; - if (nbytes > 63) - nbytes = 63; + if (nbytes > sizeof(mybuf) - 1) + nbytes = sizeof(mybuf) - 1; memset(mybuf, 0, sizeof(mybuf)); @@ -3060,8 +3060,8 @@ lpfc_debugfs_hdwqstat_write(struct file *file, const char __user *buf, char *pbuf; int i; - if (nbytes > 64) - nbytes = 64; + if (nbytes > sizeof(mybuf) - 1) + nbytes = sizeof(mybuf) - 1; memset(mybuf, 0, sizeof(mybuf)); From patchwork Fri Jul 1 21:14:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12903787 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 5CFB4CCA47F for ; Fri, 1 Jul 2022 21:15:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230512AbiGAVPF (ORCPT ); Fri, 1 Jul 2022 17:15:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229971AbiGAVPD (ORCPT ); Fri, 1 Jul 2022 17:15:03 -0400 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3434E4093A for ; Fri, 1 Jul 2022 14:15:02 -0700 (PDT) Received: by mail-qk1-x72f.google.com with SMTP id b125so2697574qkg.11 for ; Fri, 01 Jul 2022 14:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aUjwU9cYCEW/eO1AO2w9M39elnV97I3v84MWbdlvAG8=; b=HX3Ih/OamRfL9i6kRJC8SZUVQmCGAAQNWQW0W/Jhem4UbzpshJBLfF2j1RWd5267LN wgTrh/KrWlP5iQfN7ssYeTJN/mPCgBy294ignigLIe1YE3faWFPEk4LidArfRw3J1Fav cEWj6c6WfdZYpIbN6zEg1YGhPblcGSNa2Q3l3BfWGooXPnegZQM2wDl0EKczi8fboF5+ IVerPWsg4nB2UXnCn6Br58aUTriIhGLM1+LumWdZjA/kPqUMAYtpxnJmTTLNGTc8Xpk4 x4K9G97pOGNFI/pEApru3sS4hdRnS0ksy+KdConO/H13rukjG6tYaWZkwTZExJfvbzRi 66NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aUjwU9cYCEW/eO1AO2w9M39elnV97I3v84MWbdlvAG8=; b=URMsBW7NhEDFL4J5tXjUTu6fsfW367nQyawqxud6k0WNWtcKLfNHyZppV3dwCrUcN6 Ouhh5tjIyFg6O74Sn3YJ9v7kEXSk31+h6d0hKG4M7LLcCzC2WSiGVO00ie0Z894pzafL Fa0JAyArVQCeR0R4mISr8IRPFrFaUeGij+EYjUZa9iAGIoMDYqsyhioOTdPfNY7ZPEvs FmZn+/qryjSrXMhevjuVG1IIWafZG8XyNV3TZNWLJujTMg414y93jGwYPqDtI4lfcNMU o/EOxaer4T4DxISfHWNE9uTPnfFIpnCjJlFGWsew1dk1sLpkeyiQeJFMla6Em5N5S66W am9w== X-Gm-Message-State: AJIora8GyNUXgHutWcAA6As/mqnL8iluJa6Qi56MM3bXokKpKOeVekld NaMEsYT5vRc3pAede3ZBra/KdT8yih4= X-Google-Smtp-Source: AGRyM1vZgdnABK1Iam9pmXPx7Gg8+ucLDjlnLl55hRdU5iWyJPr8ruKHpOXCQHpddJBg6VsihAb0gg== X-Received: by 2002:a05:620a:29d6:b0:6af:10ba:834 with SMTP id s22-20020a05620a29d600b006af10ba0834mr12280913qkp.466.1656710101131; Fri, 01 Jul 2022 14:15:01 -0700 (PDT) Received: from mail-lvn-it-01.broadcom.com ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020ac842c6000000b00317ccc66971sm14584509qtm.52.2022.07.01.14.14.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 14:15:00 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 03/12] lpfc: Set PU field when providing D_ID in XMIT_ELS_RSP64_CX iocb Date: Fri, 1 Jul 2022 14:14:16 -0700 Message-Id: <20220701211425.2708-4-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com> References: <20220701211425.2708-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org When providing a D_ID in XMIT_ELS_RSP64_CX iocb the PU field should be set to 3 to describe the parameter being passed to firmware. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_sli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 80ac3a051c19..98fef6353b60 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -10549,6 +10549,7 @@ __lpfc_sli_prep_els_req_rsp_s3(struct lpfc_iocbq *cmdiocbq, cmd->un.elsreq64.bdl.bdeSize = sizeof(struct ulp_bde64); cmd->un.genreq64.xmit_els_remoteID = did; /* DID */ cmd->ulpCommand = CMD_XMIT_ELS_RSP64_CX; + cmd->ulpPU = PARM_NPIV_DID; } cmd->ulpBdeCount = 1; cmd->ulpLe = 1; From patchwork Fri Jul 1 21:14:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12903788 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 ADFC9C433EF for ; Fri, 1 Jul 2022 21:15:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231373AbiGAVPL (ORCPT ); Fri, 1 Jul 2022 17:15:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230501AbiGAVPF (ORCPT ); Fri, 1 Jul 2022 17:15:05 -0400 Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A40D3DA7E; Fri, 1 Jul 2022 14:15:04 -0700 (PDT) Received: by mail-qk1-x72c.google.com with SMTP id k20so2737831qkj.1; Fri, 01 Jul 2022 14:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ml8XjwjvMkMwTwAoX1zwruG2L+bKOmRzQ5SRpWvEs80=; b=cBo7uHkDzRO8To6pZnDBu9WCiAuBtbjp+ZgGufT+nnBYL3cWfABAqzojz3gt34EDQ8 q5lQIkJzTahu4HG8h7zeCXxe63+npfRfi1FHJX+cG/XZGwtLS4y5V/4BUaSTslBQ8ivD VSnHqYmcEHDrE50enV569VcvXvzlMj19fxuiil3pGj9/qg5i/+2dvuq973DTFT1ax4Vs qPSAEm+eZHkPfACPlI58uOPXP+H0K5Ra3DYa5VT3KtpxNZd3SQH02Jml8ynb5yfGO6Ua uqDt+lHUUiBT7OL4XpMgRR5UfCO+ozBARN4j5o0eusDWwGPShJoOoNjZaRIsCsDyHeGs 6Z+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ml8XjwjvMkMwTwAoX1zwruG2L+bKOmRzQ5SRpWvEs80=; b=aN7Yz7QgUasZmb4BR7ZeyeoxhCyxeV5hjvv54N7iEG9ERWDxa+UibkQLe/OaU3dKVx dQmMkWxO4cQGW23ISpQR7pKfCfP9sn8SDNvcS/qJRhiZZTfsFWZ3pTFxNfbc0iOFyP/P Hym4/hVNoiuvoH/tmc6Ed5X0sKd779ekenxvvWJBMoSL12PwUc3GlM2dgmLeM6baAm0R i3gukqX2XYsYCxJ44Ud9VF58uuVu+egcRhq4Tkep4Mqvm0o7LMhn+mnVBPyLRA/gS406 lZ80tI9J7vvN+ql8Tj0ei2So4FoIY5rgntlku3RVMIWi47a+/tiGXKxyrH2cf2EB5FjA LFiw== X-Gm-Message-State: AJIora9Oumw8qXlBGZ6xG+0nk21LQegnJ5vNGKv1e+CgyhBzxMmiOoU1 fnO0ceEnfJgDaV+DuTKWGD2lDDfoZI0= X-Google-Smtp-Source: AGRyM1srUbyvR26ejSGKX/iRG1zg07WI01EJdntoPpYmWnmpeplpoqiL7Vog3UtVEqPAUsXSsdKqTQ== X-Received: by 2002:a05:620a:4412:b0:6b2:52d0:e3e2 with SMTP id v18-20020a05620a441200b006b252d0e3e2mr5133452qkp.12.1656710103484; Fri, 01 Jul 2022 14:15:03 -0700 (PDT) Received: from mail-lvn-it-01.broadcom.com ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020ac842c6000000b00317ccc66971sm14584509qtm.52.2022.07.01.14.15.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 14:15:02 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , stable@vger.kernel.org, Justin Tee Subject: [PATCH 04/12] lpfc: Remove extra atomic_inc on cmd_pending in queuecommand after VMID Date: Fri, 1 Jul 2022 14:14:17 -0700 Message-Id: <20220701211425.2708-5-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com> References: <20220701211425.2708-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org VMID introduced an extra increment of cmd_pending, causing double-counting of the I/O. The normal increment ios performed in lpfc_get_scsi_buf. Fixes: 33c79741deaf ("scsi: lpfc: vmid: Introduce VMID in I/O path") Cc: # v5.14+ Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_scsi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index ba5e4016262e..084c0f9fdc3a 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -5456,7 +5456,6 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) cur_iocbq->cmd_flag |= LPFC_IO_VMID; } } - atomic_inc(&ndlp->cmd_pending); #ifdef CONFIG_SCSI_LPFC_DEBUG_FS if (unlikely(phba->hdwqstat_on & LPFC_CHECK_SCSI_IO)) From patchwork Fri Jul 1 21:14:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12903789 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 CE9B9CCA479 for ; Fri, 1 Jul 2022 21:15:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230521AbiGAVPL (ORCPT ); Fri, 1 Jul 2022 17:15:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229971AbiGAVPG (ORCPT ); Fri, 1 Jul 2022 17:15:06 -0400 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAC2B3F325 for ; Fri, 1 Jul 2022 14:15:05 -0700 (PDT) Received: by mail-qk1-x736.google.com with SMTP id p11so2696618qkg.12 for ; Fri, 01 Jul 2022 14:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o1BoedHY+/BUpNs4HUOtEZDRirjp+gbUbvFbEaPAn1o=; b=IdKUx1f+SQiVcuHPZ1cKdqSVehKKhYLJfgmSKF2KpoeC7sOsXjtcbRa/tLj+12Fu0A j3HhWAwS6B1M7+YeFKKZjX5vU8ylxhZRPpZ4qmhFvCl6ws29JMTnLocFwu3zJZDOX+b/ 8c7fiY1n1HDoLUImFmPtkMTM3za5Fg6ivCnxW33d7HQbA48gSO0hInWgSfdFaxOteJY1 FyNxizWSK8ZGMqyEGoH32NgTkJ5thTV7ndo+FumOMO07lEc9qXKhjOCSf+3IWYB0EpQ7 87sq+sW41J9wCcVEf4/pOWNLummJksySMLegDQA1BORqtk24FIjOVUhak5XXrQGSy+R3 VwfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=o1BoedHY+/BUpNs4HUOtEZDRirjp+gbUbvFbEaPAn1o=; b=kA2lkkdYkJFj/iaKcrRDRC+ExA+zkzYRToYjp8PLZpXpwCli9lCt4JrFPn5UEHaHXY IfbkVVj/GpsonjXcxZeWelDmRBcE9R4phEg/OU+rReJEStM/7Oj8pMCa8xDcjlXyrOQj fxgcR1ejvePD2HFhKZh37FHiDMowJLzwQQXuZVAMIPJjZyNwRUUJydz99VuuZCP8QowM vIcTTJBbltFpGf8rnQCGUVvVQNzUfm4V2oIYvfv9qCO1qYdhshHnoFsn2ZBa4RPx3sD8 XlrENQ5AVLGrtaltVOaXfSkU+6/9EuyUO9E57RQjK0U/BOtm4TfIY1y73yMJ7Xq+LMZm fguQ== X-Gm-Message-State: AJIora/G0Lrw15fmfj0JGhJbnFGEzKbAjf+C4wzMGYUKwVrPHdaScVsB 4catr6bJeaGZQg+AfZoj6wMwVlGQZc0= X-Google-Smtp-Source: AGRyM1v73Ax9N4Ao5FximnN8zoRd8Tb4EfrFscgeQW+h8UdQnxQn9QADwrRus+BARCJH+iyHuGYq7g== X-Received: by 2002:a05:620a:2682:b0:67e:1a58:c947 with SMTP id c2-20020a05620a268200b0067e1a58c947mr12486888qkp.650.1656710104715; Fri, 01 Jul 2022 14:15:04 -0700 (PDT) Received: from mail-lvn-it-01.broadcom.com ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020ac842c6000000b00317ccc66971sm14584509qtm.52.2022.07.01.14.15.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 14:15:04 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 05/12] lpfc: Fix possible memory leak when failing to issue CMF WQE Date: Fri, 1 Jul 2022 14:14:18 -0700 Message-Id: <20220701211425.2708-6-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com> References: <20220701211425.2708-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org There is no corresponding free routine if lpfc_sli4_issue_wqe fails to issue the CMF WQE in lpfc_issue_cmf_sync_wqe. If ret_val is non-zero, then free the iocbq request structure. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_sli.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 98fef6353b60..81c61d377e43 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -2003,10 +2003,12 @@ lpfc_issue_cmf_sync_wqe(struct lpfc_hba *phba, u32 ms, u64 total) sync_buf->cmd_flag |= LPFC_IO_CMF; ret_val = lpfc_sli4_issue_wqe(phba, &phba->sli4_hba.hdwq[0], sync_buf); - if (ret_val) + if (ret_val) { lpfc_printf_log(phba, KERN_INFO, LOG_CGN_MGMT, "6214 Cannot issue CMF_SYNC_WQE: x%x\n", ret_val); + __lpfc_sli_release_iocbq(phba, sync_buf); + } out_unlock: spin_unlock_irqrestore(&phba->hbalock, iflags); return ret_val; From patchwork Fri Jul 1 21:14:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12903790 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 85D48C43334 for ; Fri, 1 Jul 2022 21:15:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231470AbiGAVPM (ORCPT ); Fri, 1 Jul 2022 17:15:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230527AbiGAVPI (ORCPT ); Fri, 1 Jul 2022 17:15:08 -0400 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 325264163F for ; Fri, 1 Jul 2022 14:15:07 -0700 (PDT) Received: by mail-qk1-x734.google.com with SMTP id b133so2718502qkc.6 for ; Fri, 01 Jul 2022 14:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Hkom9/V5kSNPIdNrL8sYvaqYmccrsMrCEbg+qguoL2k=; b=bHTENbV+uZcHJ3SBHU0Z/fJ1Bo3pRrqTj4OiXkHq2E6aHwwonDVfrGEJqSDC1s6zTx EVQinyBCw4ftsQTlwqbopDjwDD29RPJgSe2ejzNhqhWrsUZv0fg4dinwDU0Ip/6GPEKA IyzjfJn2F78QMdi6RyTX5+W53mRjnkELuVSXKz5Q1/hhEEQCuI7gq8/octS9P1s4z3sK Lm3HTpn0MmVDk7WHZrNKNy+tyd6FOzzE2cH7DKoVoZSbUXAZhmV4M6J/TOd4T4q0yr6c PNkYsCGvk2b0UJIdekaKdMA7Finwl6zwuo7sh7uz/WiTii8eR5fg8wT3FpiEm7sFoUoL wLmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Hkom9/V5kSNPIdNrL8sYvaqYmccrsMrCEbg+qguoL2k=; b=DiHQxVSwV3X/UwGOTxkF+fSxB7Lwr6sPMMyeyXjeiY3wJIzPPo8c4YMErOhHcl/NjU z1ZmBd3tNCTEMFeblWnC8I7YbLM66QxIDwCOcocrUVTrYTdedXfoXOO0Ua/rvVtWdajQ ajpzjzxyrVjUnj/7APN8iaKfLY6aO0PdxYGfQ0U1NDifN26ssWVDrMtx89hoyJ4HXR5A qDQXDmi2wq8OUXCq+m5iyMmBxNq1gacK/0casUPwxuLTFkernHtRjpGG2K7+VBCQcZ8t rInf89LiYuhY4NSeU71uW+85wuz8OOh+pk4pQ9Qzsw0cl13F+Z3mcSfsN7v2kwL/nAx9 603g== X-Gm-Message-State: AJIora98G6K6tevRwBYDoiOIncgT4HXIpp+O2Yoljuw91cQ3lfUQmc0i ZgaXVUeKqynVi8b+/11r+GxAf9QAiQ0= X-Google-Smtp-Source: AGRyM1sqRmIth/RHJmqrUdEfkCVpTe4U+mgLCLoJSkRx/D/1Bdtn+sXZetjmuCODpBKpXNWQZuWtMQ== X-Received: by 2002:a05:620a:414b:b0:6af:2281:6c98 with SMTP id k11-20020a05620a414b00b006af22816c98mr12171061qko.93.1656710106147; Fri, 01 Jul 2022 14:15:06 -0700 (PDT) Received: from mail-lvn-it-01.broadcom.com ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020ac842c6000000b00317ccc66971sm14584509qtm.52.2022.07.01.14.15.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 14:15:05 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 06/12] lpfc: Fix attempted FA-PWWN usage after feature disable Date: Fri, 1 Jul 2022 14:14:19 -0700 Message-Id: <20220701211425.2708-7-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com> References: <20220701211425.2708-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Disabling FA-PWWN should be effective after port reset, but in some cases it was found to be impossible to clear FA-PWWN usage without a driver reload. Clean up FA-PWWN flag management to make enable and disable of the feature more robust. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c | 6 +++++- drivers/scsi/lpfc/lpfc_sli.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 750dd1e9f2cc..7424b194d20e 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -375,6 +375,9 @@ lpfc_update_vport_wwn(struct lpfc_vport *vport) if (phba->sli_rev == LPFC_SLI_REV4 && vport->port_type == LPFC_PHYSICAL_PORT && phba->sli4_hba.fawwpn_flag & LPFC_FAWWPN_FABRIC) { + if (!(phba->sli4_hba.fawwpn_flag & LPFC_FAWWPN_CONFIG)) + phba->sli4_hba.fawwpn_flag &= + ~LPFC_FAWWPN_FABRIC; lpfc_printf_log(phba, KERN_INFO, LOG_SLI | LOG_DISCOVERY | LOG_ELS, "2701 FA-PWWN change WWPN from %llx to " @@ -9975,7 +9978,8 @@ lpfc_sli4_read_config(struct lpfc_hba *phba) "configured on\n"); phba->sli4_hba.fawwpn_flag |= LPFC_FAWWPN_CONFIG; } else { - phba->sli4_hba.fawwpn_flag = 0; + /* Clear FW configured flag, preserve driver flag */ + phba->sli4_hba.fawwpn_flag &= ~LPFC_FAWWPN_CONFIG; } phba->sli4_hba.conf_trunk = diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 81c61d377e43..71442faaa6c2 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -5265,7 +5265,8 @@ lpfc_sli_brdrestart_s4(struct lpfc_hba *phba) phba->pport->stopped = 0; phba->link_state = LPFC_INIT_START; phba->hba_flag = 0; - phba->sli4_hba.fawwpn_flag = 0; + /* Preserve FA-PWWN expectation */ + phba->sli4_hba.fawwpn_flag &= LPFC_FAWWPN_FABRIC; spin_unlock_irq(&phba->hbalock); memset(&psli->lnk_stat_offsets, 0, sizeof(psli->lnk_stat_offsets)); @@ -6054,6 +6055,10 @@ lpfc_sli4_retrieve_pport_name(struct lpfc_hba *phba) /* obtain link type and link number via READ_CONFIG */ phba->sli4_hba.lnk_info.lnk_dv = LPFC_LNK_DAT_INVAL; lpfc_sli4_read_config(phba); + + if (phba->sli4_hba.fawwpn_flag & LPFC_FAWWPN_CONFIG) + phba->sli4_hba.fawwpn_flag |= LPFC_FAWWPN_FABRIC; + if (phba->sli4_hba.lnk_info.lnk_dv == LPFC_LNK_DAT_VAL) goto retrieve_ppname; From patchwork Fri Jul 1 21:14:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12903791 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 6D855CCA47F for ; Fri, 1 Jul 2022 21:15:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231510AbiGAVPN (ORCPT ); Fri, 1 Jul 2022 17:15:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231167AbiGAVPK (ORCPT ); Fri, 1 Jul 2022 17:15:10 -0400 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CF0C4198D for ; Fri, 1 Jul 2022 14:15:09 -0700 (PDT) Received: by mail-qt1-x835.google.com with SMTP id r2so1356137qta.0 for ; Fri, 01 Jul 2022 14:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0NazchrOXVOyKdkYgas/KPBYElZtDcpxXpR9qh8Bav8=; b=MEpqHdueRoHO8ncJl6w5r7uiHpBlEV9ZxM9OcKaibpRxhoe8YWPV45NDcf0KOvTsdh 11ag8zP55toawUjWWGzqrNtdbIZyvAawm4boUYrenCQbJLzZkScehKs2J3YUg7VYZFuf AOwZTbWJKNU/j1HsdP9RGzdY8tK/10SLKzAVxDFOwnEjijf+Cs0u1b4C+SXmx3LQikjO jt4LuNQx0md1XN3vZ/PcjRepv8sGF20NLkAxubqa2kPain4m0saZ+bp8rkO8eXonP5LA ZFQfA97g4a1Hcb8cg5mXV7gV+EgSJJlcPUmMSos2SCXDn/Q/pbewckJ+xgKOeIA9yY7Q 6L9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0NazchrOXVOyKdkYgas/KPBYElZtDcpxXpR9qh8Bav8=; b=hOUANH3kx0VCR14EUCwZ4AzR+nkwrm4dAudp12zlk7E+/hFg1+6FiQA4GaNg2GQUL7 575pjbXzEJtgg4rrAu4X+94XC0FDUecxuNvHrPCdGr6JXrL8FGllnOeKvvnBaNuFx/1I BraHwQcZ64KlgKYVFlv65QOrzBCqZpFTJRI6nQC5NBLYuZAyRs+XjOA6nCrQHQN1zLCi aGkIp2yA012diXk0bK9OMPwzDSpFPEfpRkRw2tWVYubsop1F3tRJMrIvnXBESg0B0RXz i7pjp0miSftbw1dbwYR004HUO9jrD2XIcneO0P6QIhkQaqfkfDFgFo3p9tyv9Lq12L8G vfSA== X-Gm-Message-State: AJIora+OHqNcrxi8gshtY3OV+Nx4di2Pa4vSKGHeyYIuYYU0ZObxhC5O P3qFKKWv1OTq3GtVfWQX+27c8QznkHI= X-Google-Smtp-Source: AGRyM1vruTBUd6fseLMbxhbIqnRL+mRpt3CcuQGeAik/NpX/VhxRMMhlvvTNiTJLM+z5wPRIZ6mTaw== X-Received: by 2002:a05:622a:1c3:b0:317:93d8:c041 with SMTP id t3-20020a05622a01c300b0031793d8c041mr14952229qtw.101.1656710107971; Fri, 01 Jul 2022 14:15:07 -0700 (PDT) Received: from mail-lvn-it-01.broadcom.com ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020ac842c6000000b00317ccc66971sm14584509qtm.52.2022.07.01.14.15.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 14:15:07 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 07/12] lpfc: Fix lost NVME paths during LIF bounce stress test Date: Fri, 1 Jul 2022 14:14:20 -0700 Message-Id: <20220701211425.2708-8-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com> References: <20220701211425.2708-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org During a target link bounce test, the driver sees a mismatch between the NPortId and the WWPN on the node structures (ndlps) involved. When this occurs, the driver "swaps" the ndlp and new_ndlp node parameters to restore WWPN/DID uniqueness in the fc_nodes list per vport. However, the driver neglected to swap the nlp_fc4_type in the ndlp passed to lpfc_plogi_confirm_nport causing a failure to recover the NVME PLOGI/PRLI and ultimately the NVME paths. Correct confirm_nport to preserve the fc4 types from the new-ndlp when the data is moved over ot the ndlp structure. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_els.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 3fababb7c181..31fb2ee07bfa 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1790,18 +1790,20 @@ lpfc_plogi_confirm_nport(struct lpfc_hba *phba, uint32_t *prsp, /* Move this back to NPR state */ if (memcmp(&ndlp->nlp_portname, name, sizeof(struct lpfc_name)) == 0) { - /* The new_ndlp is replacing ndlp totally, so we need - * to put ndlp on UNUSED list and try to free it. + /* The ndlp doesn't have a portname yet, but does have an + * NPort ID. The new_ndlp portname matches the Rport's + * portname. Reinstantiate the new_ndlp and reset the ndlp. */ lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, "3179 PLOGI confirm NEW: %x %x\n", new_ndlp->nlp_DID, keepDID); /* Two ndlps cannot have the same did on the nodelist. - * Note: for this case, ndlp has a NULL WWPN so setting - * the nlp_fc4_type isn't required. + * The KeepDID and keep_nlp_fc4_type need to be swapped + * because ndlp is inflight with no WWPN. */ ndlp->nlp_DID = keepDID; + ndlp->nlp_fc4_type = keep_nlp_fc4_type; lpfc_nlp_set_state(vport, ndlp, keep_nlp_state); if (phba->sli_rev == LPFC_SLI_REV4 && active_rrqs_xri_bitmap) @@ -1816,9 +1818,8 @@ lpfc_plogi_confirm_nport(struct lpfc_hba *phba, uint32_t *prsp, lpfc_unreg_rpi(vport, ndlp); - /* Two ndlps cannot have the same did and the fc4 - * type must be transferred because the ndlp is in - * flight. + /* The ndlp and new_ndlp both have WWPNs but are swapping + * NPort Ids and attributes. */ ndlp->nlp_DID = keepDID; ndlp->nlp_fc4_type = keep_nlp_fc4_type; From patchwork Fri Jul 1 21:14:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12903792 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 040F5CCA479 for ; Fri, 1 Jul 2022 21:15:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231558AbiGAVPO (ORCPT ); Fri, 1 Jul 2022 17:15:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231391AbiGAVPL (ORCPT ); Fri, 1 Jul 2022 17:15:11 -0400 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E3D843AE0 for ; Fri, 1 Jul 2022 14:15:10 -0700 (PDT) Received: by mail-qk1-x72f.google.com with SMTP id b125so2697849qkg.11 for ; Fri, 01 Jul 2022 14:15:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bTctusDPUQ6dpOmwSeJoxHf3oZihoAR5MMEfys9sFmk=; b=e/A6YFHWmw5m6BVUOQO1V2bdm+yO1sZjM3zel4fek7sQycYe5/Kg4CCvVan4L2aV8M FAhKSNwKkk106sdKnTFqxhhbtSshqnLofjDL0AUJH7uJG9cLmC3M63f9v/EywAMDtJY3 VvGVB27lAv9ElDo/1pr71YhgcFix7aOuVgHF/TNuYpW5PFeKFSljhc6DQTCVVrqE7Rv9 jaQGRABK5xx096Qb3roLLOtvJZXM0wRAMNCQc7E76vwdB0tpEwXTc81eGhIJCGPTajXR hXz3CPKtymKYrLR+TRL7d7+B1b8NxkZQpVyKYyDrZzXNvCnfvUDgYUDv7rnqoXz3kWEf xCZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bTctusDPUQ6dpOmwSeJoxHf3oZihoAR5MMEfys9sFmk=; b=JQuD9quregOjfK13YCNPUltdXOmYZOyhvhUG2Cw+1ffVeetjH6Bm2yMg8Kxe1gzXwm glITUk2s/C1aiNGlXQMoRcM/vOw1V1aejYZoafK/U7n5gw1LVFHV9pDG5jkJbuPLvfvi F4Pz8WQJwbdh1/SsiXeR8f/cbkVLqHpPUsjLPvapAceFNeIShvUjbz1+hMo6XGrHPHiP W+BW5jYLVbMWZq6a9SIA3Og7U9QAIGElFpOlffdrlMkS/ukEaITK/9rcwo3OE9Eyv3lY h8mAYeEPwX1UqBawVDsaOXTgP8pZnfMFeqYuXOj6L3Cuy40fO4l4nmd8NIYVQXC8b6Mu nSCw== X-Gm-Message-State: AJIora88G5/3yVlKSKKxEGtPaja1kG4dsG4btMDhhQL7sKxP68VYA5Cx mVDwP0TuyS0I0sKlU4eEgficDicNl9o= X-Google-Smtp-Source: AGRyM1vrMTjNJSHVNe+5TmdXC5Eadp/N8R/giYYC6R9Nf6ULpj9ECEEDsDlBozYy3tRxzs6x+2645Q== X-Received: by 2002:a05:620a:10a1:b0:6ae:fecd:758f with SMTP id h1-20020a05620a10a100b006aefecd758fmr12314838qkk.412.1656710109819; Fri, 01 Jul 2022 14:15:09 -0700 (PDT) Received: from mail-lvn-it-01.broadcom.com ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020ac842c6000000b00317ccc66971sm14584509qtm.52.2022.07.01.14.15.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 14:15:08 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 08/12] lpfc: Revert RSCN_MEMENTO workaround for misbehaved configuration Date: Fri, 1 Jul 2022 14:14:21 -0700 Message-Id: <20220701211425.2708-9-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com> References: <20220701211425.2708-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The RSCN_MEMENTO logic was to workaround a target that does not register both FCP and NVME FC4 types at the same time. This caused the configuration to not produce a second RSCN for the NVME FC4 type registration in a timely manner. The intention of the RSCN_MEMENTO flag was to always signal to try NVME PRLI. However, there are other FCP-only target arrays in correctly behaved configurations that reject the NVME PRLI followed by a LOGO leading to never rediscovering the target after an issue_lip (as LOGO causes a repeat of PLOGI/PRLIs). Revert the RSCN_MEMENTO patch as it is causing correctly behaved configs to fail while it exists only to succeed on a misbehaved config. Fixes: 1045592fc968 ("scsi: lpfc: Introduce FC_RSCN_MEMENTO flag for tracking post RSCN completion") Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc.h | 1 - drivers/scsi/lpfc/lpfc_els.c | 8 ++------ drivers/scsi/lpfc/lpfc_hbadisc.c | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index da9070cdad91..212f9b962187 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -604,7 +604,6 @@ struct lpfc_vport { #define FC_VFI_REGISTERED 0x800000 /* VFI is registered */ #define FC_FDISC_COMPLETED 0x1000000/* FDISC completed */ #define FC_DISC_DELAYED 0x2000000/* Delay NPort discovery */ -#define FC_RSCN_MEMENTO 0x4000000/* RSCN cmd processed */ uint32_t ct_flags; #define FC_CT_RFF_ID 0x1 /* RFF_ID accepted by switch */ diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 31fb2ee07bfa..9371829e11b2 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1887,7 +1887,6 @@ lpfc_end_rscn(struct lpfc_vport *vport) else { spin_lock_irq(shost->host_lock); vport->fc_flag &= ~FC_RSCN_MODE; - vport->fc_flag |= FC_RSCN_MEMENTO; spin_unlock_irq(shost->host_lock); } } @@ -2435,14 +2434,13 @@ lpfc_issue_els_prli(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, u32 local_nlp_type, elscmd; /* - * If discovery was kicked off from RSCN mode, - * the FC4 types supported from a + * If we are in RSCN mode, the FC4 types supported from a * previous GFT_ID command may not be accurate. So, if we * are a NVME Initiator, always look for the possibility of * the remote NPort beng a NVME Target. */ if (phba->sli_rev == LPFC_SLI_REV4 && - vport->fc_flag & (FC_RSCN_MODE | FC_RSCN_MEMENTO) && + vport->fc_flag & FC_RSCN_MODE && vport->nvmei_support) ndlp->nlp_fc4_type |= NLP_FC4_NVME; local_nlp_type = ndlp->nlp_fc4_type; @@ -7916,7 +7914,6 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, if ((rscn_cnt < FC_MAX_HOLD_RSCN) && !(vport->fc_flag & FC_RSCN_DISCOVERY)) { vport->fc_flag |= FC_RSCN_MODE; - vport->fc_flag &= ~FC_RSCN_MEMENTO; spin_unlock_irq(shost->host_lock); if (rscn_cnt) { cmd = vport->fc_rscn_id_list[rscn_cnt-1]->virt; @@ -7966,7 +7963,6 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, spin_lock_irq(shost->host_lock); vport->fc_flag |= FC_RSCN_MODE; - vport->fc_flag &= ~FC_RSCN_MEMENTO; spin_unlock_irq(shost->host_lock); vport->fc_rscn_id_list[vport->fc_rscn_id_cnt++] = pcmd; /* Indicate we are done walking fc_rscn_id_list on this vport */ diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index fb36f26170e4..5cd838eac455 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -1354,8 +1354,7 @@ lpfc_linkup_port(struct lpfc_vport *vport) spin_lock_irq(shost->host_lock); vport->fc_flag &= ~(FC_PT2PT | FC_PT2PT_PLOGI | FC_ABORT_DISCOVERY | - FC_RSCN_MEMENTO | FC_RSCN_MODE | - FC_NLP_MORE | FC_RSCN_DISCOVERY); + FC_RSCN_MODE | FC_NLP_MORE | FC_RSCN_DISCOVERY); vport->fc_flag |= FC_NDISC_ACTIVE; vport->fc_ns_retry = 0; spin_unlock_irq(shost->host_lock); From patchwork Fri Jul 1 21:14:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12903793 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 7A28DC43334 for ; Fri, 1 Jul 2022 21:15:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231455AbiGAVPQ (ORCPT ); Fri, 1 Jul 2022 17:15:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231555AbiGAVPN (ORCPT ); Fri, 1 Jul 2022 17:15:13 -0400 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 727623DA7E for ; Fri, 1 Jul 2022 14:15:12 -0700 (PDT) Received: by mail-qk1-x736.google.com with SMTP id b24so2731201qkn.4 for ; Fri, 01 Jul 2022 14:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BAEN1wMf84UyFQgfzP7MAN43HLkGrvEb9+8MzIrRQ+Q=; b=gTEMPZzoRMllzAREtbFn5NdQ8KtsG7xHwGotVUUOX1cPu2kuksVgrGzrGhM6Fq7mzU D8KYf185zYooiiHAORSt0gg+NBRnu2QDOtadg+Xe55VEuxx3Qo5i4VTvoLAO+YP206b+ QS9YTKKn5A5A+jetnSjXE8/OImG+gFTiiuNwDngNYV7Ej800MI3WpNi5mhK8bXsk9b3d PFIhi841JUL+6pUACtkxhzWt+OOd8BFdYCyBswitnqMnAhuGsSk1s31ycYpygguoLPre fo5kGhP7FapnBUBn/dLtfVRBsb51vT8UAjpI67dKJ+aLJgQJDs2DIBcVMXu8gguzmGTW k4zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BAEN1wMf84UyFQgfzP7MAN43HLkGrvEb9+8MzIrRQ+Q=; b=xgAR0gGYxCRag0TqRgM/kH9fKnKQYtukU1a/400v0khD8gvXv456wlV7ujMK8Mr4sA nZxhnsvaLKF6HIaTRVYliQLS2DoEoETQuhSeIHLa5LP0rUqtFh9yUqDf5ZvYwjWAtsxF nb4PjSe6+YZU3Q7+YgESkm4AhXtOgz4GuUpKjvdB0PS/bQqbZj/gnZj7XweicQbkLDXk uOM9j6S0pzI5S+ZhHjxB5iSBK5/2uknJIgc15EYdCF2sHMsJKjENKcbQc8h9xcaNhSVc 2Yr8iNd+bJSHgtsdCV4LgHb5EhZJjcoQxJKkTaJSksTGankYmQcU/+Dm6BKStutQviea dz+w== X-Gm-Message-State: AJIora/UnQAfpbIdit84e3z0eghCHIklPy0dSp266US8+Ud1G4v0WtYg xTMgXSss3a1IiCSsSl2oLWzNkx5bwZ0= X-Google-Smtp-Source: AGRyM1vMrIGHNLBM0DubJ6EyuyGnKcMmUnjRkiYl8RI5HFIvYUoSZqtFP88VnACn/+yh50PNCPjG2g== X-Received: by 2002:a05:620a:410d:b0:6a7:571d:8615 with SMTP id j13-20020a05620a410d00b006a7571d8615mr12231251qko.259.1656710111378; Fri, 01 Jul 2022 14:15:11 -0700 (PDT) Received: from mail-lvn-it-01.broadcom.com ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020ac842c6000000b00317ccc66971sm14584509qtm.52.2022.07.01.14.15.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 14:15:10 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 09/12] lpfc: Refactor lpfc_nvmet_prep_abort_wqe into lpfc_sli_prep_abort_xri Date: Fri, 1 Jul 2022 14:14:22 -0700 Message-Id: <20220701211425.2708-10-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com> References: <20220701211425.2708-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org lpfc_nvmet_prep_abort_wqe has a lot of common code with lpfc_sli_prep_abort_xri. Delete lpfc_nvmet_prep_abort_wqe as the wqe can be filled out using the generic lpfc_sli_prep_abort_xri routine. Add the wqec option to lpfc_sli_prep_abort_xri for lpfc_nvmet_prep_abort_wqe. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc.h | 3 ++- drivers/scsi/lpfc/lpfc_crtn.h | 2 +- drivers/scsi/lpfc/lpfc_hw4.h | 1 - drivers/scsi/lpfc/lpfc_nvmet.c | 48 ++++------------------------------ drivers/scsi/lpfc/lpfc_sli.c | 16 +++++++----- 5 files changed, 18 insertions(+), 52 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 212f9b962187..cf4ccc54a7f2 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -986,7 +986,8 @@ struct lpfc_hba { u8 last_seq, u8 cr_cx_cmd); void (*__lpfc_sli_prep_abort_xri)(struct lpfc_iocbq *cmdiocbq, u16 ulp_context, u16 iotag, - u8 ulp_class, u16 cqid, bool ia); + u8 ulp_class, u16 cqid, bool ia, + bool wqec); /* expedite pool */ struct lpfc_epd_pool epd_pool; diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index f5d74958b664..bcad91204328 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h @@ -370,7 +370,7 @@ void lpfc_sli_prep_xmit_seq64(struct lpfc_hba *phba, u8 cr_cx_cmd); void lpfc_sli_prep_abort_xri(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocbq, u16 ulp_context, u16 iotag, u8 ulp_class, u16 cqid, - bool ia); + bool ia, bool wqec); struct lpfc_sglq *__lpfc_clear_active_sglq(struct lpfc_hba *phba, uint16_t xri); struct lpfc_sglq *__lpfc_sli_get_nvmet_sglq(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq); diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index f024415731ac..4527fef23ae7 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h @@ -4736,7 +4736,6 @@ struct create_xri_wqe { uint32_t rsvd_12_15[4]; /* word 12-15 */ }; -#define INHIBIT_ABORT 1 #define T_REQUEST_TAG 3 #define T_XRI_TAG 1 diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index c3cb7e8a2a7c..f7cfac0da9b6 100644 --- a/drivers/scsi/lpfc/lpfc_nvmet.c +++ b/drivers/scsi/lpfc/lpfc_nvmet.c @@ -3335,46 +3335,6 @@ lpfc_nvmet_unsol_issue_abort(struct lpfc_hba *phba, return 1; } -/** - * lpfc_nvmet_prep_abort_wqe - set up 'abort' work queue entry. - * @pwqeq: Pointer to command iocb. - * @xritag: Tag that uniqely identifies the local exchange resource. - * @opt: Option bits - - * bit 0 = inhibit sending abts on the link - * - * This function is called with hbalock held. - **/ -static void -lpfc_nvmet_prep_abort_wqe(struct lpfc_iocbq *pwqeq, u16 xritag, u8 opt) -{ - union lpfc_wqe128 *wqe = &pwqeq->wqe; - - /* WQEs are reused. Clear stale data and set key fields to - * zero like ia, iaab, iaar, xri_tag, and ctxt_tag. - */ - memset(wqe, 0, sizeof(*wqe)); - - if (opt & INHIBIT_ABORT) - bf_set(abort_cmd_ia, &wqe->abort_cmd, 1); - /* Abort specified xri tag, with the mask deliberately zeroed */ - bf_set(abort_cmd_criteria, &wqe->abort_cmd, T_XRI_TAG); - - bf_set(wqe_cmnd, &wqe->abort_cmd.wqe_com, CMD_ABORT_XRI_CX); - - /* Abort the I/O associated with this outstanding exchange ID. */ - wqe->abort_cmd.wqe_com.abort_tag = xritag; - - /* iotag for the wqe completion. */ - bf_set(wqe_reqtag, &wqe->abort_cmd.wqe_com, pwqeq->iotag); - - bf_set(wqe_qosd, &wqe->abort_cmd.wqe_com, 1); - bf_set(wqe_lenloc, &wqe->abort_cmd.wqe_com, LPFC_WQE_LENLOC_NONE); - - bf_set(wqe_cmd_type, &wqe->abort_cmd.wqe_com, OTHER_COMMAND); - bf_set(wqe_wqec, &wqe->abort_cmd.wqe_com, 1); - bf_set(wqe_cqid, &wqe->abort_cmd.wqe_com, LPFC_WQE_CQ_ID_DEFAULT); -} - static int lpfc_nvmet_sol_fcp_issue_abort(struct lpfc_hba *phba, struct lpfc_async_xchg_ctx *ctxp, @@ -3384,7 +3344,7 @@ lpfc_nvmet_sol_fcp_issue_abort(struct lpfc_hba *phba, struct lpfc_iocbq *abts_wqeq; struct lpfc_nodelist *ndlp; unsigned long flags; - u8 opt; + bool ia; int rc; tgtp = (struct lpfc_nvmet_tgtport *)phba->targetport->private; @@ -3424,7 +3384,7 @@ lpfc_nvmet_sol_fcp_issue_abort(struct lpfc_hba *phba, } abts_wqeq = ctxp->abort_wqeq; ctxp->state = LPFC_NVME_STE_ABORT; - opt = (ctxp->flag & LPFC_NVME_ABTS_RCV) ? INHIBIT_ABORT : 0; + ia = (ctxp->flag & LPFC_NVME_ABTS_RCV) ? true : false; spin_unlock_irqrestore(&ctxp->ctxlock, flags); /* Announce entry to new IO submit field. */ @@ -3470,7 +3430,9 @@ lpfc_nvmet_sol_fcp_issue_abort(struct lpfc_hba *phba, /* Ready - mark outstanding as aborted by driver. */ abts_wqeq->cmd_flag |= LPFC_DRIVER_ABORTED; - lpfc_nvmet_prep_abort_wqe(abts_wqeq, ctxp->wqeq->sli4_xritag, opt); + lpfc_sli_prep_abort_xri(phba, abts_wqeq, ctxp->wqeq->sli4_xritag, + abts_wqeq->iotag, CLASS3, + LPFC_WQE_CQ_ID_DEFAULT, ia, true); /* ABTS WQE must go to the same WQ as the WQE to be aborted */ abts_wqeq->hba_wqidx = ctxp->wqeq->hba_wqidx; diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 71442faaa6c2..3aa9e5c85aa5 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -10863,7 +10863,8 @@ lpfc_sli_prep_xmit_seq64(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocbq, static void __lpfc_sli_prep_abort_xri_s3(struct lpfc_iocbq *cmdiocbq, u16 ulp_context, - u16 iotag, u8 ulp_class, u16 cqid, bool ia) + u16 iotag, u8 ulp_class, u16 cqid, bool ia, + bool wqec) { IOCB_t *icmd = NULL; @@ -10892,7 +10893,8 @@ __lpfc_sli_prep_abort_xri_s3(struct lpfc_iocbq *cmdiocbq, u16 ulp_context, static void __lpfc_sli_prep_abort_xri_s4(struct lpfc_iocbq *cmdiocbq, u16 ulp_context, - u16 iotag, u8 ulp_class, u16 cqid, bool ia) + u16 iotag, u8 ulp_class, u16 cqid, bool ia, + bool wqec) { union lpfc_wqe128 *wqe; @@ -10919,6 +10921,8 @@ __lpfc_sli_prep_abort_xri_s4(struct lpfc_iocbq *cmdiocbq, u16 ulp_context, bf_set(wqe_qosd, &wqe->abort_cmd.wqe_com, 1); /* Word 11 */ + if (wqec) + bf_set(wqe_wqec, &wqe->abort_cmd.wqe_com, 1); bf_set(wqe_cqid, &wqe->abort_cmd.wqe_com, cqid); bf_set(wqe_cmd_type, &wqe->abort_cmd.wqe_com, OTHER_COMMAND); } @@ -10926,10 +10930,10 @@ __lpfc_sli_prep_abort_xri_s4(struct lpfc_iocbq *cmdiocbq, u16 ulp_context, void lpfc_sli_prep_abort_xri(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocbq, u16 ulp_context, u16 iotag, u8 ulp_class, u16 cqid, - bool ia) + bool ia, bool wqec) { phba->__lpfc_sli_prep_abort_xri(cmdiocbq, ulp_context, iotag, ulp_class, - cqid, ia); + cqid, ia, wqec); } /** @@ -12207,7 +12211,7 @@ lpfc_sli_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, lpfc_sli_prep_abort_xri(phba, abtsiocbp, ulp_context, iotag, cmdiocb->iocb.ulpClass, - LPFC_WQE_CQ_ID_DEFAULT, ia); + LPFC_WQE_CQ_ID_DEFAULT, ia, false); abtsiocbp->vport = vport; @@ -12667,7 +12671,7 @@ lpfc_sli_abort_taskmgmt(struct lpfc_vport *vport, struct lpfc_sli_ring *pring, lpfc_sli_prep_abort_xri(phba, abtsiocbq, ulp_context, iotag, iocbq->iocb.ulpClass, cqid, - ia); + ia, false); abtsiocbq->vport = vport; From patchwork Fri Jul 1 21:14:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12903794 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 E0224C43334 for ; Fri, 1 Jul 2022 21:15:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231851AbiGAVPX (ORCPT ); Fri, 1 Jul 2022 17:15:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231382AbiGAVPP (ORCPT ); Fri, 1 Jul 2022 17:15:15 -0400 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE0F63F325 for ; Fri, 1 Jul 2022 14:15:13 -0700 (PDT) Received: by mail-qk1-x72f.google.com with SMTP id b125so2697979qkg.11 for ; Fri, 01 Jul 2022 14:15:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CXe+kAvhqcJNryfETgqBvKY9WtxF+2cqHKXIOsEXtA0=; b=asHpVEGkiVJ3aDUYCkOwFb+Hh5qWPpO5R2nTyLwQgVmDQHspQ/6/OvVVwz1bEaCL7c 1mp/bYgLoimPQxGnBoD8fHrado9Vamyj/SwBs3pdzt2xgeTTDzthzixJgtAZL5nOrTlU 4lDUTxUyElMXhtk7k+63+FyxocWYTMSLLIfQtkxYG2L6QKJLWet0Ydzx92c0CkrpV0vs jqa/HfOtDzrDsD5UoPp1VcKFZXJn9GPp4LXdfEd5jfB0EpWyeb9A2VQASiEGZYX0Tzkt BYKD+sX+sufHQK+L0Lqmreplw/9Zuax7m2KVIc6eUv0wWMTFlkI+RLLVhgJr7puxNjJa Hk2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CXe+kAvhqcJNryfETgqBvKY9WtxF+2cqHKXIOsEXtA0=; b=cEPlCjWXbAn3VzXqJR1pVZLLr9fQNqrhiP58dNpvuud7iPdWORqFddRqV37/Q6x5Dp PtGT/vRVwDOqLIARUKNBs0yTmLQsiK6j5ujWrfq5Jt/KFPc+T5Z/vgoTtgftp4B4xF9o satI9XJNAES5TVEAlKANTq/xyEBw6HXpb7S+aoK41k3oMpkJ9kE6tKpf1YDlwaniObaD 2L3+lQLZZUOXXWD1TIEcYSrSS9voYV9craNZeZLG9dZMgTsBO6vK6yNTw8YmlxumPBf6 ZZ/PCvFkKfakwvRw0LTq9lh9bZY1XvobKPx0dPPW6yYcnIaH8dEPdkX3D6YUdgp++pPJ wH0g== X-Gm-Message-State: AJIora+/Xzm0GxLgJqLb/Bfj5sfTZ0t2XnreyVhd6MNzU179kSnc9QUu JisHoipCNEfz8EITqR7mKgwu+u97+B0= X-Google-Smtp-Source: AGRyM1vJ+t1NyPaxcMXaFNzkqZt2SFfK0RW4XqMPQdB7nfQkbm8X61x2blMaKCsAPYvgvEfmnjwLbw== X-Received: by 2002:a05:620a:4055:b0:6b0:151f:7281 with SMTP id i21-20020a05620a405500b006b0151f7281mr11977187qko.601.1656710112870; Fri, 01 Jul 2022 14:15:12 -0700 (PDT) Received: from mail-lvn-it-01.broadcom.com ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020ac842c6000000b00317ccc66971sm14584509qtm.52.2022.07.01.14.15.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 14:15:12 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 10/12] lpfc: Remove Menlo/Hornet related code Date: Fri, 1 Jul 2022 14:14:23 -0700 Message-Id: <20220701211425.2708-11-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com> References: <20220701211425.2708-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The Menlo/Hornet adapter was never released to the field. As such, driver code specific to the adapter is unnecessary and should be removed. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc.h | 7 - drivers/scsi/lpfc/lpfc_attr.c | 27 +-- drivers/scsi/lpfc/lpfc_bsg.c | 324 ------------------------------- drivers/scsi/lpfc/lpfc_bsg.h | 12 -- drivers/scsi/lpfc/lpfc_els.c | 9 - drivers/scsi/lpfc/lpfc_hbadisc.c | 57 +----- drivers/scsi/lpfc/lpfc_hw.h | 10 - drivers/scsi/lpfc/lpfc_ids.h | 2 - drivers/scsi/lpfc/lpfc_init.c | 13 -- drivers/scsi/lpfc/lpfc_sli.c | 10 - drivers/scsi/lpfc/lpfc_sli.h | 1 - 11 files changed, 7 insertions(+), 465 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index cf4ccc54a7f2..e6a083d098a1 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -48,9 +48,6 @@ struct lpfc_sli2_slim; the NameServer before giving up. */ #define LPFC_CMD_PER_LUN 3 /* max outstanding cmds per lun */ #define LPFC_DEFAULT_SG_SEG_CNT 64 /* sg element count per scsi cmnd */ -#define LPFC_DEFAULT_MENLO_SG_SEG_CNT 128 /* sg element count per scsi - cmnd for menlo needs nearly twice as for firmware - downloads using bsg */ #define LPFC_DEFAULT_XPSGL_SIZE 256 #define LPFC_MAX_SG_TABLESIZE 0xffff @@ -1439,8 +1436,6 @@ struct lpfc_hba { */ #define QUE_BUFTAG_BIT (1<<31) uint32_t buffer_tag_count; - int wait_4_mlo_maint_flg; - wait_queue_head_t wait_4_mlo_m_q; /* data structure used for latency data collection */ #define LPFC_NO_BUCKET 0 #define LPFC_LINEAR_BUCKET 1 @@ -1475,8 +1470,6 @@ struct lpfc_hba { /* RAS Support */ struct lpfc_ras_fwlog ras_fwlog; - uint8_t menlo_flag; /* menlo generic flags */ -#define HBA_MENLO_SUPPORT 0x1 /* HBA supports menlo commands */ uint32_t iocb_cnt; uint32_t iocb_max; atomic_t sdev_cnt; diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 3caaa7c4af48..09cf2cd0ae60 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -921,25 +921,6 @@ lpfc_programtype_show(struct device *dev, struct device_attribute *attr, return scnprintf(buf, PAGE_SIZE, "%s\n", phba->ProgramType); } -/** - * lpfc_mlomgmt_show - Return the Menlo Maintenance sli flag - * @dev: class converted to a Scsi_host structure. - * @attr: device attribute, not used. - * @buf: on return contains the Menlo Maintenance sli flag. - * - * Returns: size of formatted string. - **/ -static ssize_t -lpfc_mlomgmt_show(struct device *dev, struct device_attribute *attr, char *buf) -{ - struct Scsi_Host *shost = class_to_shost(dev); - struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata; - struct lpfc_hba *phba = vport->phba; - - return scnprintf(buf, PAGE_SIZE, "%d\n", - (phba->sli.sli_flag & LPFC_MENLO_MAINT)); -} - /** * lpfc_vportnum_show - Return the port number in ascii of the hba * @dev: class converted to a Scsi_host structure. @@ -1109,10 +1090,7 @@ lpfc_link_state_show(struct device *dev, struct device_attribute *attr, "Unknown\n"); break; } - if (phba->sli.sli_flag & LPFC_MENLO_MAINT) - len += scnprintf(buf + len, PAGE_SIZE-len, - " Menlo Maint Mode\n"); - else if (phba->fc_topology == LPFC_TOPOLOGY_LOOP) { + if (phba->fc_topology == LPFC_TOPOLOGY_LOOP) { if (vport->fc_flag & FC_PUBLIC_LOOP) len += scnprintf(buf + len, PAGE_SIZE-len, " Public Loop\n"); @@ -2827,7 +2805,6 @@ static DEVICE_ATTR(option_rom_version, S_IRUGO, lpfc_option_rom_version_show, NULL); static DEVICE_ATTR(num_discovered_ports, S_IRUGO, lpfc_num_discovered_ports_show, NULL); -static DEVICE_ATTR(menlo_mgmt_mode, S_IRUGO, lpfc_mlomgmt_show, NULL); static DEVICE_ATTR(nport_evt_cnt, S_IRUGO, lpfc_nport_evt_cnt_show, NULL); static DEVICE_ATTR_RO(lpfc_drvr_version); static DEVICE_ATTR_RO(lpfc_enable_fip); @@ -6220,7 +6197,6 @@ static struct attribute *lpfc_hba_attrs[] = { &dev_attr_option_rom_version.attr, &dev_attr_link_state.attr, &dev_attr_num_discovered_ports.attr, - &dev_attr_menlo_mgmt_mode.attr, &dev_attr_lpfc_drvr_version.attr, &dev_attr_lpfc_enable_fip.attr, &dev_attr_lpfc_temp_sensor.attr, @@ -7396,7 +7372,6 @@ lpfc_get_hba_function_mode(struct lpfc_hba *phba) case PCI_DEVICE_ID_LANCER_FCOE: case PCI_DEVICE_ID_LANCER_FCOE_VF: case PCI_DEVICE_ID_ZEPHYR_DCSP: - case PCI_DEVICE_ID_HORNET: case PCI_DEVICE_ID_TIGERSHARK: case PCI_DEVICE_ID_TOMCAT: phba->hba_flag |= HBA_FCOE_MODE; diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 676e7d54b97a..9be3bb01a8ec 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -88,17 +88,9 @@ struct lpfc_bsg_mbox { uint32_t outExtWLen; /* from app */ }; -#define MENLO_DID 0x0000FC0E - -struct lpfc_bsg_menlo { - struct lpfc_iocbq *cmdiocbq; - struct lpfc_dmabuf *rmp; -}; - #define TYPE_EVT 1 #define TYPE_IOCB 2 #define TYPE_MBOX 3 -#define TYPE_MENLO 4 struct bsg_job_data { uint32_t type; struct bsg_job *set_job; /* job waiting for this iocb to finish */ @@ -106,7 +98,6 @@ struct bsg_job_data { struct lpfc_bsg_event *evt; struct lpfc_bsg_iocb iocb; struct lpfc_bsg_mbox mbox; - struct lpfc_bsg_menlo menlo; } context_un; }; @@ -3502,15 +3493,6 @@ static int lpfc_bsg_check_cmd_access(struct lpfc_hba *phba, "1226 mbox: set_variable 0x%x, 0x%x\n", mb->un.varWords[0], mb->un.varWords[1]); - if ((mb->un.varWords[0] == SETVAR_MLOMNT) - && (mb->un.varWords[1] == 1)) { - phba->wait_4_mlo_maint_flg = 1; - } else if (mb->un.varWords[0] == SETVAR_MLORST) { - spin_lock_irq(&phba->hbalock); - phba->link_flag &= ~LS_LOOPBACK_MODE; - spin_unlock_irq(&phba->hbalock); - phba->fc_topology = LPFC_TOPOLOGY_PT_PT; - } break; case MBX_READ_SPARM64: case MBX_REG_LOGIN: @@ -4992,283 +4974,6 @@ lpfc_bsg_mbox_cmd(struct bsg_job *job) return rc; } -/** - * lpfc_bsg_menlo_cmd_cmp - lpfc_menlo_cmd completion handler - * @phba: Pointer to HBA context object. - * @cmdiocbq: Pointer to command iocb. - * @rspiocbq: Pointer to response iocb. - * - * This function is the completion handler for iocbs issued using - * lpfc_menlo_cmd function. This function is called by the - * ring event handler function without any lock held. This function - * can be called from both worker thread context and interrupt - * context. This function also can be called from another thread which - * cleans up the SLI layer objects. - * This function copies the contents of the response iocb to the - * response iocb memory object provided by the caller of - * lpfc_sli_issue_iocb_wait and then wakes up the thread which - * sleeps for the iocb completion. - **/ -static void -lpfc_bsg_menlo_cmd_cmp(struct lpfc_hba *phba, - struct lpfc_iocbq *cmdiocbq, - struct lpfc_iocbq *rspiocbq) -{ - struct bsg_job_data *dd_data; - struct bsg_job *job; - struct fc_bsg_reply *bsg_reply; - IOCB_t *rsp; - struct lpfc_dmabuf *bmp, *cmp, *rmp; - struct lpfc_bsg_menlo *menlo; - unsigned long flags; - struct menlo_response *menlo_resp; - unsigned int rsp_size; - int rc = 0; - - dd_data = cmdiocbq->context_un.dd_data; - cmp = cmdiocbq->cmd_dmabuf; - bmp = cmdiocbq->bpl_dmabuf; - menlo = &dd_data->context_un.menlo; - rmp = menlo->rmp; - rsp = &rspiocbq->iocb; - - /* Determine if job has been aborted */ - spin_lock_irqsave(&phba->ct_ev_lock, flags); - job = dd_data->set_job; - if (job) { - bsg_reply = job->reply; - /* Prevent timeout handling from trying to abort job */ - job->dd_data = NULL; - } - spin_unlock_irqrestore(&phba->ct_ev_lock, flags); - - /* Copy the job data or set the failing status for the job */ - - if (job) { - /* always return the xri, this would be used in the case - * of a menlo download to allow the data to be sent as a - * continuation of the exchange. - */ - - menlo_resp = (struct menlo_response *) - bsg_reply->reply_data.vendor_reply.vendor_rsp; - menlo_resp->xri = rsp->ulpContext; - if (rsp->ulpStatus) { - if (rsp->ulpStatus == IOSTAT_LOCAL_REJECT) { - switch (rsp->un.ulpWord[4] & IOERR_PARAM_MASK) { - case IOERR_SEQUENCE_TIMEOUT: - rc = -ETIMEDOUT; - break; - case IOERR_INVALID_RPI: - rc = -EFAULT; - break; - default: - rc = -EACCES; - break; - } - } else { - rc = -EACCES; - } - } else { - rsp_size = rsp->un.genreq64.bdl.bdeSize; - bsg_reply->reply_payload_rcv_len = - lpfc_bsg_copy_data(rmp, &job->reply_payload, - rsp_size, 0); - } - - } - - lpfc_sli_release_iocbq(phba, cmdiocbq); - lpfc_free_bsg_buffers(phba, cmp); - lpfc_free_bsg_buffers(phba, rmp); - lpfc_mbuf_free(phba, bmp->virt, bmp->phys); - kfree(bmp); - kfree(dd_data); - - /* Complete the job if active */ - - if (job) { - bsg_reply->result = rc; - bsg_job_done(job, bsg_reply->result, - bsg_reply->reply_payload_rcv_len); - } - - return; -} - -/** - * lpfc_menlo_cmd - send an ioctl for menlo hardware - * @job: fc_bsg_job to handle - * - * This function issues a gen request 64 CR ioctl for all menlo cmd requests, - * all the command completions will return the xri for the command. - * For menlo data requests a gen request 64 CX is used to continue the exchange - * supplied in the menlo request header xri field. - **/ -static int -lpfc_menlo_cmd(struct bsg_job *job) -{ - struct lpfc_vport *vport = shost_priv(fc_bsg_to_shost(job)); - struct fc_bsg_request *bsg_request = job->request; - struct fc_bsg_reply *bsg_reply = job->reply; - struct lpfc_hba *phba = vport->phba; - struct lpfc_iocbq *cmdiocbq; - IOCB_t *cmd; - int rc = 0; - struct menlo_command *menlo_cmd; - struct lpfc_dmabuf *bmp = NULL, *cmp = NULL, *rmp = NULL; - int request_nseg; - int reply_nseg; - struct bsg_job_data *dd_data; - struct ulp_bde64 *bpl = NULL; - - /* in case no data is returned return just the return code */ - bsg_reply->reply_payload_rcv_len = 0; - - if (job->request_len < - sizeof(struct fc_bsg_request) + - sizeof(struct menlo_command)) { - lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC, - "2784 Received MENLO_CMD request below " - "minimum size\n"); - rc = -ERANGE; - goto no_dd_data; - } - - if (job->reply_len < sizeof(*bsg_reply) + - sizeof(struct menlo_response)) { - lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC, - "2785 Received MENLO_CMD reply below " - "minimum size\n"); - rc = -ERANGE; - goto no_dd_data; - } - - if (!(phba->menlo_flag & HBA_MENLO_SUPPORT)) { - lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC, - "2786 Adapter does not support menlo " - "commands\n"); - rc = -EPERM; - goto no_dd_data; - } - - menlo_cmd = (struct menlo_command *) - bsg_request->rqst_data.h_vendor.vendor_cmd; - - /* allocate our bsg tracking structure */ - dd_data = kmalloc(sizeof(struct bsg_job_data), GFP_KERNEL); - if (!dd_data) { - lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC, - "2787 Failed allocation of dd_data\n"); - rc = -ENOMEM; - goto no_dd_data; - } - - bmp = kmalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); - if (!bmp) { - rc = -ENOMEM; - goto free_dd; - } - - bmp->virt = lpfc_mbuf_alloc(phba, 0, &bmp->phys); - if (!bmp->virt) { - rc = -ENOMEM; - goto free_bmp; - } - - INIT_LIST_HEAD(&bmp->list); - - bpl = (struct ulp_bde64 *)bmp->virt; - request_nseg = LPFC_BPL_SIZE/sizeof(struct ulp_bde64); - cmp = lpfc_alloc_bsg_buffers(phba, job->request_payload.payload_len, - 1, bpl, &request_nseg); - if (!cmp) { - rc = -ENOMEM; - goto free_bmp; - } - lpfc_bsg_copy_data(cmp, &job->request_payload, - job->request_payload.payload_len, 1); - - bpl += request_nseg; - reply_nseg = LPFC_BPL_SIZE/sizeof(struct ulp_bde64) - request_nseg; - rmp = lpfc_alloc_bsg_buffers(phba, job->reply_payload.payload_len, 0, - bpl, &reply_nseg); - if (!rmp) { - rc = -ENOMEM; - goto free_cmp; - } - - cmdiocbq = lpfc_sli_get_iocbq(phba); - if (!cmdiocbq) { - rc = -ENOMEM; - goto free_rmp; - } - - cmd = &cmdiocbq->iocb; - cmd->un.genreq64.bdl.ulpIoTag32 = 0; - cmd->un.genreq64.bdl.addrHigh = putPaddrHigh(bmp->phys); - cmd->un.genreq64.bdl.addrLow = putPaddrLow(bmp->phys); - cmd->un.genreq64.bdl.bdeFlags = BUFF_TYPE_BLP_64; - cmd->un.genreq64.bdl.bdeSize = - (request_nseg + reply_nseg) * sizeof(struct ulp_bde64); - cmd->un.genreq64.w5.hcsw.Fctl = (SI | LA); - cmd->un.genreq64.w5.hcsw.Dfctl = 0; - cmd->un.genreq64.w5.hcsw.Rctl = FC_RCTL_DD_UNSOL_CMD; - cmd->un.genreq64.w5.hcsw.Type = MENLO_TRANSPORT_TYPE; /* 0xfe */ - cmd->ulpBdeCount = 1; - cmd->ulpClass = CLASS3; - cmd->ulpOwner = OWN_CHIP; - cmd->ulpLe = 1; /* Limited Edition */ - cmdiocbq->cmd_flag |= LPFC_IO_LIBDFC; - cmdiocbq->vport = phba->pport; - /* We want the firmware to timeout before we do */ - cmd->ulpTimeout = MENLO_TIMEOUT - 5; - cmdiocbq->cmd_cmpl = lpfc_bsg_menlo_cmd_cmp; - cmdiocbq->context_un.dd_data = dd_data; - cmdiocbq->cmd_dmabuf = cmp; - cmdiocbq->bpl_dmabuf = bmp; - if (menlo_cmd->cmd == LPFC_BSG_VENDOR_MENLO_CMD) { - cmd->ulpCommand = CMD_GEN_REQUEST64_CR; - cmd->ulpPU = MENLO_PU; /* 3 */ - cmd->un.ulpWord[4] = MENLO_DID; /* 0x0000FC0E */ - cmd->ulpContext = MENLO_CONTEXT; /* 0 */ - } else { - cmd->ulpCommand = CMD_GEN_REQUEST64_CX; - cmd->ulpPU = 1; - cmd->un.ulpWord[4] = 0; - cmd->ulpContext = menlo_cmd->xri; - } - - dd_data->type = TYPE_MENLO; - dd_data->set_job = job; - dd_data->context_un.menlo.cmdiocbq = cmdiocbq; - dd_data->context_un.menlo.rmp = rmp; - job->dd_data = dd_data; - - rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, cmdiocbq, - MENLO_TIMEOUT - 5); - if (rc == IOCB_SUCCESS) - return 0; /* done for now */ - - lpfc_sli_release_iocbq(phba, cmdiocbq); - -free_rmp: - lpfc_free_bsg_buffers(phba, rmp); -free_cmp: - lpfc_free_bsg_buffers(phba, cmp); -free_bmp: - if (bmp->virt) - lpfc_mbuf_free(phba, bmp->virt, bmp->phys); - kfree(bmp); -free_dd: - kfree(dd_data); -no_dd_data: - /* make error code available to userspace */ - bsg_reply->result = rc; - job->dd_data = NULL; - return rc; -} - static int lpfc_forced_link_speed(struct bsg_job *job) { @@ -5823,10 +5528,6 @@ lpfc_bsg_hst_vendor(struct bsg_job *job) case LPFC_BSG_VENDOR_MBOX: rc = lpfc_bsg_mbox_cmd(job); break; - case LPFC_BSG_VENDOR_MENLO_CMD: - case LPFC_BSG_VENDOR_MENLO_DATA: - rc = lpfc_menlo_cmd(job); - break; case LPFC_BSG_VENDOR_FORCED_LINK_SPEED: rc = lpfc_forced_link_speed(job); break; @@ -5979,31 +5680,6 @@ lpfc_bsg_timeout(struct bsg_job *job) phba->mbox_ext_buf_ctx.state = LPFC_BSG_MBOX_ABTS; spin_unlock_irqrestore(&phba->ct_ev_lock, flags); break; - case TYPE_MENLO: - /* Check to see if IOCB was issued to the port or not. If not, - * remove it from the txq queue and call cancel iocbs. - * Otherwise, call abort iotag. - */ - cmdiocb = dd_data->context_un.menlo.cmdiocbq; - spin_unlock_irqrestore(&phba->ct_ev_lock, flags); - - spin_lock_irqsave(&phba->hbalock, flags); - list_for_each_entry_safe(check_iocb, next_iocb, &pring->txq, - list) { - if (check_iocb == cmdiocb) { - list_move_tail(&check_iocb->list, &completions); - break; - } - } - if (list_empty(&completions)) - lpfc_sli_issue_abort_iotag(phba, pring, cmdiocb, NULL); - spin_unlock_irqrestore(&phba->hbalock, flags); - if (!list_empty(&completions)) { - lpfc_sli_cancel_iocbs(phba, &completions, - IOSTAT_LOCAL_REJECT, - IOERR_SLI_ABORTED); - } - break; default: spin_unlock_irqrestore(&phba->ct_ev_lock, flags); break; diff --git a/drivers/scsi/lpfc/lpfc_bsg.h b/drivers/scsi/lpfc/lpfc_bsg.h index 749d6c43cfce..8b1b2b1bc448 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.h +++ b/drivers/scsi/lpfc/lpfc_bsg.h @@ -33,8 +33,6 @@ #define LPFC_BSG_VENDOR_DIAG_RUN_LOOPBACK 5 #define LPFC_BSG_VENDOR_GET_MGMT_REV 6 #define LPFC_BSG_VENDOR_MBOX 7 -#define LPFC_BSG_VENDOR_MENLO_CMD 8 -#define LPFC_BSG_VENDOR_MENLO_DATA 9 #define LPFC_BSG_VENDOR_DIAG_MODE_END 10 #define LPFC_BSG_VENDOR_LINK_DIAG_TEST 11 #define LPFC_BSG_VENDOR_FORCED_LINK_SPEED 14 @@ -131,16 +129,6 @@ struct dfc_mbox_req { uint32_t extSeqNum; }; -/* Used for menlo command or menlo data. The xri is only used for menlo data */ -struct menlo_command { - uint32_t cmd; - uint32_t xri; -}; - -struct menlo_response { - uint32_t xri; /* return the xri of the iocb exchange */ -}; - /* * macros and data structures for handling sli-config mailbox command * pass-through support, this header file is shared between user and diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 9371829e11b2..9e69de9eb992 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -4570,15 +4570,6 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, case IOSTAT_LOCAL_REJECT: switch ((ulp_word4 & IOERR_PARAM_MASK)) { case IOERR_LOOP_OPEN_FAILURE: - if (cmd == ELS_CMD_FLOGI) { - if (PCI_DEVICE_ID_HORNET == - phba->pcidev->device) { - phba->fc_topology = LPFC_TOPOLOGY_LOOP; - phba->pport->fc_myDID = 0; - phba->alpa_map[0] = 0; - phba->alpa_map[1] = 0; - } - } if (cmd == ELS_CMD_PLOGI && cmdiocb->retry == 0) delay = 1000; retry = 1; diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 5cd838eac455..2645def612e6 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -3762,18 +3762,8 @@ lpfc_mbx_cmpl_read_topology(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) } phba->fc_eventTag = la->eventTag; - if (phba->sli_rev < LPFC_SLI_REV4) { - spin_lock_irqsave(&phba->hbalock, iflags); - if (bf_get(lpfc_mbx_read_top_mm, la)) - phba->sli.sli_flag |= LPFC_MENLO_MAINT; - else - phba->sli.sli_flag &= ~LPFC_MENLO_MAINT; - spin_unlock_irqrestore(&phba->hbalock, iflags); - } - phba->link_events++; - if ((attn_type == LPFC_ATT_LINK_UP) && - !(phba->sli.sli_flag & LPFC_MENLO_MAINT)) { + if (attn_type == LPFC_ATT_LINK_UP) { phba->fc_stat.LinkUp++; if (phba->link_flag & LS_LOOPBACK_MODE) { lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, @@ -3787,15 +3777,13 @@ lpfc_mbx_cmpl_read_topology(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) } else { lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, "1303 Link Up Event x%x received " - "Data: x%x x%x x%x x%x x%x x%x %d\n", + "Data: x%x x%x x%x x%x x%x\n", la->eventTag, phba->fc_eventTag, bf_get(lpfc_mbx_read_top_alpa_granted, la), bf_get(lpfc_mbx_read_top_link_spd, la), phba->alpa_map[0], - bf_get(lpfc_mbx_read_top_mm, la), - bf_get(lpfc_mbx_read_top_fa, la), - phba->wait_4_mlo_maint_flg); + bf_get(lpfc_mbx_read_top_fa, la)); } lpfc_mbx_process_link_up(phba, la); @@ -3815,58 +3803,25 @@ lpfc_mbx_cmpl_read_topology(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) else if (attn_type == LPFC_ATT_UNEXP_WWPN) lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, "1313 Link Down Unexpected FA WWPN Event x%x " - "received Data: x%x x%x x%x x%x x%x\n", + "received Data: x%x x%x x%x x%x\n", la->eventTag, phba->fc_eventTag, phba->pport->port_state, vport->fc_flag, - bf_get(lpfc_mbx_read_top_mm, la), bf_get(lpfc_mbx_read_top_fa, la)); else lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, "1305 Link Down Event x%x received " - "Data: x%x x%x x%x x%x x%x\n", + "Data: x%x x%x x%x x%x\n", la->eventTag, phba->fc_eventTag, phba->pport->port_state, vport->fc_flag, - bf_get(lpfc_mbx_read_top_mm, la), bf_get(lpfc_mbx_read_top_fa, la)); lpfc_mbx_issue_link_down(phba); } - if (phba->sli.sli_flag & LPFC_MENLO_MAINT && - attn_type == LPFC_ATT_LINK_UP) { - if (phba->link_state != LPFC_LINK_DOWN) { - phba->fc_stat.LinkDown++; - lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, - "1312 Link Down Event x%x received " - "Data: x%x x%x x%x\n", - la->eventTag, phba->fc_eventTag, - phba->pport->port_state, vport->fc_flag); - lpfc_mbx_issue_link_down(phba); - } else - lpfc_enable_la(phba); - - lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, - "1310 Menlo Maint Mode Link up Event x%x rcvd " - "Data: x%x x%x x%x\n", - la->eventTag, phba->fc_eventTag, - phba->pport->port_state, vport->fc_flag); - /* - * The cmnd that triggered this will be waiting for this - * signal. - */ - /* WAKEUP for MENLO_SET_MODE or MENLO_RESET command. */ - if (phba->wait_4_mlo_maint_flg) { - phba->wait_4_mlo_maint_flg = 0; - wake_up_interruptible(&phba->wait_4_mlo_m_q); - } - } if ((phba->sli_rev < LPFC_SLI_REV4) && - bf_get(lpfc_mbx_read_top_fa, la)) { - if (phba->sli.sli_flag & LPFC_MENLO_MAINT) - lpfc_issue_clear_la(phba, vport); + bf_get(lpfc_mbx_read_top_fa, la)) lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT, "1311 fa %d\n", bf_get(lpfc_mbx_read_top_fa, la)); - } lpfc_mbx_cmpl_read_topology_free_mbuf: lpfc_mbox_rsrc_cleanup(phba, pmb, MBOX_THD_UNLOCKED); diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index 7b8cf678abb5..071983e2cdfe 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h @@ -1728,7 +1728,6 @@ struct lpfc_fdmi_reg_portattr { #define PCI_DEVICE_ID_HELIOS_SCSP 0xfd11 #define PCI_DEVICE_ID_HELIOS_DCSP 0xfd12 #define PCI_DEVICE_ID_ZEPHYR 0xfe00 -#define PCI_DEVICE_ID_HORNET 0xfe05 #define PCI_DEVICE_ID_ZEPHYR_SCSP 0xfe11 #define PCI_DEVICE_ID_ZEPHYR_DCSP 0xfe12 #define PCI_VENDOR_ID_SERVERENGINE 0x19a2 @@ -1773,7 +1772,6 @@ struct lpfc_fdmi_reg_portattr { #define ZEPHYR_JEDEC_ID 0x0577 #define VIPER_JEDEC_ID 0x4838 #define SATURN_JEDEC_ID 0x1004 -#define HORNET_JDEC_ID 0x2057706D #define JEDEC_ID_MASK 0x0FFFF000 #define JEDEC_ID_SHIFT 12 @@ -3074,7 +3072,6 @@ struct lpfc_mbx_read_top { #define lpfc_mbx_read_top_topology_WORD word3 #define LPFC_TOPOLOGY_PT_PT 0x01 /* Topology is pt-pt / pt-fabric */ #define LPFC_TOPOLOGY_LOOP 0x02 /* Topology is FC-AL */ -#define LPFC_TOPOLOGY_MM 0x05 /* maint mode zephtr to menlo */ /* store the LILP AL_PA position map into */ struct ulp_bde64 lilpBde64; #define LPFC_ALPA_MAP_SIZE 128 @@ -4423,11 +4420,4 @@ lpfc_error_lost_link(u32 ulp_status, u32 ulp_word4) ulp_word4 == IOERR_SLI_DOWN)); } -#define MENLO_TRANSPORT_TYPE 0xfe -#define MENLO_CONTEXT 0 -#define MENLO_PU 3 -#define MENLO_TIMEOUT 30 -#define SETVAR_MLOMNT 0x103107 -#define SETVAR_MLORST 0x103007 - #define BPL_ALIGN_SZ 8 /* 8 byte alignment for bpl and mbufs */ diff --git a/drivers/scsi/lpfc/lpfc_ids.h b/drivers/scsi/lpfc/lpfc_ids.h index a1b9be245560..a9bb161395f8 100644 --- a/drivers/scsi/lpfc/lpfc_ids.h +++ b/drivers/scsi/lpfc/lpfc_ids.h @@ -60,8 +60,6 @@ const struct pci_device_id lpfc_id_table[] = { PCI_ANY_ID, PCI_ANY_ID, }, {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR, PCI_ANY_ID, PCI_ANY_ID, }, - {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_HORNET, - PCI_ANY_ID, PCI_ANY_ID, }, {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR_SCSP, PCI_ANY_ID, PCI_ANY_ID, }, {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR_DCSP, diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 7424b194d20e..4a0eadd1c22c 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -2685,11 +2685,6 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp) case PCI_DEVICE_ID_SAT_S: m = (typeof(m)){"LPe12000-S", "PCIe", "Fibre Channel Adapter"}; break; - case PCI_DEVICE_ID_HORNET: - m = (typeof(m)){"LP21000", "PCIe", - "Obsolete, Unsupported FCoE Adapter"}; - GE = 1; - break; case PCI_DEVICE_ID_PROTEUS_VF: m = (typeof(m)){"LPev12000", "PCIe IOV", "Obsolete, Unsupported Fibre Channel Adapter"}; @@ -7695,7 +7690,6 @@ lpfc_setup_driver_resource_phase1(struct lpfc_hba *phba) INIT_LIST_HEAD(&phba->port_list); INIT_LIST_HEAD(&phba->work_list); - init_waitqueue_head(&phba->wait_4_mlo_m_q); /* Initialize the wait queue head for the kernel thread */ init_waitqueue_head(&phba->work_waitq); @@ -7779,13 +7773,6 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) if (rc) return -ENODEV; - if (phba->pcidev->device == PCI_DEVICE_ID_HORNET) { - phba->menlo_flag |= HBA_MENLO_SUPPORT; - /* check for menlo minimum sg count */ - if (phba->cfg_sg_seg_cnt < LPFC_DEFAULT_MENLO_SG_SEG_CNT) - phba->cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT; - } - if (!phba->sli.sli3_ring) phba->sli.sli3_ring = kcalloc(LPFC_SLI3_MAX_RING, sizeof(struct lpfc_sli_ring), diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 3aa9e5c85aa5..608016725db9 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -10223,16 +10223,6 @@ __lpfc_sli_issue_iocb_s3(struct lpfc_hba *phba, uint32_t ring_number, * can be issued if the link is not up. */ switch (piocb->iocb.ulpCommand) { - case CMD_GEN_REQUEST64_CR: - case CMD_GEN_REQUEST64_CX: - if (!(phba->sli.sli_flag & LPFC_MENLO_MAINT) || - (piocb->iocb.un.genreq64.w5.hcsw.Rctl != - FC_RCTL_DD_UNSOL_CMD) || - (piocb->iocb.un.genreq64.w5.hcsw.Type != - MENLO_TRANSPORT_TYPE)) - - goto iocb_busy; - break; case CMD_QUE_RING_BUF_CN: case CMD_QUE_RING_BUF64_CN: /* diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h index 0af6860b8936..cd33dfec758c 100644 --- a/drivers/scsi/lpfc/lpfc_sli.h +++ b/drivers/scsi/lpfc/lpfc_sli.h @@ -355,7 +355,6 @@ struct lpfc_sli { #define LPFC_SLI_ACTIVE 0x200 /* SLI in firmware is active */ #define LPFC_PROCESS_LA 0x400 /* Able to process link attention */ #define LPFC_BLOCK_MGMT_IO 0x800 /* Don't allow mgmt mbx or iocb cmds */ -#define LPFC_MENLO_MAINT 0x1000 /* need for menl fw download */ #define LPFC_SLI_ASYNC_MBX_BLK 0x2000 /* Async mailbox is blocked */ #define LPFC_SLI_SUPPRESS_RSP 0x4000 /* Suppress RSP feature is supported */ #define LPFC_SLI_USE_EQDR 0x8000 /* EQ Delay Register is supported */ From patchwork Fri Jul 1 21:14:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12903795 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 352F0C43334 for ; Fri, 1 Jul 2022 21:15:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231862AbiGAVPY (ORCPT ); Fri, 1 Jul 2022 17:15:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231391AbiGAVPQ (ORCPT ); Fri, 1 Jul 2022 17:15:16 -0400 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB9593DA7E for ; Fri, 1 Jul 2022 14:15:15 -0700 (PDT) Received: by mail-qk1-x735.google.com with SMTP id z16so2715500qkj.7 for ; Fri, 01 Jul 2022 14:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yJcTuQnaY98PeloDz0ngQg3I0jGELz1/KssalQyTDM0=; b=EBap5BPjSXDvtFdQjTMDjMJI0yM8ydWSU+LR4pc4TofTCwzh0rtScVEbvTC1aL038L c+XBVemVs/+cUKubaNKQNHEOhsdVo6DjQRO2anSRMF/UPm1iXqCfS3aIjHT9ARAWvjAT P0KtR1dofwvvQG/DtFq87ThqjWj/Vt7DRsCuP25jOc30ECCHoYm/52s19tKB7lL9Pb78 5TT8Bw0LH8Y+Bs+uD7Yv0fDCzW9bJPGxrAJmWG0xUAugsBU4sYvVWr+RiZTYJeOgBpGt X14lR+rqYdneYk7dvYdyzhxEsOxmIZc8Oer3imC3PAAmHvhZ+pSTKjdLz89e/ilmHnzv zL8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yJcTuQnaY98PeloDz0ngQg3I0jGELz1/KssalQyTDM0=; b=5ZRR38nLIxs5aJ28UHaZYoi6wwY6a13yCdxtT8qQtrcfMlmIJiXyr94vGbeP9bzVG6 s4fykOAu/72CiNEDLg8HSrc1rqOAUXtAUWLRhFmEsU469LpKjuUKCSHJ1vBaxhB8c2Tv 8JgPujckiVmz4xp3X7l4/WpxX1BfFr5FcSJE4sgwKQoknahhpd7jqCjlzf4eMtGdIftN D7EHJwBTCgPfdoQbq6Ay/CqUqPUHnE0adjj3lO8UFdVi3x14jOWCMHi48ZA9yx3/NQlQ axJ9WQIUElU2yK2vUKx4p5bSn4FzpSjuEsGaNgx6tDxfpLzilxkKJK9Kie7iZ4xGpq2m U3hQ== X-Gm-Message-State: AJIora8bCUbOIO+ZpGqi8GPG+04zMR3qCiWG/U4npqUaep08JDeVEkz2 PCEUCIfZA/lZzHhd2aebaj21zNu0OFQ= X-Google-Smtp-Source: AGRyM1s/u74ldPMY2wpglGYEU4JYPqXmuHvj9RTz2K7bUZIVuoHmmSFLKGE9AOPtqqU59X0fYQiplg== X-Received: by 2002:ae9:eb0e:0:b0:6af:266a:38d5 with SMTP id b14-20020ae9eb0e000000b006af266a38d5mr12274760qkg.664.1656710114755; Fri, 01 Jul 2022 14:15:14 -0700 (PDT) Received: from mail-lvn-it-01.broadcom.com ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020ac842c6000000b00317ccc66971sm14584509qtm.52.2022.07.01.14.15.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 14:15:14 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 11/12] lpfc: Update lpfc version to 14.2.0.5 Date: Fri, 1 Jul 2022 14:14:24 -0700 Message-Id: <20220701211425.2708-12-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com> References: <20220701211425.2708-1-jsmart2021@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.5 Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- 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 2ab6f7db64d8..63eba9928e4b 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.4" +#define LPFC_DRIVER_VERSION "14.2.0.5" #define LPFC_DRIVER_NAME "lpfc" /* Used for SLI 2/3 */ From patchwork Fri Jul 1 21:14:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12903796 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 E8079C43334 for ; Fri, 1 Jul 2022 21:15:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231872AbiGAVP2 (ORCPT ); Fri, 1 Jul 2022 17:15:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231776AbiGAVPS (ORCPT ); Fri, 1 Jul 2022 17:15:18 -0400 Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 212564163F for ; Fri, 1 Jul 2022 14:15:17 -0700 (PDT) Received: by mail-qk1-x72b.google.com with SMTP id g1so2707894qkl.9 for ; Fri, 01 Jul 2022 14:15:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lVHSGB4+pyP3F2+vZuQk7cgxAfF4waxHaLz7AadQ9u8=; b=VIRtDA3cvI5IcRDdvYrJ4ufaagxHT6jyIKJrFIDQGvTVsGNdF2+xhD+IquWIVS0Vi/ /R8weKrVVfMVNW0tWx/Bo+di8tBKyfBnChWGlu7FMWlXS5+jo+M0tWEx25poRYnQbYoI BiJCcy/mixHe30lZMwheS78sRWiRxGOZQy5U9bDPUaIFf0QnpmewcJoY7PSLdR2CDu8r +8aIZCPgxjF5x3r/tgQTTKbjgC7DnkUp5/qK+7loVccuERMkgaZKvlzb4v6CZve0sUoN w3rXzwMgBtuP939rAkIV3Y3HYjLM4EAhU/SMT5iIQL79nVtpSD4MzIUTk6FdA4R5YCH3 b6pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lVHSGB4+pyP3F2+vZuQk7cgxAfF4waxHaLz7AadQ9u8=; b=IWHhdr4KeEmqtZs0HBMmy3yvIF1ghf2YtI4BUuAvvISYtFjXR1LcpLnbTrhYDLNSk9 oos1c51xB9YBB31bZB9CLscLiR0+UPvOMWwnarqz1W3p+vi56owBuMDF+qsqQl373M8w 9tAFyXvoZ72b8JY7hi2SnM4ddbboWABF4kVdVCEM9/GkyiZYcQkoJ5dzeYAg9EvhpkKS bvVjJ+zexhOskhuqpe8S9Aqqz8PTQqA6pORGk61cu7HPSUI14WgJTr1s71/KVfogCvwI QzqAkwQRHRXtY3VUA0SQtV4GdAimOCuB5OOmDSBF4Az97hCM3eTCqpcNgQ1j43WHMUeq LGxw== X-Gm-Message-State: AJIora+HXMwYepHOM7fVxZMB25lndhgiljh+zvQHBBjJXUSN5S4O/ZXy z8yGOLRzVGmpgsl9gP+wAGOYd2UcfPQ= X-Google-Smtp-Source: AGRyM1uuuHabOQH0z3Eg9ronvRzdpYwZurWVfmFkWpG8d7h4Y2wf9qfweQhjYE+tpK6CYJYGonmw9w== X-Received: by 2002:a05:620a:4587:b0:6af:1a0a:4895 with SMTP id bp7-20020a05620a458700b006af1a0a4895mr12212012qkb.742.1656710116068; Fri, 01 Jul 2022 14:15:16 -0700 (PDT) Received: from mail-lvn-it-01.broadcom.com ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020ac842c6000000b00317ccc66971sm14584509qtm.52.2022.07.01.14.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 14:15:15 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 12/12] lpfc: Copyright updates for 14.2.0.5 patches Date: Fri, 1 Jul 2022 14:14:25 -0700 Message-Id: <20220701211425.2708-13-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220701211425.2708-1-jsmart2021@gmail.com> References: <20220701211425.2708-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Update copyrights to 2022 for files modified in the 14.2.0.5 patch set. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_bsg.h | 2 +- drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- drivers/scsi/lpfc/lpfc_ids.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.h b/drivers/scsi/lpfc/lpfc_bsg.h index 8b1b2b1bc448..3c04ca2d7455 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.h +++ b/drivers/scsi/lpfc/lpfc_bsg.h @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2021 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2010-2015 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index 25deacc92b02..5037ea09a810 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2021 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2007-2015 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * diff --git a/drivers/scsi/lpfc/lpfc_ids.h b/drivers/scsi/lpfc/lpfc_ids.h index a9bb161395f8..0b1616e93cf4 100644 --- a/drivers/scsi/lpfc/lpfc_ids.h +++ b/drivers/scsi/lpfc/lpfc_ids.h @@ -1,7 +1,7 @@ /******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * - * Copyright (C) 2017-2021 Broadcom. All Rights Reserved. The term * + * Copyright (C) 2017-2022 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. *