Skip to content

Commit 3d6776a

Browse files
Merge patch series "Update lpfc to revision 14.4.0.0"
Justin Tee <justintee8345@gmail.com> says: Update lpfc to revision 14.4.0.0 This patch set contains fixes identified by static code analyzers, updates to log messaging, bug fixes related to discovery and congestion management, and clean up patches regarding the abuse of shost lock in the driver. The patches were cut against Martin's 6.9/scsi-queue tree. Link: https://lore.kernel.org/r/20240131185112.149731-1-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 parents 3f90ac7 + ea4044e commit 3d6776a

17 files changed

+717
-873
lines changed

drivers/scsi/lpfc/lpfc.h

Lines changed: 51 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*******************************************************************
22
* This file is part of the Emulex Linux Device Driver for *
33
* Fibre Channel Host Bus Adapters. *
4-
* Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term *
4+
* Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
55
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
66
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
77
* EMULEX and SLI are trademarks of Emulex. *
@@ -535,6 +535,44 @@ struct lpfc_cgn_acqe_stat {
535535
atomic64_t warn;
536536
};
537537

538+
enum lpfc_fc_flag {
539+
/* Several of these flags are HBA centric and should be moved to
540+
* phba->link_flag (e.g. FC_PTP, FC_PUBLIC_LOOP)
541+
*/
542+
FC_PT2PT, /* pt2pt with no fabric */
543+
FC_PT2PT_PLOGI, /* pt2pt initiate PLOGI */
544+
FC_DISC_TMO, /* Discovery timer running */
545+
FC_PUBLIC_LOOP, /* Public loop */
546+
FC_LBIT, /* LOGIN bit in loopinit set */
547+
FC_RSCN_MODE, /* RSCN cmd rcv'ed */
548+
FC_NLP_MORE, /* More node to process in node tbl */
549+
FC_OFFLINE_MODE, /* Interface is offline for diag */
550+
FC_FABRIC, /* We are fabric attached */
551+
FC_VPORT_LOGO_RCVD, /* LOGO received on vport */
552+
FC_RSCN_DISCOVERY, /* Auth all devices after RSCN */
553+
FC_LOGO_RCVD_DID_CHNG, /* FDISC on phys port detect DID chng */
554+
FC_PT2PT_NO_NVME, /* Don't send NVME PRLI */
555+
FC_SCSI_SCAN_TMO, /* scsi scan timer running */
556+
FC_ABORT_DISCOVERY, /* we want to abort discovery */
557+
FC_NDISC_ACTIVE, /* NPort discovery active */
558+
FC_BYPASSED_MODE, /* NPort is in bypassed mode */
559+
FC_VPORT_NEEDS_REG_VPI, /* Needs to have its vpi registered */
560+
FC_RSCN_DEFERRED, /* A deferred RSCN being processed */
561+
FC_VPORT_NEEDS_INIT_VPI, /* Need to INIT_VPI before FDISC */
562+
FC_VPORT_CVL_RCVD, /* VLink failed due to CVL */
563+
FC_VFI_REGISTERED, /* VFI is registered */
564+
FC_FDISC_COMPLETED, /* FDISC completed */
565+
FC_DISC_DELAYED, /* Delay NPort discovery */
566+
};
567+
568+
enum lpfc_load_flag {
569+
FC_LOADING, /* HBA in process of loading drvr */
570+
FC_UNLOADING, /* HBA in process of unloading drvr */
571+
FC_ALLOW_FDMI, /* port is ready for FDMI requests */
572+
FC_ALLOW_VMID, /* Allow VMID I/Os */
573+
FC_DEREGISTER_ALL_APP_ID /* Deregister all VMIDs */
574+
};
575+
538576
struct lpfc_vport {
539577
struct lpfc_hba *phba;
540578
struct list_head listentry;
@@ -549,34 +587,7 @@ struct lpfc_vport {
549587
uint8_t vpi_state;
550588
#define LPFC_VPI_REGISTERED 0x1
551589

552-
uint32_t fc_flag; /* FC flags */
553-
/* Several of these flags are HBA centric and should be moved to
554-
* phba->link_flag (e.g. FC_PTP, FC_PUBLIC_LOOP)
555-
*/
556-
#define FC_PT2PT 0x1 /* pt2pt with no fabric */
557-
#define FC_PT2PT_PLOGI 0x2 /* pt2pt initiate PLOGI */
558-
#define FC_DISC_TMO 0x4 /* Discovery timer running */
559-
#define FC_PUBLIC_LOOP 0x8 /* Public loop */
560-
#define FC_LBIT 0x10 /* LOGIN bit in loopinit set */
561-
#define FC_RSCN_MODE 0x20 /* RSCN cmd rcv'ed */
562-
#define FC_NLP_MORE 0x40 /* More node to process in node tbl */
563-
#define FC_OFFLINE_MODE 0x80 /* Interface is offline for diag */
564-
#define FC_FABRIC 0x100 /* We are fabric attached */
565-
#define FC_VPORT_LOGO_RCVD 0x200 /* LOGO received on vport */
566-
#define FC_RSCN_DISCOVERY 0x400 /* Auth all devices after RSCN */
567-
#define FC_LOGO_RCVD_DID_CHNG 0x800 /* FDISC on phys port detect DID chng*/
568-
#define FC_PT2PT_NO_NVME 0x1000 /* Don't send NVME PRLI */
569-
#define FC_SCSI_SCAN_TMO 0x4000 /* scsi scan timer running */
570-
#define FC_ABORT_DISCOVERY 0x8000 /* we want to abort discovery */
571-
#define FC_NDISC_ACTIVE 0x10000 /* NPort discovery active */
572-
#define FC_BYPASSED_MODE 0x20000 /* NPort is in bypassed mode */
573-
#define FC_VPORT_NEEDS_REG_VPI 0x80000 /* Needs to have its vpi registered */
574-
#define FC_RSCN_DEFERRED 0x100000 /* A deferred RSCN being processed */
575-
#define FC_VPORT_NEEDS_INIT_VPI 0x200000 /* Need to INIT_VPI before FDISC */
576-
#define FC_VPORT_CVL_RCVD 0x400000 /* VLink failed due to CVL */
577-
#define FC_VFI_REGISTERED 0x800000 /* VFI is registered */
578-
#define FC_FDISC_COMPLETED 0x1000000/* FDISC completed */
579-
#define FC_DISC_DELAYED 0x2000000/* Delay NPort discovery */
590+
unsigned long fc_flag; /* FC flags */
580591

581592
uint32_t ct_flags;
582593
#define FC_CT_RFF_ID 0x1 /* RFF_ID accepted by switch */
@@ -587,16 +598,18 @@ struct lpfc_vport {
587598
#define FC_CT_RPRT_DEFER 0x20 /* Defer issuing FDMI RPRT */
588599

589600
struct list_head fc_nodes;
601+
spinlock_t fc_nodes_list_lock; /* spinlock for fc_nodes list */
590602

591603
/* Keep counters for the number of entries in each list. */
592-
uint16_t fc_plogi_cnt;
593-
uint16_t fc_adisc_cnt;
594-
uint16_t fc_reglogin_cnt;
595-
uint16_t fc_prli_cnt;
596-
uint16_t fc_unmap_cnt;
597-
uint16_t fc_map_cnt;
598-
uint16_t fc_npr_cnt;
599-
uint16_t fc_unused_cnt;
604+
atomic_t fc_plogi_cnt;
605+
atomic_t fc_adisc_cnt;
606+
atomic_t fc_reglogin_cnt;
607+
atomic_t fc_prli_cnt;
608+
atomic_t fc_unmap_cnt;
609+
atomic_t fc_map_cnt;
610+
atomic_t fc_npr_cnt;
611+
atomic_t fc_unused_cnt;
612+
600613
struct serv_parm fc_sparam; /* buffer for our service parameters */
601614

602615
uint32_t fc_myDID; /* fibre channel S_ID */
@@ -642,12 +655,7 @@ struct lpfc_vport {
642655
struct timer_list els_tmofunc;
643656
struct timer_list delayed_disc_tmo;
644657

645-
uint8_t load_flag;
646-
#define FC_LOADING 0x1 /* HBA in process of loading drvr */
647-
#define FC_UNLOADING 0x2 /* HBA in process of unloading drvr */
648-
#define FC_ALLOW_FDMI 0x4 /* port is ready for FDMI requests */
649-
#define FC_ALLOW_VMID 0x8 /* Allow VMID I/Os */
650-
#define FC_DEREGISTER_ALL_APP_ID 0x10 /* Deregister all VMIDs */
658+
unsigned long load_flag;
651659
/* Vport Config Parameters */
652660
uint32_t cfg_scan_down;
653661
uint32_t cfg_lun_queue_depth;

0 commit comments

Comments
 (0)