From patchwork Fri May 6 03:55:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12840535 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 19D9CC433EF for ; Fri, 6 May 2022 03:55:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388844AbiEFD7Q (ORCPT ); Thu, 5 May 2022 23:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388857AbiEFD7M (ORCPT ); Thu, 5 May 2022 23:59:12 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFEC16542 for ; Thu, 5 May 2022 20:55:28 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id c9so5544084plh.2 for ; Thu, 05 May 2022 20:55:28 -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=czsypJKtYYOrNNv4cfWap7C6jb0ZrdiKyEtTKEmYg9o=; b=Emnr2pCTIXMQ2UusVnAT8e4UK89Y0NMNmMkwmqfiE4fwcxt74y0tB+yCPKk+6AikaE W7bv+AY5nYV3SJRnb8IJksrZLaLbQ49r4rTMTbrsPaYoOEoE3aCy/fvlYqhLMBOUmkh5 Zg9rZesDxUmKceFd2Xm2IIAJEuRu8C8kReefrsN9l95be231Dysbe/KtYhkOptUe3GRI gEaHNCZ7zigFW9awpuPbW1LKZgCiM3f5axjCaKFAJdJpvFM9IubXPxDPRr2zN15w5EFa eOIofg0UaaxXiCIvpOx8b0GwGDv0HTgA/XCckR2jYJ5AutjtBlZ+H6jxLe70H61ApaI1 H06A== 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=czsypJKtYYOrNNv4cfWap7C6jb0ZrdiKyEtTKEmYg9o=; b=Aqt0X0XWfIRlyF8gdFYS/2Tko+vHsNYR2KkwYBGOY7Q7oXYHmpgvABBb3gxCO6Q4GX sEDjhV3zDp/PlwnQW1K9db5U7NfkfvKESbBy6Po7+Pq73UWRUtElz5wAWN1IyQLVfOZJ 1+RN5Ha3qXIgPSOfPseR1JlEVUAuiq1tpRHrLasaQL/zuWz/C6LN4dORzpqmECgYMXzJ TSwYq2Z76JZBMBGifSOun4AUCVspsulZP6LWivs9YtxI3W4tZBDBeXmkdVYIBWd8IzmW J50BQVcxgMqOK9UpO8o+X/imCwURlISDlh4tecnW45OZUgC1pgLp477wHh8xEMGli/QA SdIQ== X-Gm-Message-State: AOAM5300d2eKr0KTBpMpTNSEGe11xkrdyfADCMH0Q31UrEc/y+wzd7/S 4ySF8MY6nHPe5C9CK4u0XpoOSV7/lks= X-Google-Smtp-Source: ABdhPJxsgqJbbkNK17jaGgEHk4mbuiynZxZyaFPL9CzRKhjWu2qRux4lGX5K5GO1MrAnrk63lnO3DA== X-Received: by 2002:a17:90a:cc6:b0:1d2:9a04:d29e with SMTP id 6-20020a17090a0cc600b001d29a04d29emr1860565pjt.136.1651809328197; Thu, 05 May 2022 20:55:28 -0700 (PDT) Received: from mail-ash-it-01.broadcom.com (ip174-67-196-173.oc.oc.cox.net. [174.67.196.173]) by smtp.gmail.com with ESMTPSA id ck3-20020a17090afe0300b001cd4989feebsm6065187pjb.55.2022.05.05.20.55.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 20:55:27 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 01/12] lpfc: Fix element offset in __lpfc_sli_release_iocbq_s4() Date: Thu, 5 May 2022 20:55:08 -0700 Message-Id: <20220506035519.50908-2-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220506035519.50908-1-jsmart2021@gmail.com> References: <20220506035519.50908-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The prior patch that moved from iocb elements to explicit wqe elements missed a name change. Correct __lpfc_sli_release_iocbq_s4() to reference wqe rather than iocb Fixes: a680a9298e7b ("scsi: lpfc: SLI path split: Refactor lpfc_iocbq") Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index aba06794146d..d2900ac8de9d 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -1373,7 +1373,7 @@ static void __lpfc_sli_release_iocbq_s4(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq) { struct lpfc_sglq *sglq; - size_t start_clean = offsetof(struct lpfc_iocbq, iocb); + size_t start_clean = offsetof(struct lpfc_iocbq, wqe); unsigned long iflag = 0; struct lpfc_sli_ring *pring; From patchwork Fri May 6 03:55:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12840534 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 AD401C433F5 for ; Fri, 6 May 2022 03:55:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388841AbiEFD7O (ORCPT ); Thu, 5 May 2022 23:59:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388856AbiEFD7M (ORCPT ); Thu, 5 May 2022 23:59:12 -0400 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 E1712655C for ; Thu, 5 May 2022 20:55:29 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id c11so6225785plg.13 for ; Thu, 05 May 2022 20:55:29 -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=IKC5VYOSrma1br6bpss3+JGoTu8uDh+cfluIvfZaNnA=; b=D6SvQiMJX5c5qbuc5TuFhoMVYkE/FxcIAAagoX5eH+0aP1Q5nzMIiwDhw2DC+QNVwr ZZ/GL82nIQ5aisfnGrgH82iZQiH8k43GEBlXG42po/bLsLGefNnQlnZ3ICvj5xfFOiAW ew75qSfMPh9CDR/xoNKhLp/0tkYePef74b6WZkUYMwho57/2vVwllIZNCQur8zAQumhT awvwCqv6RCCIB2VPbVB6BlE3Eg88gsr/NjzC3b8hneh56zAeGQ4d74GudByUeYtpnUYG G12rJBeI9A9XLSMsrgMX0029/jZ7oZYTCRo83kW9yrF4wGvOG9HN9Zfg4vw3jO7mGUAO /URg== 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=IKC5VYOSrma1br6bpss3+JGoTu8uDh+cfluIvfZaNnA=; b=mCK/IYpydAxg/z0sk9p61fNzvrwsvmoVD2JZmaw8R6iRuG1aJUXAmsD8P5QAY7lZQL U331Qh7QR5NkR2ISrfaqaBZJ+Z7lsTdVE4+NWOzbTz6twQm8PGl0dBGQR+46CNTH2ZFg N2oPoeJ8yVD0aVc0safjce75WstDIVL7HZMuFMf80qEWhTdvxq7o75KZl0g/zK/SFyhx SPoJXVXBM2s0e9ZNcUSytFTB/E3MpVaPo9e+M9zc8IhJGO/oDODy25t+wtjTEgzpwsP7 6oWrC15YcvH8TjX+oIJJwYPosPMcyzZ5jmj4K3neFS4KO/ARNA5k7CERZGEZQC6tnZg8 37zw== X-Gm-Message-State: AOAM532umOKc1MX6/9mC22iBWczXobNFO7n6PX65Hbngu+yyGjwr0sP1 Ra0YUIa/TE1JKlyebZTduBrkQq6Q93M= X-Google-Smtp-Source: ABdhPJye546LaYccBI0wD2etMkUWVZMA9XfyGfmUGnlZgp0axvUZ0bRjC+34Rqj2zUWPW+YUx8qU9A== X-Received: by 2002:a17:90b:224f:b0:1dc:76e9:e963 with SMTP id hk15-20020a17090b224f00b001dc76e9e963mr1916664pjb.16.1651809329221; Thu, 05 May 2022 20:55:29 -0700 (PDT) Received: from mail-ash-it-01.broadcom.com (ip174-67-196-173.oc.oc.cox.net. [174.67.196.173]) by smtp.gmail.com with ESMTPSA id ck3-20020a17090afe0300b001cd4989feebsm6065187pjb.55.2022.05.05.20.55.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 20:55:28 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 02/12] lpfc: Fill in missing ndlp kref puts in error paths Date: Thu, 5 May 2022 20:55:09 -0700 Message-Id: <20220506035519.50908-3-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220506035519.50908-1-jsmart2021@gmail.com> References: <20220506035519.50908-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Code review, following every lpfc_nlp_get call vs calls during error handling, discovered cases of missing put calls. Correct by adding ndlp kref puts in the respective error paths. Also added comments to several of the error paths to record relationships to reference counts. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_els.c | 11 +++++------ drivers/scsi/lpfc/lpfc_nportdisc.c | 15 +++++++++++++-- drivers/scsi/lpfc/lpfc_nvme.c | 5 +++++ drivers/scsi/lpfc/lpfc_sli.c | 6 +++++- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 527f2c148e04..ace812ce857d 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -8725,19 +8725,18 @@ lpfc_issue_els_rrq(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, elsiocb->cmd_cmpl = lpfc_cmpl_els_rrq; elsiocb->ndlp = lpfc_nlp_get(ndlp); - if (!elsiocb->ndlp) { - lpfc_els_free_iocb(phba, elsiocb); - return 1; - } + if (!elsiocb->ndlp) + goto io_err; ret = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0); - if (ret == IOCB_ERROR) + if (ret == IOCB_ERROR) { + lpfc_nlp_put(ndlp); goto io_err; + } return 0; io_err: lpfc_els_free_iocb(phba, elsiocb); - lpfc_nlp_put(ndlp); return 1; } diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 5e4822bf54f4..639f86635127 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -513,6 +513,10 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, lpfc_config_link(phba, link_mbox); link_mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl; link_mbox->vport = vport; + + /* The default completion handling for CONFIG_LINK + * does not require the ndlp so no reference is needed. + */ link_mbox->ctx_ndlp = ndlp; rc = lpfc_sli_issue_mbox(phba, link_mbox, MBX_NOWAIT); @@ -633,6 +637,9 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, */ login_mbox->mbox_cmpl = lpfc_defer_plogi_acc; login_mbox->ctx_ndlp = lpfc_nlp_get(ndlp); + if (!login_mbox->ctx_ndlp) + goto out; + login_mbox->context3 = save_iocb; /* For PLOGI ACC */ spin_lock_irq(&ndlp->lock); @@ -641,8 +648,10 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, /* Start the ball rolling by issuing REG_LOGIN here */ rc = lpfc_sli_issue_mbox(phba, login_mbox, MBX_NOWAIT); - if (rc == MBX_NOT_FINISHED) + if (rc == MBX_NOT_FINISHED) { + lpfc_nlp_put(ndlp); goto out; + } lpfc_nlp_set_state(vport, ndlp, NLP_STE_REG_LOGIN_ISSUE); return 1; @@ -1099,8 +1108,10 @@ lpfc_release_rpi(struct lpfc_hba *phba, struct lpfc_vport *vport, ndlp->nlp_rpi, ndlp->nlp_DID, ndlp->nlp_flag); rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT); - if (rc == MBX_NOT_FINISHED) + if (rc == MBX_NOT_FINISHED) { + lpfc_nlp_put(ndlp); mempool_free(pmb, phba->mbox_mem_pool); + } } } diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index 376f6c0265c0..3aebd01e07fd 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -2357,6 +2357,11 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) rpinfo.dev_loss_tmo = vport->cfg_devloss_tmo; spin_lock_irq(&ndlp->lock); + + /* If an oldrport exists, so does the ndlp reference. If not + * a new reference is needed because either the node has never + * been registered or it's been unregistered and getting deleted. + */ oldrport = lpfc_ndlp_get_nrport(ndlp); if (oldrport) { prev_ndlp = oldrport->ndlp; diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index d2900ac8de9d..fe4eb36426df 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -20684,8 +20684,12 @@ lpfc_cleanup_pending_mbox(struct lpfc_vport *vport) mb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; if (mb->u.mb.mbxCommand == MBX_REG_LOGIN64) { act_mbx_ndlp = (struct lpfc_nodelist *)mb->ctx_ndlp; - /* Put reference count for delayed processing */ + + /* This reference is local to this routine. The + * reference is removed at routine exit. + */ act_mbx_ndlp = lpfc_nlp_get(act_mbx_ndlp); + /* Unregister the RPI when mailbox complete */ mb->mbox_flag |= LPFC_MBX_IMED_UNREG; } From patchwork Fri May 6 03:55:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12840536 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 43F4DC433EF for ; Fri, 6 May 2022 03:55:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388857AbiEFD7X (ORCPT ); Thu, 5 May 2022 23:59:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388836AbiEFD7O (ORCPT ); Thu, 5 May 2022 23:59:14 -0400 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 ADBF265AA for ; Thu, 5 May 2022 20:55:30 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id w5-20020a17090aaf8500b001d74c754128so9781832pjq.0 for ; Thu, 05 May 2022 20:55:30 -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=SpUVwnkg++HeDm+jTiQAVjn/6CkYaRl6cjZRC1hD6ec=; b=SyWA3/4OU808NPvKSfTJmyrIl4LadzO+0zull2PPnSLnbcTaalhTzUu3UDLxdWI8KD PU7HEJTwU0un8ELvuOBFdl4Ak74mWqdZrnqleD3WjusAYHAIQ1csCLraWFzbxgL0zWPt nvcKGUN6tPVyyIEJ5h/ALN58CBpeqlpbEmxnXJkAMSylrUnLSMmIApIWF4y8xjpGqO6t Ug4Eud1b46JiLINKTHHPULYp8VnvtDOSE52DvyK45SnvCbsY+qiH7PAIEeBpMIJWRsHj FGkOwaq77xPcFU7X47vsy9E4O5mdA/Y9kgLF/dbuK0Ozx/RvKzmoUKPGvxl0eOlrEaWG AcQg== 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=SpUVwnkg++HeDm+jTiQAVjn/6CkYaRl6cjZRC1hD6ec=; b=etVrIPa1i5tOZnkY0oKx3qLA41kqLzKEgJorsvB0/4LuNkAnzMg+KkMhn2LOr1VRjX pnGOUv+wPv17JXNXWfIFIP2yOKzl3Cfv2yDNaz5X/sId08OkB9/eupQq+gEoRroMbyeX uYenz0HLQ1KAl48j93G+9h0kjPFsPvGFaYVI82Av+/RjphpgxGI2oexkxVRqGb1pbsgJ cJ3NAFJyDviVBxoXs+byjI/56OOdUL1/9dsyjWYNDpgTfnuGvOS6njpxVfyv0qBmc3fd YaDpMOmTUgaFP67NeAIkeorlBjf9D9JDyTt8N3OKrQhzC4tVij8FISmO/LGM7FqY9lC3 aHmA== X-Gm-Message-State: AOAM532D7P8ZGwnmRnSmib4FI+EiAoMuOKhOhM5frVLGxfAS+GBcWwfd 6pbovZBsb9rbI2vautSkGtFI9FcbjPY= X-Google-Smtp-Source: ABdhPJyKNiZcKph15UQwtiveE7ID8CPgDQABTJrsdNcy78dR0lIU6QEpshyiE1gVMP9R9N3wk1lovw== X-Received: by 2002:a17:903:120c:b0:154:c135:60d3 with SMTP id l12-20020a170903120c00b00154c13560d3mr1603579plh.48.1651809330092; Thu, 05 May 2022 20:55:30 -0700 (PDT) Received: from mail-ash-it-01.broadcom.com (ip174-67-196-173.oc.oc.cox.net. [174.67.196.173]) by smtp.gmail.com with ESMTPSA id ck3-20020a17090afe0300b001cd4989feebsm6065187pjb.55.2022.05.05.20.55.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 20:55:29 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 03/12] lpfc: Fix ndlp put following a LOGO completion Date: Thu, 5 May 2022 20:55:10 -0700 Message-Id: <20220506035519.50908-4-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220506035519.50908-1-jsmart2021@gmail.com> References: <20220506035519.50908-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org During testing with repeated asynchronous resets of the target, and issue was found when the driver issues a LOGO to disconnect it's login and recover all exchanges. The LOGO command take a node reference but neglects to remove it, keeping the node reference count artifically high. Add a call to lpfc_nlp_put to lpfc_nlp_logo_unreg and move the mempool free call to the routine exit along with the needed put. This is always safe as this will not be the last reference removed as lpfc_unreg_rpi ensures there is an additional reference on the ndlp. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_hbadisc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 2d846256990c..e4805101cd5c 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -5235,7 +5235,6 @@ lpfc_nlp_logo_unreg(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) if (!ndlp) return; lpfc_issue_els_logo(vport, ndlp, 0); - mempool_free(pmb, phba->mbox_mem_pool); /* Check to see if there are any deferred events to process */ if ((ndlp->nlp_flag & NLP_UNREG_INP) && @@ -5262,6 +5261,13 @@ lpfc_nlp_logo_unreg(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) ndlp->nlp_flag &= ~NLP_UNREG_INP; spin_unlock_irq(&ndlp->lock); } + + /* The node has an outstanding reference for the unreg. Now + * that the LOGO action and cleanup are finished, release + * resources. + */ + lpfc_nlp_put(ndlp); + mempool_free(pmb, phba->mbox_mem_pool); } /* From patchwork Fri May 6 03:55:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12840540 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 4384DC433FE for ; Fri, 6 May 2022 03:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388866AbiEFD72 (ORCPT ); Thu, 5 May 2022 23:59:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388837AbiEFD7O (ORCPT ); Thu, 5 May 2022 23:59:14 -0400 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 963A57662 for ; Thu, 5 May 2022 20:55:31 -0700 (PDT) Received: by mail-pg1-x52f.google.com with SMTP id r192so971387pgr.6 for ; Thu, 05 May 2022 20:55:31 -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=SLwWUvlai3KzAUVZn6rYkydiknSt0y7PlHGQ2nlMZV4=; b=JKqioQyFdo5S2TlsQuyGXK+kMWELnCXzc3H6SeKtMQJsV1zxNGyI+gky05KdTqjjKb fk1O96hvUrxPSgcue1U67IjLueO5lXdrAL3qQG2AFKJoy2raKeQ23DIq7RiMs+trZqZE XlqtDp3qniuE2hzlGvgPsOM5BeXbkxFQkz12pZyChhrBNkTmC04cAgimycpoo4TJLEzR KdAfl8Tc2vcK8hdFHezrXGhj3/MrXqD0pUs/OjHrS645aal+saH2epHZK5DPVYsZ2jfC mulDybohr2qXotsu6qyod0AH2UavvQs4WZXjhjwtBZZz3S6K8O6HDLQj3Q+uc2AaqFRC Xu+w== 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=SLwWUvlai3KzAUVZn6rYkydiknSt0y7PlHGQ2nlMZV4=; b=4W2LOh6gW8jIPriiSzbn8egZNurzJ2gvtGwuFdm+NYGW5LBm1bKO3nzLbU5E4h9DZR IniW53uLGILicr9eVVdtFfabtUGipb17nqrYeBChfqMlEu9GhIbifi7pCfJGNQyWYDXN fMeu++PFbZxDtbj4S6DqkO8EZRyt9s9QvO/hPxPdKzjWp+sRSZHKAEUG9j9H75CT4ffz 9eHy51uaLjm8O/QaR98g4jlGgwceeccZC2ViLy6sjtg+n0DzfuDKNUgQQku6odLMe68d Wpd3mOw16mY/DyqLMTmx9cDipNRIyktowPyQXSXD0GFZZmTAWaTUl/h1EhGmz6/6VvtH cm5g== X-Gm-Message-State: AOAM533csddpcffVXvBA9d0qHlkrM18ushKghs1Eadzjsr6+7wZ74Sh2 rub2YK9UyW7VsbKJ2ZsczAEQu4q6Cwo= X-Google-Smtp-Source: ABdhPJwnQGkVjOagTbmZKA8sKGeZLWEsYIRtb2Ee+PYeHXcXTCWh8oQd8/ZPyAUo2a/5wi9nZskSxA== X-Received: by 2002:a05:6a00:140f:b0:4e0:6995:9c48 with SMTP id l15-20020a056a00140f00b004e069959c48mr1690459pfu.59.1651809330862; Thu, 05 May 2022 20:55:30 -0700 (PDT) Received: from mail-ash-it-01.broadcom.com (ip174-67-196-173.oc.oc.cox.net. [174.67.196.173]) by smtp.gmail.com with ESMTPSA id ck3-20020a17090afe0300b001cd4989feebsm6065187pjb.55.2022.05.05.20.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 20:55:30 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 04/12] lpfc: Inhibit aborts if external loopback plug is inserted Date: Thu, 5 May 2022 20:55:11 -0700 Message-Id: <20220506035519.50908-5-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220506035519.50908-1-jsmart2021@gmail.com> References: <20220506035519.50908-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org After running a short external loopback test, when the external loopback is removed and a normal cable inserted that is directly connected to a target device, the system oops in the llpfc_set_rrq_active routine. When the loopback was inserted an FLOGI was transmit. As we're looped back, we receive the FLOGI request. The FLOGI is ABTS'd as we recognize the same wppn thus understand it's a loopback. However, as the ABTS sends address information the port is not set to (fffffe), the ABTS is dropped on the wire. A short 1 frame loopback test is run and completes before the ABTS times out. The looback is unplugged and the new cable plugged in, and the an FLOGI to the new device occurs and completes. Due to a mixup in ref counting the completion of the new FLOGI releases the fabric ndlp. Then the original ABTS completes and references the released ndlp generating the oops. Correct by no-op'ing the ABTS when in loopback mode (it will be dropped anyway). Added a flag to track the mode to recognize when it should be no-op'd. 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 | 12 ++++++++++++ drivers/scsi/lpfc/lpfc_hbadisc.c | 3 +++ drivers/scsi/lpfc/lpfc_sli.c | 8 +++++--- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 346661dc5bf2..405c8a8dd795 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -1025,6 +1025,7 @@ struct lpfc_hba { #define LS_MDS_LINK_DOWN 0x8 /* MDS Diagnostics Link Down */ #define LS_MDS_LOOPBACK 0x10 /* MDS Diagnostics Link Up (Loopback) */ #define LS_CT_VEN_RPA 0x20 /* Vendor RPA sent to switch */ +#define LS_EXTERNAL_LOOPBACK 0x40 /* External loopback plug inserted */ uint32_t hba_flag; /* hba generic flags */ #define HBA_ERATT_HANDLED 0x1 /* This flag is set when eratt handled */ diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index ace812ce857d..583a287b2d0c 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1373,6 +1373,9 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, phba->hba_flag |= (HBA_FLOGI_ISSUED | HBA_FLOGI_OUTSTANDING); + /* Clear external loopback plug detected flag */ + phba->link_flag &= ~LS_EXTERNAL_LOOPBACK; + /* Check for a deferred FLOGI ACC condition */ if (phba->defer_flogi_acc_flag) { /* lookup ndlp for received FLOGI */ @@ -8128,6 +8131,9 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, uint32_t fc_flag = 0; uint32_t port_state = 0; + /* Clear external loopback plug detected flag */ + phba->link_flag &= ~LS_EXTERNAL_LOOPBACK; + cmd = *lp++; sp = (struct serv_parm *) lp; @@ -8179,6 +8185,12 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, return 1; } + /* External loopback plug insertion detected */ + phba->link_flag |= LS_EXTERNAL_LOOPBACK; + + lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS | LOG_LIBDFC, + "1119 External Loopback plug detected\n"); + /* abort the flogi coming back to ourselves * due to external loopback on the port. */ diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index e4805101cd5c..a833a493a3ee 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -1229,6 +1229,9 @@ lpfc_linkdown(struct lpfc_hba *phba) phba->defer_flogi_acc_flag = false; + /* Clear external loopback plug detected flag */ + phba->link_flag &= ~LS_EXTERNAL_LOOPBACK; + spin_lock_irq(&phba->hbalock); phba->fcf.fcf_flag &= ~(FCF_AVAILABLE | FCF_SCAN_DONE); spin_unlock_irq(&phba->hbalock); diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index fe4eb36426df..b509b3147759 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -12201,7 +12201,8 @@ lpfc_sli_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, if (phba->link_state < LPFC_LINK_UP || (phba->sli_rev == LPFC_SLI_REV4 && - phba->sli4_hba.link_state.status == LPFC_FC_LA_TYPE_LINK_DOWN)) + phba->sli4_hba.link_state.status == LPFC_FC_LA_TYPE_LINK_DOWN) || + (phba->link_flag & LS_EXTERNAL_LOOPBACK)) ia = true; else ia = false; @@ -12660,7 +12661,8 @@ lpfc_sli_abort_taskmgmt(struct lpfc_vport *vport, struct lpfc_sli_ring *pring, ndlp = lpfc_cmd->rdata->pnode; if (lpfc_is_link_up(phba) && - (ndlp && ndlp->nlp_state == NLP_STE_MAPPED_NODE)) + (ndlp && ndlp->nlp_state == NLP_STE_MAPPED_NODE) && + !(phba->link_flag & LS_EXTERNAL_LOOPBACK)) ia = false; else ia = true; @@ -21112,7 +21114,7 @@ lpfc_sli4_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, abtswqe = &abtsiocb->wqe; memset(abtswqe, 0, sizeof(*abtswqe)); - if (!lpfc_is_link_up(phba)) + if (!lpfc_is_link_up(phba) || (phba->link_flag & LS_EXTERNAL_LOOPBACK)) bf_set(abort_cmd_ia, &abtswqe->abort_cmd, 1); bf_set(abort_cmd_criteria, &abtswqe->abort_cmd, T_XRI_TAG); abtswqe->abort_cmd.rsrvd5 = 0; From patchwork Fri May 6 03:55:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12840537 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 6FBDBC433F5 for ; Fri, 6 May 2022 03:55:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388858AbiEFD7Y (ORCPT ); Thu, 5 May 2022 23:59:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388840AbiEFD7O (ORCPT ); Thu, 5 May 2022 23:59:14 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 645DEDF08 for ; Thu, 5 May 2022 20:55:32 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id w5-20020a17090aaf8500b001d74c754128so9781872pjq.0 for ; Thu, 05 May 2022 20:55:32 -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=V+6uiLx/k4VFmYDVC5AjP1sVnBgsOR2Jqn5YaTRl/Cc=; b=AgdawogO6g6qGtes0ykwPvlP0ITJbFAvL240nacedj+PjHIPbj0lBDKBNgmjo+mn3e bmqwYkHFQUvRTxTQ3xiXOnhlYJNdHMV8TmcCKMvEjGVmKTPgMjH9vlo4GsXX9HNGuM7g 6lyBhUmodCqmyjlia40COuLGihscWE/sdpD5pdZXTTjQeWnn1NZPUXwdkfBLeXvjqtN8 oeFfbTRxAE5MwFSENFXYNyXzrfX7NceLh9Nc6DIo0itqE/1Gp0V+cZ/ahRhbqQyWr3UG ThT+sYPFx7OBGbo/qOcO8zkKaZHdPCnOKvWojJfZASTd1NOOfAXgCfk/mHYSMdA4DPGg llzQ== 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=V+6uiLx/k4VFmYDVC5AjP1sVnBgsOR2Jqn5YaTRl/Cc=; b=nHlznF9T8qK0GjZk6OZLqdhyyvFRdnuA5Y3F/9SBPktevRxfgjbqgtcFITVL+dg0Kb 6a/vbKiGEHWyd21UmVmWxw02TABZH4lXu1vIRv1SFvQKnFfHl4g3koY2MSDfA7eGeF3G DPKqVLvZBlBf8cF8FEkSRSeVQICukbcjYWuBWHnG9ma5n7mHzWZqv3VMvuWyXZ2fJxLp iqa/vnqhmPd6Do6ePKEEMVgrStyJSgn82HMqxgVRA26gugx1WiHCgvzBqVyJTRh4jsGr AXI62/4rfIA3ANzhG7bTdx/C4IFRyrJe6maKyrZTWHDZMcE9UalZcsgIUWluH27/a09H el1g== X-Gm-Message-State: AOAM532MTK2BDm9ml+szylva1+5SIAg2AF2wKK2kHS6bkMta4eqim+l0 SasP71DBBN5DBJxaYpb9r6JL/vaHLIo= X-Google-Smtp-Source: ABdhPJypgh1RMNhrSTFYMgRAVm02ldZAmcaSVkBagAohVDYmdIzaKiccgQcVHb1w2jCagWAH/D0gYg== X-Received: by 2002:a17:902:7c8c:b0:156:5651:1d51 with SMTP id y12-20020a1709027c8c00b0015656511d51mr1567028pll.107.1651809331660; Thu, 05 May 2022 20:55:31 -0700 (PDT) Received: from mail-ash-it-01.broadcom.com (ip174-67-196-173.oc.oc.cox.net. [174.67.196.173]) by smtp.gmail.com with ESMTPSA id ck3-20020a17090afe0300b001cd4989feebsm6065187pjb.55.2022.05.05.20.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 20:55:31 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 05/12] lpfc: Fix dmabuf ptr assignment in lpfc_ct_reject_event Date: Thu, 5 May 2022 20:55:12 -0700 Message-Id: <20220506035519.50908-6-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220506035519.50908-1-jsmart2021@gmail.com> References: <20220506035519.50908-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Upon driver receipt of a CT cmd for type = 0xFA (Management Server) and subtype = 0x11 (Fabric Device Management Interface), the driver is responding with garbage CT cmd data when it should send a properly formed RJT. The __lpfc_prep_xmit_seq64_s4() routine was using the wrong buffer for the reject. Fix by converting the routine to use the buffer specified in the bde within the wqe rather than the ill-set bmp element. Fixes: 61910d6a5243 ("scsi: lpfc: SLI path split: Refactor CT paths") Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_sli.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index b509b3147759..573526f08baf 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -10808,24 +10808,15 @@ __lpfc_sli_prep_xmit_seq64_s4(struct lpfc_iocbq *cmdiocbq, { union lpfc_wqe128 *wqe; struct ulp_bde64 *bpl; - struct ulp_bde64_le *bde; wqe = &cmdiocbq->wqe; memset(wqe, 0, sizeof(*wqe)); /* Words 0 - 2 */ bpl = (struct ulp_bde64 *)bmp->virt; - if (cmdiocbq->cmd_flag & (LPFC_IO_LIBDFC | LPFC_IO_LOOPBACK)) { - wqe->xmit_sequence.bde.addrHigh = bpl->addrHigh; - wqe->xmit_sequence.bde.addrLow = bpl->addrLow; - wqe->xmit_sequence.bde.tus.w = bpl->tus.w; - } else { - bde = (struct ulp_bde64_le *)&wqe->xmit_sequence.bde; - bde->addr_low = cpu_to_le32(putPaddrLow(bmp->phys)); - bde->addr_high = cpu_to_le32(putPaddrHigh(bmp->phys)); - bde->type_size = cpu_to_le32(bpl->tus.f.bdeSize); - bde->type_size |= cpu_to_le32(ULP_BDE64_TYPE_BDE_64); - } + wqe->xmit_sequence.bde.addrHigh = bpl->addrHigh; + wqe->xmit_sequence.bde.addrLow = bpl->addrLow; + wqe->xmit_sequence.bde.tus.w = bpl->tus.w; /* Word 5 */ bf_set(wqe_ls, &wqe->xmit_sequence.wge_ctl, last_seq); From patchwork Fri May 6 03:55:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 12840541 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 11434C433EF for ; Fri, 6 May 2022 03:55:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388876AbiEFD73 (ORCPT ); Thu, 5 May 2022 23:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388846AbiEFD7S (ORCPT ); Thu, 5 May 2022 23:59:18 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1723ADF29 for ; Thu, 5 May 2022 20:55:33 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id g8so5265909pfh.5 for ; Thu, 05 May 2022 20:55:33 -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=CFG4FVBjoMWKHe+LEoBTTsXpvwr10JyuuHeZnwcfE5Q=; b=jFOarW/XH8hoXPxkK4yoDpx5CdhSyBzvNAuTBk2iHi7eDCLekzyyYpiCldDgM4+QTb JtckQ5P9HUsZcSk/SA5v2BBLG/cmlH0M0fVm3de9A5jmZg2HVuWp3wx4wseDnyPIN3en yuKf+B+YW0VoSESLwjJg1K3581dPx8UZ2b67asHNBqv84kTCEFzq+p8TItkR8U+O3CXw dCROShOuZb70IHgrtozaeTU9CDPzs6wAfjY2SXK4Sg3rd4mRTzBH2RcjNcfvvEkSFakP D2DbbdTry4O73JSll82Sb1hFRh6OJJ0QQd+rmT8FbRybQ/PHiH6AHo4HxVPmxJnfAqfh tACQ== 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=CFG4FVBjoMWKHe+LEoBTTsXpvwr10JyuuHeZnwcfE5Q=; b=uGX00TTzbb2PQl0Jc0OvN9pUU/GUMkz7WjW9u/zW4+/p65WgCfmP9TfBR2BVN90RVv M8RkitE9EGnMS1PSUvgmCpMocknUTCDRBR/tocgBhkaP2yiMC3Qlk2PhCbMbAd+TZQ9D a/godbiuRTs5qy4L6IsEddJjgaXAZ9ALz9lM3R9oflNc5v6MmLL3U6oXgeicPpDCT5PO lIucjY0u8fD+9LRGBWtmfhni/bnondItnxuKuQCGCk+VH4ZkEsRgeHpJPZEZuItsbhD0 zJEapk8gutkSD3qcFG61H3Vqs+dUcQIinCeL0Hv20P9xqALspqTPfKxKmYNbHULIGFAI SFzQ== X-Gm-Message-State: AOAM531ZnE/XLp5pfbkPbYwkdZbKlK7TM8GNZrxnzyi3nj8gCqOAkM1u 1XkSft44jqVDnNu/Tv3tRPP7z06gJM0= X-Google-Smtp-Source: ABdhPJzeiYzeJ6Nmli2aifJ80FpfsjP/eCWOw2dGNhwoOpPoqW84TWG+lS2uoSDFrdoicOXvJOCALQ== X-Received: by 2002:a05:6a00:2310:b0:505:a8ac:40e7 with SMTP id h16-20020a056a00231000b00505a8ac40e7mr1393896pfh.11.1651809332411; Thu, 05 May 2022 20:55:32 -0700 (PDT) Received: from mail-ash-it-01.broadcom.com (ip174-67-196-173.oc.oc.cox.net. [174.67.196.173]) by smtp.gmail.com with ESMTPSA id ck3-20020a17090afe0300b001cd4989feebsm6065187pjb.55.2022.05.05.20.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 20:55:32 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 06/12] lpfc: Use list_for_each_entry_safe on fc_nodes list in rscn_recovery_check Date: Thu, 5 May 2022 20:55:13 -0700 Message-Id: <20220506035519.50908-7-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220506035519.50908-1-jsmart2021@gmail.com> References: <20220506035519.50908-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org In GID_PT mode with lpfc_ns_query=1, a race condition between iterating the vport->fc_nodes list in lpfc_rscn_recovery_check and cleanup of an ndlp can trigger a crash while processing the RSCN of another initiator from the same zone. During iteration of the vport->fc_nodes list, an ndlp is cleaned up and released. lpfc_dequeue_node is called from lpfc_cleanup_node leading to a bad ndlp dereference in lpfc_rscn_recovery_check. Change list_for_each_entry to list_for_each_entry_safe in lpfc_rscn_recovery_check to protect against removal of an initiator ndlp, while walking the vport->fc_nodes list. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_els.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 583a287b2d0c..3671e0f8e041 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -7708,10 +7708,10 @@ lpfc_rscn_payload_check(struct lpfc_vport *vport, uint32_t did) static int lpfc_rscn_recovery_check(struct lpfc_vport *vport) { - struct lpfc_nodelist *ndlp = NULL; + struct lpfc_nodelist *ndlp = NULL, *n; /* Move all affected nodes by pending RSCNs to NPR state. */ - list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) { + list_for_each_entry_safe(ndlp, n, &vport->fc_nodes, nlp_listp) { if ((ndlp->nlp_state == NLP_STE_UNUSED_NODE) || !lpfc_rscn_payload_check(vport, ndlp->nlp_DID)) continue; From patchwork Fri May 6 03:55: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: 12840542 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 F22C4C433EF for ; Fri, 6 May 2022 03:55:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388877AbiEFD7b (ORCPT ); Thu, 5 May 2022 23:59:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388842AbiEFD7P (ORCPT ); Thu, 5 May 2022 23:59:15 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A5B1DFB6 for ; Thu, 5 May 2022 20:55:34 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id p6so5957178pjm.1 for ; Thu, 05 May 2022 20:55:34 -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=Ji9tEaN7ljTyztkTImBXsG1xCuExSXwSNHR5IBZuZ84=; b=TR3uIAdsON4Aw+2aodYtaIVZXPUjq1YGb+16niL0NhnggmiXQtL9A7v1OEyXmTp4Md 4eTFk/5M+/JMMrk/onzbqcseJrwxHssoT/ysoFkTxsJE7y/gF0lDLkd75/Z5TC8Q17Ry HMAtNdTXHN++AARQ2H3dQfKqa7xxIPcJsPZDgtdhzU8UZ6f97yFUmcDPrbLJKZ+XbCmu HC8s1pwzpvd8ky4H2LX6g3WzTbe1sDodpoWxnV0kCa6tSvIToJQcl4Lz5R5bpmjr95+f aSj4+spcRR0KtHBOgIRntTguE9QCM82COMHZD+kiB+ymsLBo01fIM/sgV/pm+D/T+m3K JFJQ== 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=Ji9tEaN7ljTyztkTImBXsG1xCuExSXwSNHR5IBZuZ84=; b=6HE5i790P5zgqmyF1oOJyIn3G/w73/CYgkhj/mNsJx/2Av07TbwoqFhz7FOO/8FYsZ uL8IDI3fKMIFXpvGe8sEYzhSURYJzo2dsxtyfgrDn9iIXllfFjEAxK9d+U1rwE0U35Yt RUwLN8dq81SgIMMm/RgxqLG/R930vgrjkIfwXByV5HuJHyWdwBiLBagF9ljKRGQR+sgh zMJtLrv7iK3VtMreiFydIb29I7xbdb/i2hkPol74D7Ymor6T++smAfX38rvi7EDL+TxO B/pvsgzdUuIaxinCArTNZPf4QoaA0ZF+o3GNKiL5MYMFybRpbyYvaPca9NzYjvMmu9oL z8SQ== X-Gm-Message-State: AOAM533K2Jt11BWY6Qi2lb/UL3PASxqGpJQxL9jEXPYBweLyQ9ODyjww i5m4d9Stu/3l081w69FiMhd0OpnNdXk= X-Google-Smtp-Source: ABdhPJySrQPGiwLCIOaM/exjWzfqNRS/HPwLxP0rLg3Lb89VjcecsKzAsYnXomMLlE0zWzT4AJvZvA== X-Received: by 2002:a17:903:244c:b0:15e:b3f7:950d with SMTP id l12-20020a170903244c00b0015eb3f7950dmr1473790pls.9.1651809333528; Thu, 05 May 2022 20:55:33 -0700 (PDT) Received: from mail-ash-it-01.broadcom.com (ip174-67-196-173.oc.oc.cox.net. [174.67.196.173]) by smtp.gmail.com with ESMTPSA id ck3-20020a17090afe0300b001cd4989feebsm6065187pjb.55.2022.05.05.20.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 20:55:32 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 07/12] lpfc: Decrement outstanding gidft_inp counter if lpfc_err_lost_link Date: Thu, 5 May 2022 20:55:14 -0700 Message-Id: <20220506035519.50908-8-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220506035519.50908-1-jsmart2021@gmail.com> References: <20220506035519.50908-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org During large NPIV port testing, it was sometimes seen that not all vports would log back in to the target device. There are instances when the fabric is slow to respond to a spam of GID_PT requests and as a result the SLI PORT may abort the GID_PT request because the fabric takes so long. lpfc_cmpl_ct_cmd_gid_pt would enter the lpfc_err_lost_link logic and attempt to lpfc_els_flush_rscn, which is fine, but forgets to decrement the gidft_inp counter. This results in a vport->gidft_inp never reaching 0 and never restarting discovery again. Decrement vport->gidft_inp if lpfc_err_lost_link is true for both lpfc_cmpl_ct_cmd_gid_pt and lpfc_cmpl_ct_cmd_gid_ft. Increase logging info during RSCN timeout and lpfc_err_lost_link events. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_ct.c | 16 ++++++++++++++-- drivers/scsi/lpfc/lpfc_hbadisc.c | 5 +++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index 6cda8ee25d4f..094199d1006a 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c @@ -960,9 +960,15 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, } if (lpfc_error_lost_link(ulp_status, ulp_word4)) { lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, - "0226 NS query failed due to link event\n"); + "0226 NS query failed due to link event: " + "ulp_status x%x ulp_word4 x%x fc_flag x%x " + "port_state x%x gidft_inp x%x\n", + ulp_status, ulp_word4, vport->fc_flag, + vport->port_state, vport->gidft_inp); if (vport->fc_flag & FC_RSCN_MODE) lpfc_els_flush_rscn(vport); + if (vport->gidft_inp) + vport->gidft_inp--; goto out; } @@ -1177,9 +1183,15 @@ lpfc_cmpl_ct_cmd_gid_pt(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, } if (lpfc_error_lost_link(ulp_status, ulp_word4)) { lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, - "4166 NS query failed due to link event\n"); + "4166 NS query failed due to link event: " + "ulp_status x%x ulp_word4 x%x fc_flag x%x " + "port_state x%x gidft_inp x%x\n", + ulp_status, ulp_word4, vport->fc_flag, + vport->port_state, vport->gidft_inp); if (vport->fc_flag & FC_RSCN_MODE) lpfc_els_flush_rscn(vport); + if (vport->gidft_inp) + vport->gidft_inp--; goto out; } diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index a833a493a3ee..3ab22ac49e49 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -6355,8 +6355,9 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, "0231 RSCN timeout Data: x%x " - "x%x\n", - vport->fc_ns_retry, LPFC_MAX_NS_RETRY); + "x%x x%x x%x\n", + vport->fc_ns_retry, LPFC_MAX_NS_RETRY, + vport->port_state, vport->gidft_inp); /* Cleanup any outstanding ELS commands */ lpfc_els_flush_cmd(vport); From patchwork Fri May 6 03:55: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: 12840544 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 15D52C433EF for ; Fri, 6 May 2022 03:56:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388890AbiEFD7j (ORCPT ); Thu, 5 May 2022 23:59:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388852AbiEFD7W (ORCPT ); Thu, 5 May 2022 23:59:22 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE153E015 for ; Thu, 5 May 2022 20:55:34 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id y41so442225pfw.12 for ; Thu, 05 May 2022 20:55:34 -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=8G7FCdKjQW8GboICwBoCIFipNJHwbjaqY6MmWWoXJXo=; b=ffpAwD0MDFxZJQEXPzELmQvupBgMl8ovk8NQlXzyGTKs60zY2LzvfDx/XA3NU8jHSR pF5ZaUmyCYHTvKu9jFv91AhdLkGF4/MHRxhun26PUET3+xvj6kBw9QLyLa50y3fmcOnQ 7o09VYlLqz7NtfVIzCElEQQgQh4xBI0ktV5Y5JvNYAIF2ZOkjks/+etKjEZtkAtufFi8 ZXWdOZImxySPecQbo6qcdBrOA5xhR2gvhcJSDeBua+rMBSd1kEJ1IxIXQ8MpYicB6fkt P9vPJ2CIL5ZohtS0Zx4ffLhpWlFiaLxAdl99gqpoYd5Z6dpn61kvIln+tndJsjXoDyG1 4hNg== 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=8G7FCdKjQW8GboICwBoCIFipNJHwbjaqY6MmWWoXJXo=; b=uMj/a7Ukk1QDWebBpD8zllhuw/AD9XvlBuGGETHcxg2MT9TxfryFzkI2zrDlFxZpea O2+DSKQedJ3k1d5Kr+MxHjBHPzE37LWghwZqisA0OrRg73s53gka/KuzytYZHPEZTH3C 3nZJ6gD6pmOjo0VYt178CFXl9fckEBztTE5E/wsSM25MArja9OCGGKvzsmIhr2ZkYWdt 0i7zygXyvEgSj5YX85i01neIL+f6z1lNNBW2imAPwf25ZWDGY2giGSmZ5sfkK2f/EylK EKNzM9Isa/CfIROuHHTUZq3hKRvj9RgwoOjJ6plZhRFB2LUArc/QVI8VDq6uFiZ+xu2K LmNQ== X-Gm-Message-State: AOAM532KMKYaxDbTZZ06tI6PGhskRKkJw5VyZFBjXq+YKkDb1UduW50a R9/QS76GOLsgg4oJ2X7lJNQ1rEEPq9U= X-Google-Smtp-Source: ABdhPJxGDMfMv7MTQwXQtW46V6yBXsir6iOTV1s5s4fmHoMOv03Rl9XchUshYgExsHDvnYRJ8/8Etw== X-Received: by 2002:a05:6a00:1353:b0:50e:982:6a4f with SMTP id k19-20020a056a00135300b0050e09826a4fmr1649375pfu.50.1651809334273; Thu, 05 May 2022 20:55:34 -0700 (PDT) Received: from mail-ash-it-01.broadcom.com (ip174-67-196-173.oc.oc.cox.net. [174.67.196.173]) by smtp.gmail.com with ESMTPSA id ck3-20020a17090afe0300b001cd4989feebsm6065187pjb.55.2022.05.05.20.55.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 20:55:34 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 08/12] lpfc: Change VMID registration to be based on fabric parameters Date: Thu, 5 May 2022 20:55:15 -0700 Message-Id: <20220506035519.50908-9-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220506035519.50908-1-jsmart2021@gmail.com> References: <20220506035519.50908-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Currently, VMID registration is configured via module parameters. This could lead to VMID compatibility issues if two ports are connected to different brands of switches, as the two brands implement VMID differently. Make logical changes so that VMID registration is based on common service parameters from FLOGI_ACC with fabric rather than module parameters. 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 | 3 ++- drivers/scsi/lpfc/lpfc_scsi.c | 17 +++++++++-------- drivers/scsi/lpfc/lpfc_sli.c | 4 ++-- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 405c8a8dd795..f8f5b4a2d523 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -714,6 +714,7 @@ struct lpfc_vport { #define LPFC_VMID_QFPA_CMPL 0x4 #define LPFC_VMID_QOS_ENABLED 0x8 #define LPFC_VMID_TIMER_ENBLD 0x10 +#define LPFC_VMID_TYPE_PRIO 0x20 struct fc_qfpa_res *qfpa_res; struct fc_vport *fc_vport; diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 3671e0f8e041..33fac4401e8f 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1105,7 +1105,8 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, sp->cmn.priority_tagging, kref_read(&ndlp->kref)); if (sp->cmn.priority_tagging) - vport->vmid_flag |= LPFC_VMID_ISSUE_QFPA; + vport->phba->pport->vmid_flag |= (LPFC_VMID_ISSUE_QFPA | + LPFC_VMID_TYPE_PRIO); if (vport->port_state == LPFC_FLOGI) { /* diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 1959c58d22f8..1d134a01ff3e 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -5344,9 +5344,9 @@ static void lpfc_vmid_update_entry(struct lpfc_vport *vport, struct scsi_cmnd { u64 *lta; - if (vport->vmid_priority_tagging) + if (vport->phba->pport->vmid_flag & LPFC_VMID_TYPE_PRIO) tag->cs_ctl_vmid = vmp->un.cs_ctl_vmid; - else + else if (vport->phba->cfg_vmid_app_header) tag->app_id = vmp->un.app_id; if (cmd->sc_data_direction == DMA_TO_DEVICE) @@ -5391,11 +5391,12 @@ static int lpfc_vmid_get_appid(struct lpfc_vport *vport, char *uuid, struct scsi_cmnd * cmd, union lpfc_vmid_io_tag *tag) { struct lpfc_vmid *vmp = NULL; - int hash, len, rc, i; + int hash, len, rc = -EPERM, i; /* check if QFPA is complete */ - if (lpfc_vmid_is_type_priority_tag(vport) && !(vport->vmid_flag & - LPFC_VMID_QFPA_CMPL)) { + if (lpfc_vmid_is_type_priority_tag(vport) && + !(vport->vmid_flag & LPFC_VMID_QFPA_CMPL) && + (vport->vmid_flag & LPFC_VMID_ISSUE_QFPA)) { vport->work_port_events |= WORKER_CHECK_VMID_ISSUE_QFPA; return -EAGAIN; } @@ -5469,7 +5470,7 @@ static int lpfc_vmid_get_appid(struct lpfc_vport *vport, char *uuid, struct vport->vmid_inactivity_timeout ? 1 : 0; /* if type priority tag, get next available VMID */ - if (lpfc_vmid_is_type_priority_tag(vport)) + if (vport->phba->pport->vmid_flag & LPFC_VMID_TYPE_PRIO) lpfc_vmid_assign_cs_ctl(vport, vmp); /* allocate the per cpu variable for holding */ @@ -5488,9 +5489,9 @@ static int lpfc_vmid_get_appid(struct lpfc_vport *vport, char *uuid, struct write_unlock(&vport->vmid_lock); /* complete transaction with switch */ - if (lpfc_vmid_is_type_priority_tag(vport)) + if (vport->phba->pport->vmid_flag & LPFC_VMID_TYPE_PRIO) rc = lpfc_vmid_uvem(vport, vmp, true); - else + else if (vport->phba->cfg_vmid_app_header) rc = lpfc_vmid_cmd(vport, SLI_CTAS_RAPP_IDENT, vmp); if (!rc) { write_lock(&vport->vmid_lock); diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 573526f08baf..79d2ef5f0f05 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -10377,11 +10377,11 @@ lpfc_prep_embed_io(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd) /* add the VMID tags as per switch response */ if (unlikely(piocb->cmd_flag & LPFC_IO_VMID)) { - if (phba->pport->vmid_priority_tagging) { + if (phba->pport->vmid_flag & LPFC_VMID_TYPE_PRIO) { bf_set(wqe_ccpe, &wqe->fcp_iwrite.wqe_com, 1); bf_set(wqe_ccp, &wqe->fcp_iwrite.wqe_com, (piocb->vmid_tag.cs_ctl_vmid)); - } else { + } else if (phba->cfg_vmid_app_header) { bf_set(wqe_appid, &wqe->fcp_iwrite.wqe_com, 1); bf_set(wqe_wqes, &wqe->fcp_iwrite.wqe_com, 1); wqe->words[31] = piocb->vmid_tag.app_id; From patchwork Fri May 6 03:55: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: 12840538 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 C207DC433FE for ; Fri, 6 May 2022 03:55:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388863AbiEFD70 (ORCPT ); Thu, 5 May 2022 23:59:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388848AbiEFD7W (ORCPT ); Thu, 5 May 2022 23:59:22 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCB2EE081 for ; Thu, 5 May 2022 20:55:35 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id k1so6241086pll.4 for ; Thu, 05 May 2022 20:55:35 -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=ImEs3MtGPJm05uXAkraOHBIjk/i143u5sGN6prQhn08=; b=d/gFxna4N4wjok27U5TbNXlzg6nc6mcqnNwWyN/yzEt0drmH1O3d60uNxf0gnKOU4q bKXwhEmV7pTOLnU7zW6XCsrUYZoZNMXmQx15ghuOD6ZZT6r6zWPk5jEQZMY0pcvRZJ8I mrevVdAn2PJfc4wqjvXzghT501xi5ClkNnIBOrerWvTpYcKCr2WPo94geAtm/wyrn4yz w14w7jVQwjVGz1qEYMHunnCu2SAPOdTE0AQmCgrwryyNf3sBh10CMIxHdC5IMAqTQtEH XWzjKkD6JRRpS44LBjfXM71T7a92QLzl3axXc+b1xU2BUzODCbcDOia/ISNsCwOwIe1U J1Zg== 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=ImEs3MtGPJm05uXAkraOHBIjk/i143u5sGN6prQhn08=; b=7mgbilaPJ2KsopFmUtzBSnRZKL1C/8NXITWreQrAe09/Bn27Nr/hzD7SyNgR5X7yU3 jFlQjlUOBGPRoRmkImJaTS7JgD9+DPtxOsS75AlowVc/ZIomu44UuigHdzWi/Pyh1djJ jfnLdm82Ioi2TzvcxB3KZOcOUbTieHdxXhGsCP6WgzoA6Nhs79LP+YvI67wHuA8AvG7O toa1SEzYpP9564tY48/NMAfKtlt9NLZwHHLf8o1BG8KN0sqzY7+oi/ljXFAmITMLewRC 2U6dNVWMF+BghXCx2RKcyzpbvqms8dt24/T9BPM4OCI0afQu3zD3iqChFH5mJUAtEVzi yPbw== X-Gm-Message-State: AOAM5336mpUXsdbld5iu3Wn4za2DJtQZPqM/HU4v8/YPKU8Ud1xpvYc9 73lN1sVc62JjaiKWAfV4/MkIBQrfiEY= X-Google-Smtp-Source: ABdhPJzW3k5QXGPKcq0aVB1eWEfy27CoJ5vC4WG+OeaVCiUwCZ1qA5ezlp7a9151eCX0x1o6NqOtww== X-Received: by 2002:a17:902:bf0a:b0:15c:df1b:f37d with SMTP id bi10-20020a170902bf0a00b0015cdf1bf37dmr1562570plb.90.1651809335054; Thu, 05 May 2022 20:55:35 -0700 (PDT) Received: from mail-ash-it-01.broadcom.com (ip174-67-196-173.oc.oc.cox.net. [174.67.196.173]) by smtp.gmail.com with ESMTPSA id ck3-20020a17090afe0300b001cd4989feebsm6065187pjb.55.2022.05.05.20.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 20:55:34 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 09/12] lpfc: Rework FDMI initialization after link up Date: Thu, 5 May 2022 20:55:16 -0700 Message-Id: <20220506035519.50908-10-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220506035519.50908-1-jsmart2021@gmail.com> References: <20220506035519.50908-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org After a link up, it's possible for the switch to change FDMI support (e.g. FDMI1 vs FDMI2 vs SmartSAN). If the switch reverts to FDMI1, then the revert is currently not detected. Additionally, when NPIV is configured, it's possible the physical port's RHBA is unprocessed by the switch before reciept of an NPIV port issued RPRT. This causes some switches vendors to reject the NPIV's RPRT. Fix by reinitializing base FDMI mode on link up, and defer FDMI vport RPRT submission until after confirming physical port's RHBA is completed. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc.h | 2 + drivers/scsi/lpfc/lpfc_crtn.h | 1 + drivers/scsi/lpfc/lpfc_ct.c | 98 +++++++++++++++++++++++++++++--- drivers/scsi/lpfc/lpfc_hbadisc.c | 5 +- drivers/scsi/lpfc/lpfc_init.c | 43 ++++++++++---- 5 files changed, 129 insertions(+), 20 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index f8f5b4a2d523..da9070cdad91 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -612,6 +612,7 @@ struct lpfc_vport { #define FC_CT_RSNN_NN 0x4 /* RSNN_NN accepted by switch */ #define FC_CT_RSPN_ID 0x8 /* RSPN_ID accepted by switch */ #define FC_CT_RFT_ID 0x10 /* RFT_ID accepted by switch */ +#define FC_CT_RPRT_DEFER 0x20 /* Defer issuing FDMI RPRT */ struct list_head fc_nodes; @@ -1059,6 +1060,7 @@ struct lpfc_hba { #define HBA_HBEAT_INP 0x4000000 /* mbox HBEAT is in progress */ #define HBA_HBEAT_TMO 0x8000000 /* HBEAT initiated after timeout */ #define HBA_FLOGI_OUTSTANDING 0x10000000 /* FLOGI is outstanding */ +#define HBA_RHBA_CMPL 0x20000000 /* RHBA FDMI command is successful */ struct completion *fw_dump_cmpl; /* cmpl event tracker for fw_dump */ uint32_t fcp_ring_in_use; /* When polling test if intr-hndlr active*/ diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index 6f88fd0df8b0..b0775be31d5c 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h @@ -434,6 +434,7 @@ void lpfc_nvmet_buf_free(struct lpfc_hba *phba, void *virtp, dma_addr_t dma); void lpfc_in_buf_free(struct lpfc_hba *, struct lpfc_dmabuf *); void lpfc_rq_buf_free(struct lpfc_hba *phba, struct lpfc_dmabuf *mp); +void lpfc_setup_fdmi_mask(struct lpfc_vport *vport); int lpfc_link_reset(struct lpfc_vport *vport); /* Function prototypes. */ diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index 094199d1006a..9d36b20fb878 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c @@ -2167,6 +2167,41 @@ lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode, return 1; } +/** + * lpfc_fdmi_rprt_defer - Check for any deferred FDMI RPRT commands + * @phba: Pointer to HBA context object. + * @mask: Initial port attributes mask + * + * This function checks to see if any vports have deferred their FDMI RPRT. + * A vports RPRT may be deferred if it is issued before the primary ports + * RHBA completes. + */ +static void +lpfc_fdmi_rprt_defer(struct lpfc_hba *phba, uint32_t mask) +{ + struct lpfc_vport **vports; + struct lpfc_vport *vport; + struct lpfc_nodelist *ndlp; + int i; + + phba->hba_flag |= HBA_RHBA_CMPL; + vports = lpfc_create_vport_work_array(phba); + if (vports) { + for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { + vport = vports[i]; + ndlp = lpfc_findnode_did(phba->pport, FDMI_DID); + if (!ndlp) + continue; + if (vport->ct_flags & FC_CT_RPRT_DEFER) { + vport->ct_flags &= ~FC_CT_RPRT_DEFER; + vport->fdmi_port_mask = mask; + lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RPRT, 0); + } + } + } + lpfc_destroy_vport_work_array(phba, vports); +} + /** * lpfc_cmpl_ct_disc_fdmi - Handle a discovery FDMI completion * @phba: Pointer to HBA context object. @@ -2255,8 +2290,12 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, switch (cmd) { case SLI_MGMT_RHBA: if (vport->fdmi_hba_mask == LPFC_FDMI2_HBA_ATTR) { - /* Fallback to FDMI-1 */ + /* Fallback to FDMI-1 for HBA attributes */ vport->fdmi_hba_mask = LPFC_FDMI1_HBA_ATTR; + + /* If HBA attributes are FDMI1, so should + * port attributes be for consistency. + */ vport->fdmi_port_mask = LPFC_FDMI1_PORT_ATTR; /* Start over */ lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_DHBA, 0); @@ -2264,6 +2303,11 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, return; case SLI_MGMT_RPRT: + if (vport->port_type != LPFC_PHYSICAL_PORT) { + ndlp = lpfc_findnode_did(phba->pport, FDMI_DID); + if (!ndlp) + return; + } if (vport->fdmi_port_mask == LPFC_FDMI2_PORT_ATTR) { /* Fallback to FDMI-1 */ vport->fdmi_port_mask = LPFC_FDMI1_PORT_ATTR; @@ -2313,6 +2357,9 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, */ switch (cmd) { case SLI_MGMT_RHBA: + /* Check for any RPRTs deferred till after RHBA completes */ + lpfc_fdmi_rprt_defer(phba, vport->fdmi_port_mask); + lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RPA, 0); break; @@ -2321,10 +2368,26 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, break; case SLI_MGMT_DPRT: - if (vport->port_type == LPFC_PHYSICAL_PORT) + if (vport->port_type == LPFC_PHYSICAL_PORT) { lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RHBA, 0); - else - lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RPRT, 0); + } else { + ndlp = lpfc_findnode_did(phba->pport, FDMI_DID); + if (!ndlp) + return; + + /* Only issue a RPRT for the vport if the RHBA + * for the physical port completes successfully. + * We may have to defer the RPRT accordingly. + */ + if (phba->hba_flag & HBA_RHBA_CMPL) { + lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RPRT, 0); + } else { + lpfc_printf_vlog(vport, KERN_INFO, + LOG_DISCOVERY, + "6078 RPRT deferred\n"); + vport->ct_flags |= FC_CT_RPRT_DEFER; + } + } break; case SLI_MGMT_RPA: if (vport->port_type == LPFC_PHYSICAL_PORT && @@ -2339,7 +2402,8 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, break; } - lpfc_printf_log(phba, KERN_INFO, LOG_CGN_MGMT, + lpfc_printf_log(phba, KERN_INFO, + LOG_DISCOVERY | LOG_CGN_MGMT, "6210 Issue Vendor MI FDMI %x\n", phba->sli4_hba.pc_sli4_params.mi_ver); @@ -2408,6 +2472,9 @@ lpfc_fdmi_change_check(struct lpfc_vport *vport) phba->link_flag &= ~LS_CT_VEN_RPA; lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_DHBA, 0); } else { + ndlp = lpfc_findnode_did(phba->pport, FDMI_DID); + if (!ndlp) + return; lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_DPRT, 0); } @@ -2429,6 +2496,9 @@ lpfc_fdmi_change_check(struct lpfc_vport *vport) lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RPA, LPFC_FDMI_PORT_ATTR_num_disc); } else { + ndlp = lpfc_findnode_did(phba->pport, FDMI_DID); + if (!ndlp) + return; lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RPRT, LPFC_FDMI_PORT_ATTR_num_disc); } @@ -3501,8 +3571,10 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, /* FDMI request */ lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, - "0218 FDMI Request Data: x%x x%x x%x\n", - vport->fc_flag, vport->port_state, cmdcode); + "0218 FDMI Request x%x mask x%x Data: x%x x%x x%x\n", + cmdcode, new_mask, vport->fdmi_port_mask, + vport->fc_flag, vport->port_state); + CtReq = (struct lpfc_sli_ct_request *)mp->virt; /* First populate the CT_IU preamble */ @@ -3571,6 +3643,12 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, break; case SLI_MGMT_RPRT: + if (vport->port_type != LPFC_PHYSICAL_PORT) { + ndlp = lpfc_findnode_did(phba->pport, FDMI_DID); + if (!ndlp) + return 0; + } + fallthrough; case SLI_MGMT_RPA: pab = (struct lpfc_fdmi_reg_portattr *)&CtReq->un.PortID; if (cmdcode == SLI_MGMT_RPRT) { @@ -3635,6 +3713,12 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, rsp_size = FC_MAX_NS_RSP; fallthrough; case SLI_MGMT_DPRT: + if (vport->port_type != LPFC_PHYSICAL_PORT) { + ndlp = lpfc_findnode_did(phba->pport, FDMI_DID); + if (!ndlp) + return 0; + } + fallthrough; case SLI_MGMT_DPA: pe = (struct lpfc_fdmi_port_entry *)&CtReq->un.PortID; memcpy((uint8_t *)&pe->PortName, diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 3ab22ac49e49..fb36f26170e4 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -1359,6 +1359,7 @@ lpfc_linkup_port(struct lpfc_vport *vport) vport->fc_flag |= FC_NDISC_ACTIVE; vport->fc_ns_retry = 0; spin_unlock_irq(shost->host_lock); + lpfc_setup_fdmi_mask(vport); lpfc_linkup_cleanup_nodes(vport); } @@ -1390,8 +1391,8 @@ lpfc_linkup(struct lpfc_hba *phba) phba->pport->rcv_flogi_cnt = 0; spin_unlock_irq(shost->host_lock); - /* reinitialize initial FLOGI flag */ - phba->hba_flag &= ~(HBA_FLOGI_ISSUED); + /* reinitialize initial HBA flag */ + phba->hba_flag &= ~(HBA_FLOGI_ISSUED | HBA_RHBA_CMPL); phba->defer_flogi_acc_flag = false; return 0; diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 39267016f339..0dedb7cf621b 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -9002,6 +9002,36 @@ lpfc_hba_free(struct lpfc_hba *phba) return; } +/** + * lpfc_setup_fdmi_mask - Setup initial FDMI mask for HBA and Port attributes + * @vport: pointer to lpfc vport data structure. + * + * This routine is will setup initial FDMI attribute masks for + * FDMI2 or SmartSAN depending on module parameters. The driver will attempt + * to get these attributes first before falling back, the attribute + * fallback hierarchy is SmartSAN -> FDMI2 -> FMDI1 + **/ +void +lpfc_setup_fdmi_mask(struct lpfc_vport *vport) +{ + struct lpfc_hba *phba = vport->phba; + + vport->load_flag |= FC_ALLOW_FDMI; + if (phba->cfg_enable_SmartSAN || + phba->cfg_fdmi_on == LPFC_FDMI_SUPPORT) { + /* Setup appropriate attribute masks */ + vport->fdmi_hba_mask = LPFC_FDMI2_HBA_ATTR; + if (phba->cfg_enable_SmartSAN) + vport->fdmi_port_mask = LPFC_FDMI2_SMART_ATTR; + else + vport->fdmi_port_mask = LPFC_FDMI2_PORT_ATTR; + } + + lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, + "6077 Setup FDMI mask: hba x%x port x%x\n", + vport->fdmi_hba_mask, vport->fdmi_port_mask); +} + /** * lpfc_create_shost - Create hba physical port with associated scsi host. * @phba: pointer to lpfc hba data structure. @@ -9045,21 +9075,12 @@ lpfc_create_shost(struct lpfc_hba *phba) /* Put reference to SCSI host to driver's device private data */ pci_set_drvdata(phba->pcidev, shost); + lpfc_setup_fdmi_mask(vport); + /* * At this point we are fully registered with PSA. In addition, * any initial discovery should be completed. */ - vport->load_flag |= FC_ALLOW_FDMI; - if (phba->cfg_enable_SmartSAN || - (phba->cfg_fdmi_on == LPFC_FDMI_SUPPORT)) { - - /* Setup appropriate attribute masks */ - vport->fdmi_hba_mask = LPFC_FDMI2_HBA_ATTR; - if (phba->cfg_enable_SmartSAN) - vport->fdmi_port_mask = LPFC_FDMI2_SMART_ATTR; - else - vport->fdmi_port_mask = LPFC_FDMI2_PORT_ATTR; - } return 0; } From patchwork Fri May 6 03:55: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: 12840539 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 72D6FC433F5 for ; Fri, 6 May 2022 03:55:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388855AbiEFD71 (ORCPT ); Thu, 5 May 2022 23:59:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388847AbiEFD7W (ORCPT ); Thu, 5 May 2022 23:59:22 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92AD8E086 for ; Thu, 5 May 2022 20:55:36 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id 15so5152056pgf.4 for ; Thu, 05 May 2022 20:55:36 -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=SlJIELBy4z+xeHf/ycXLYr/gClJrx5Yhe/cSztGWovI=; b=U2gG1hzjnXr1tcj4X6q3kwzjQy/ENn7nZevEZ+9R7ajSNWZaacgJzyChhtzOFvWAv+ NZSyC/bogPPt21DyKlf3UFcywlxAmDI64r21nDZxTCXj8caUqM2KqeIYrSSJ2YISsjGc cTbj1l2QDK/67SOXqUrf+eig9Cjb57YViACqIkVakzGr0bmHkTfqXxk1XfZ7Ek1zDSHu S+w3FQ4cUBocVl3Zxh99MIre3wRrTFktM4d4d+EEDK6my7be8rEJ4qs3FRmIMS6VYfPo MSwgWYCxP5CZFdT2FAQ7IiHQ/WseT876xqpepbYrrsZj1e5N/c97+tw92l29Sf6gnm7P SJ1w== 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=SlJIELBy4z+xeHf/ycXLYr/gClJrx5Yhe/cSztGWovI=; b=U2TbKczlUJy2VAlLjAWnCXYx+njpAmbosFtAMTQML2TBCON5OFrI7vbz/DzmvIEwxK ATmqduMEvGRrlYcxrTkdu6FY7q3gLdTLseLgbm9lZP9AyL4BlFNR8eG2jtEqcw6EZcqC N9kbGNQ+EoX4deV/0fudx3qkJqxq9WY+w5qq8fXgthrOmfVFwIcq6kwsHs0LZ+ETifxX 3IH0G39Jxq4NV09AHEghIFJpUWC/mlnv+C/ErNJ/wgC0M0WNde0LCiNocyUcNBeT+kP8 Ju4RNJw9L1LrkwHORWSqp9AwOjEjB2hemy4yL3hTm8rqdY+JKAanGbDRKblkYUy/+Biy p2BQ== X-Gm-Message-State: AOAM531FSR8U0Yjn8Om3TKpmhtan983o+cIyPlSOMWvZ/k3eRHetr1Oi NQ3uH3sweUGPyzY3VVqnqubdV8U3MBE= X-Google-Smtp-Source: ABdhPJzmnhVyp3egkTrU8QkVk0tLf+c2QZIjNLK2OPF2DX235miV9ebaE0wp0RVW27A+e4aj90EiUA== X-Received: by 2002:a63:680a:0:b0:3c2:7c45:c0ab with SMTP id d10-20020a63680a000000b003c27c45c0abmr1190955pgc.63.1651809335894; Thu, 05 May 2022 20:55:35 -0700 (PDT) Received: from mail-ash-it-01.broadcom.com (ip174-67-196-173.oc.oc.cox.net. [174.67.196.173]) by smtp.gmail.com with ESMTPSA id ck3-20020a17090afe0300b001cd4989feebsm6065187pjb.55.2022.05.05.20.55.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 20:55:35 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 10/12] lpfc: Alter FPIN stat accounting logic Date: Thu, 5 May 2022 20:55:17 -0700 Message-Id: <20220506035519.50908-11-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220506035519.50908-1-jsmart2021@gmail.com> References: <20220506035519.50908-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org When configuring CMF management based on signals instead of FPINs, FPIN alarm and warning statistics are not tracked. Change the behavior so that FPIN alarms and warnings are always tracked regardless of the configured mode. Similar changes are made in the CMF signal stat accounting logic. Upon receipt of a signal, only track signaled alarms and warnings. FPIN stats should not be incremented upon receipt of a signal. Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_els.c | 49 +++++++++++------------------------ drivers/scsi/lpfc/lpfc_init.c | 22 ++-------------- 2 files changed, 17 insertions(+), 54 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 33fac4401e8f..51c505d15410 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -3854,9 +3854,6 @@ lpfc_least_capable_settings(struct lpfc_hba *phba, { u32 rsp_sig_cap = 0, drv_sig_cap = 0; u32 rsp_sig_freq_cyc = 0, rsp_sig_freq_scale = 0; - struct lpfc_cgn_info *cp; - u32 crc; - u16 sig_freq; /* Get rsp signal and frequency capabilities. */ rsp_sig_cap = be32_to_cpu(pcgd->xmt_signal_capability); @@ -3912,25 +3909,7 @@ lpfc_least_capable_settings(struct lpfc_hba *phba, } } - if (!phba->cgn_i) - return; - - /* Update signal frequency in congestion info buffer */ - cp = (struct lpfc_cgn_info *)phba->cgn_i->virt; - - /* Frequency (in ms) Signal Warning/Signal Congestion Notifications - * are received by the HBA - */ - sig_freq = phba->cgn_sig_freq; - - if (phba->cgn_reg_signal == EDC_CG_SIG_WARN_ONLY) - cp->cgn_warn_freq = cpu_to_le16(sig_freq); - if (phba->cgn_reg_signal == EDC_CG_SIG_WARN_ALARM) { - cp->cgn_alarm_freq = cpu_to_le16(sig_freq); - cp->cgn_warn_freq = cpu_to_le16(sig_freq); - } - crc = lpfc_cgn_calc_crc32(cp, LPFC_CGN_INFO_SZ, LPFC_CGN_CRC32_SEED); - cp->cgn_info_crc = cpu_to_le32(crc); + /* We are NOT recording signal frequency in congestion info buffer */ return; out_no_support: @@ -9919,11 +9898,14 @@ lpfc_els_rcv_fpin_cgn(struct lpfc_hba *phba, struct fc_tlv_desc *tlv) /* Take action here for an Alarm event */ if (phba->cmf_active_mode != LPFC_CFG_OFF) { if (phba->cgn_reg_fpin & LPFC_CGN_FPIN_ALARM) { - /* Track of alarm cnt for cgn_info */ - atomic_inc(&phba->cgn_fabric_alarm_cnt); /* Track of alarm cnt for SYNC_WQE */ atomic_inc(&phba->cgn_sync_alarm_cnt); } + /* Track alarm cnt for cgn_info regardless + * of whether CMF is configured for Signals + * or FPINs. + */ + atomic_inc(&phba->cgn_fabric_alarm_cnt); goto cleanup; } break; @@ -9931,11 +9913,14 @@ lpfc_els_rcv_fpin_cgn(struct lpfc_hba *phba, struct fc_tlv_desc *tlv) /* Take action here for a Warning event */ if (phba->cmf_active_mode != LPFC_CFG_OFF) { if (phba->cgn_reg_fpin & LPFC_CGN_FPIN_WARN) { - /* Track of warning cnt for cgn_info */ - atomic_inc(&phba->cgn_fabric_warn_cnt); /* Track of warning cnt for SYNC_WQE */ atomic_inc(&phba->cgn_sync_warn_cnt); } + /* Track warning cnt and freq for cgn_info + * regardless of whether CMF is configured for + * Signals or FPINs. + */ + atomic_inc(&phba->cgn_fabric_warn_cnt); cleanup: /* Save frequency in ms */ phba->cgn_fpin_frequency = @@ -9944,14 +9929,10 @@ lpfc_els_rcv_fpin_cgn(struct lpfc_hba *phba, struct fc_tlv_desc *tlv) if (phba->cgn_i) { cp = (struct lpfc_cgn_info *) phba->cgn_i->virt; - if (phba->cgn_reg_fpin & - LPFC_CGN_FPIN_ALARM) - cp->cgn_alarm_freq = - cpu_to_le16(value); - if (phba->cgn_reg_fpin & - LPFC_CGN_FPIN_WARN) - cp->cgn_warn_freq = - cpu_to_le16(value); + cp->cgn_alarm_freq = + cpu_to_le16(value); + cp->cgn_warn_freq = + cpu_to_le16(value); crc = lpfc_cgn_calc_crc32 (cp, LPFC_CGN_INFO_SZ, diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 0dedb7cf621b..2bffaa681fcc 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -5864,21 +5864,8 @@ lpfc_cgn_save_evt_cnt(struct lpfc_hba *phba) /* Use the frequency found in the last rcv'ed FPIN */ value = phba->cgn_fpin_frequency; - if (phba->cgn_reg_fpin & LPFC_CGN_FPIN_WARN) - cp->cgn_warn_freq = cpu_to_le16(value); - if (phba->cgn_reg_fpin & LPFC_CGN_FPIN_ALARM) - cp->cgn_alarm_freq = cpu_to_le16(value); - - /* Frequency (in ms) Signal Warning/Signal Congestion Notifications - * are received by the HBA - */ - value = phba->cgn_sig_freq; - - if (phba->cgn_reg_signal == EDC_CG_SIG_WARN_ONLY || - phba->cgn_reg_signal == EDC_CG_SIG_WARN_ALARM) - cp->cgn_warn_freq = cpu_to_le16(value); - if (phba->cgn_reg_signal == EDC_CG_SIG_WARN_ALARM) - cp->cgn_alarm_freq = cpu_to_le16(value); + cp->cgn_warn_freq = cpu_to_le16(value); + cp->cgn_alarm_freq = cpu_to_le16(value); lvalue = lpfc_cgn_calc_crc32(cp, LPFC_CGN_INFO_SZ, LPFC_CGN_CRC32_SEED); @@ -6585,9 +6572,6 @@ lpfc_sli4_async_sli_evt(struct lpfc_hba *phba, struct lpfc_acqe_sli *acqe_sli) /* Alarm overrides warning, so check that first */ if (cgn_signal->alarm_cnt) { if (phba->cgn_reg_signal == EDC_CG_SIG_WARN_ALARM) { - /* Keep track of alarm cnt for cgn_info */ - atomic_add(cgn_signal->alarm_cnt, - &phba->cgn_fabric_alarm_cnt); /* Keep track of alarm cnt for CMF_SYNC_WQE */ atomic_add(cgn_signal->alarm_cnt, &phba->cgn_sync_alarm_cnt); @@ -6596,8 +6580,6 @@ lpfc_sli4_async_sli_evt(struct lpfc_hba *phba, struct lpfc_acqe_sli *acqe_sli) /* signal action needs to be taken */ if (phba->cgn_reg_signal == EDC_CG_SIG_WARN_ONLY || phba->cgn_reg_signal == EDC_CG_SIG_WARN_ALARM) { - /* Keep track of warning cnt for cgn_info */ - atomic_add(cnt, &phba->cgn_fabric_warn_cnt); /* Keep track of warning cnt for CMF_SYNC_WQE */ atomic_add(cnt, &phba->cgn_sync_warn_cnt); } From patchwork Fri May 6 03:55: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: 12840543 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 EB3F0C433F5 for ; Fri, 6 May 2022 03:55:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388878AbiEFD7e (ORCPT ); Thu, 5 May 2022 23:59:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388851AbiEFD7W (ORCPT ); Thu, 5 May 2022 23:59:22 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69CED12AB1 for ; Thu, 5 May 2022 20:55:37 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id j6so5248581pfe.13 for ; Thu, 05 May 2022 20:55:37 -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=XO6QjupNFyPtXmjpMd71skiI90TCPe3nMuV/Fs5xeAI=; b=oqLSN7WLP9y0sIRa16KN+U56MscCngbYR+cbMo0is5leosxvHCC1oXIZGRB/K/hEfF tHrbgbxIW1HZki8PjGucO6bUTQu2zee1b8n9tcEHkCOFEIFhjcU6nwDciPvhgefqZYxp rad9NQudb1w2U4ndVGG30Hpv7ANCenE2UtJPKXAdRIoZAd86ST4+Cp5A/qnr1NYAOBak xsaS+DMwEDF5Z1nKmRpbOR2OD4uxYKNIS7IRnxV4ggHo6mriGwQ4Ewoyd8sL1M1vAry0 WBJjtPZ9kZeuQhsTFqzfxP2dwO607NxTnMKF7xLl49HudhXvC1xdbYNtUB9n5X8Txl91 tpBg== 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=XO6QjupNFyPtXmjpMd71skiI90TCPe3nMuV/Fs5xeAI=; b=7+mEbg1B4XPFlPgftgk9iJHEEFSCUtt7la59hzho71djVgokx9f4JNk7IJATq1wtWD pQWXIWW2rWzLhVeWKwPIlBc6E4QUnVDTAwDv885FneIZPuR7ruwp8thbF4PP8NuJyDOU /ur7KTaFtVmfMSMh9VLb2UlBtVgK8U2hlmj6xsvgqhIg1X8j20K7VoXqzx3rBZynWR22 LB2xzNT0tutRYLul4aCuvX9hxfQzBekcoRzphu1RdbHcNa5Jkcqf1zR5zcUagex5YHY3 Q3bzV628QEaQi2GLUvKH1Gsfk7tHaymPPFk/Atwhb1dTisETGxqYZDYSfSoc0o1tQDEm Dbcg== X-Gm-Message-State: AOAM532yk5UK1uga6YPlf5m5QdtymUxf/gGiO99OzPK9F5e/oYFtCbJi 7QBMTnPqT8ypBw9fnlLaHpy2Q1Zc240= X-Google-Smtp-Source: ABdhPJzU9OYmvzxJWlhDvOj3w4jBlBCCIwXaWnGKt1RRi8JNR024fvvH/4kK+LSAk5VmPYYMNGi7pw== X-Received: by 2002:a63:8b49:0:b0:3c6:1ec9:a018 with SMTP id j70-20020a638b49000000b003c61ec9a018mr1176854pge.451.1651809336808; Thu, 05 May 2022 20:55:36 -0700 (PDT) Received: from mail-ash-it-01.broadcom.com (ip174-67-196-173.oc.oc.cox.net. [174.67.196.173]) by smtp.gmail.com with ESMTPSA id ck3-20020a17090afe0300b001cd4989feebsm6065187pjb.55.2022.05.05.20.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 20:55:36 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Nigel Kirkland Subject: [PATCH 11/12] lpfc: Use sg_dma_address and sg_dma_len macros for NVMe I/O Date: Thu, 5 May 2022 20:55:18 -0700 Message-Id: <20220506035519.50908-12-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220506035519.50908-1-jsmart2021@gmail.com> References: <20220506035519.50908-1-jsmart2021@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org NVME I/O problems may be seen on IOMMU enabled platforms. Adapter I/O's failing with transfer length mismatches. The sg list processing routine for nvme I/O is accessing the sg entry directly for the length and address fields. On some iommu platforms, contigous mappings are compressed to the first sg entry with the sum of the lengths set to the sg entry dma_length field. The length fields are left for later use by the unmap call. As such, the driver didn't see the actual dma_length value, just the first entries length value. Drivers are to use the sg_dma_length and sg_dma_address macros to reference the sg entry. The macros select the proper length field (dma_length or length) to reference. Fix the offending code to use the sg_dma_xxx macros. Signed-off-by: Nigel Kirkland Signed-off-by: James Smart Tested-by: Jerry Snitselaar Reviewed-by: Jerry Snitselaar --- drivers/scsi/lpfc/lpfc_nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index 3aebd01e07fd..5385f4de5523 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -1401,8 +1401,8 @@ lpfc_nvme_prep_io_dma(struct lpfc_vport *vport, if ((nseg - 1) == i) bf_set(lpfc_sli4_sge_last, sgl, 1); - physaddr = data_sg->dma_address; - dma_len = data_sg->length; + physaddr = sg_dma_address(data_sg); + dma_len = sg_dma_len(data_sg); sgl->addr_lo = cpu_to_le32( putPaddrLow(physaddr)); sgl->addr_hi = cpu_to_le32( From patchwork Fri May 6 03:55: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: 12840545 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 F1FC8C433F5 for ; Fri, 6 May 2022 03:56:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388852AbiEFD7l (ORCPT ); Thu, 5 May 2022 23:59:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388856AbiEFD7W (ORCPT ); Thu, 5 May 2022 23:59:22 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26A6A14099 for ; Thu, 5 May 2022 20:55:38 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id qe3-20020a17090b4f8300b001dc24e4da73so6821361pjb.1 for ; Thu, 05 May 2022 20:55:38 -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=RRiklrwfeFpT22jLAKe6QaKiYruMKel+3owLkp87EMk=; b=TgI7qt1n13v1vBypLBYOsf4ctyZgQpad9cda9B7faIcNhYg+6tieeklM2EkF08+bNB G4G/6UzGWAxMGmgjpgnqkx0nEsH6hzZZb7+bmnOvMtdY7Lq3q6A3l9BIwzMpUV0k/EEe nc7GqCK4K9Re/CeWqIunTJshBul7wukwPbrHVQ2g3EqZ0cJRp2AliizPUQ2TTH9kbrRA 4RwIS0UfxQp0lRIz12xXrv7BgnsVOK6dh3g/h29J3mOCCM2Z0Kn+ugVY86U8XIqqzrUV M2GKz/16nyatknVMoJaO3JQu4h878SfkaEaPK/7xC7jdcuIfC6KZwfYDnLawrCr+W1Dw TQYQ== 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=RRiklrwfeFpT22jLAKe6QaKiYruMKel+3owLkp87EMk=; b=znFeMaKTAfO2AqYEepVBWJHtxhGr1XaT00GIUY/e0zbzxcE5g8U28ZzU8PnmOVNRWR JAwL90u9dpPrWWQV33E4S2Irw7zMVE/FKAo1tBwJvVo2yGx0GT+RworktSVvlN0Rx+Fw 9AMRatLAcxrsD5hrxhve5s48RYjDxTVHFsnKVjw0Z48gNQrgB9KpQZg0h09s41K/kbH9 mS2PoIrfqSQwprZmk9YbdpYe1PWuypqhi4pkrtqS3y0B98QYsyv5pOAMut/emHK3hHHc cRMUXinQglGuinZXOYAshq9MdHMg8qs3yw659UUnLAslhn5OxTIQgsQIVh47Q0CTbe02 3KQg== X-Gm-Message-State: AOAM530sCQyGJHGSaU7Zt84MeTfCmdIuATl82PdA7+IzjIaHfiCcVH/m Mx2+VDNOENzFp9JOw5MVbn3dk8t52aw= X-Google-Smtp-Source: ABdhPJzosv5+N9aOCeMcukA6e15dpuKqwQoW9CSBKfwh+0ZWTXvPEw9CMUiMtwBZx0Se8YWv69gSOQ== X-Received: by 2002:a17:90b:4d0c:b0:1dc:d293:148c with SMTP id mw12-20020a17090b4d0c00b001dcd293148cmr2841823pjb.75.1651809337512; Thu, 05 May 2022 20:55:37 -0700 (PDT) Received: from mail-ash-it-01.broadcom.com (ip174-67-196-173.oc.oc.cox.net. [174.67.196.173]) by smtp.gmail.com with ESMTPSA id ck3-20020a17090afe0300b001cd4989feebsm6065187pjb.55.2022.05.05.20.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 20:55:37 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Justin Tee Subject: [PATCH 12/12] lpfc: Update lpfc version to 14.2.0.3 Date: Thu, 5 May 2022 20:55:19 -0700 Message-Id: <20220506035519.50908-13-jsmart2021@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220506035519.50908-1-jsmart2021@gmail.com> References: <20220506035519.50908-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.3 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 a615011c282d..4fab79ed58ed 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.2" +#define LPFC_DRIVER_VERSION "14.2.0.3" #define LPFC_DRIVER_NAME "lpfc" /* Used for SLI 2/3 */