]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/scsi/lpfc/lpfc_ct.c
scsi: lpfc: Revise copyright for new company language
[mirror_ubuntu-hirsute-kernel.git] / drivers / scsi / lpfc / lpfc_ct.c
index 0617c8ea88c6fd582a56e14bbbb62b8df76ed4e6..1cbdc892ff958bc0b156595b76d12fbec5265f29 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the Emulex Linux Device Driver for         *
  * Fibre Channel Host Bus Adapters.                                *
  * Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
- * “Broadcom” refers to Broadcom Limited and/or its subsidiaries.  *
+ * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.     *
  * Copyright (C) 2004-2016 Emulex.  All rights reserved.           *
  * EMULEX and SLI are trademarks of Emulex.                        *
  * www.broadcom.com                                                *
@@ -471,6 +471,11 @@ lpfc_prep_node_fc4type(struct lpfc_vport *vport, uint32_t Did, uint8_t fc4_type)
                                "Parse GID_FTrsp: did:x%x flg:x%x x%x",
                                Did, ndlp->nlp_flag, vport->fc_flag);
 
+                       /* Don't assume the rport is always the previous
+                        * FC4 type.
+                        */
+                       ndlp->nlp_fc4_type &= ~(NLP_FC4_FCP | NLP_FC4_NVME);
+
                        /* By default, the driver expects to support FCP FC4 */
                        if (fc4_type == FC_TYPE_FCP)
                                ndlp->nlp_fc4_type |= NLP_FC4_FCP;
@@ -691,6 +696,11 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                vport->fc_flag &= ~FC_RSCN_DEFERRED;
                spin_unlock_irq(shost->host_lock);
 
+               /* This is a GID_FT completing so the gidft_inp counter was
+                * incremented before the GID_FT was issued to the wire.
+                */
+               vport->gidft_inp--;
+
                /*
                 * Skip processing the NS response
                 * Re-issue the NS cmd