lpfc 8.2.5 : Miscellaneous discovery Fixes
Subsystems (2)
PATCH 4/6 lpfc 8.2.5 : Miscellaneous discovery Fixes
Miscellaneous discovery fixes:
- Flush RSCN buffers on vports when reseting HBA.
- Fix incorrect FLOGI after vport reg failed
- Fix a potential fabric ELS race condition
- Fix handling of failed PLOGI command under high lip rates
- Fix FDISC handling
- Fix debug logging for npiv handling
Signed-off-by James Smart <[email protected]>
---
lpfc.h | 1 lpfc_ct.c | 2 lpfc_disc.h | 33 +++++++------- lpfc_els.c | 133 ++++++++++++++++++++++++++++++++++++++++------------------ lpfc_hw.h | 1 lpfc_init.c | 5 +- lpfc_logmsg.h | 10 +++- lpfc_mem.c | 4 + lpfc_sli.c | 4 - 9 files changed, 127 insertions(+), 66 deletions(-)
drivers/scsi/lpfc/lpfc_ct.c +1 -1
@@ -775,7 +775,7 @@ lpfc_cmpl_ct_cmd_gff_id(struct lpfc_hba"0267 NameServer GFF Rsp " "x%x Error (%d %d) Data: x%x x%x\n" , did, irsp->ulpStatus, irsp->un.ulpWord[4 ], - vport->fc_flag, vport->fc_rscn_id_cnt) + vport->fc_flag, vport->fc_rscn_id_cnt); }/* This is a target port, unregistered port, or the GFF_ID failed */
drivers/scsi/lpfc/lpfc_disc.h +17 -16
@@ -91,25 +91,26 @@ struct lpfc_nodelist { };/* Defines for nlp_flag (uint32) */ -#define NLP_PLOGI_SND 0x20/* sent PLOGI request for this entry */ -#define NLP_PRLI_SND 0x40/* sent PRLI request for this entry */ -#define NLP_ADISC_SND 0x80/* sent ADISC request for this entry */ -#define NLP_LOGO_SND 0x100/* sent LOGO request for this entry */ -#define NLP_RNID_SND 0x400/* sent RNID request for this entry */ -#define NLP_ELS_SND_MASK 0x7e0/* sent ELS request for this entry */ -#define NLP_DEFER_RM 0x10000/* Remove this ndlp if no longer used */ -#define NLP_DELAY_TMO 0x20000/* delay timeout is running for node */ -#define NLP_NPR_2B_DISC 0x40000/* node is included in num_disc_nodes */ -#define NLP_RCV_PLOGI 0x80000/* Rcv'ed PLOGI from remote system */ -#define NLP_LOGO_ACC 0x100000/* Process LOGO after ACC completes */ -#define NLP_TGT_NO_SCSIID 0x200000/* good PRLI but no binding for scsid */ -#define NLP_ACC_REGLOGIN 0x1000000/* Issue Reg Login after successful +#define NLP_PLOGI_SND 0x00000020/* sent PLOGI request for this entry */ +#define NLP_PRLI_SND 0x00000040/* sent PRLI request for this entry */ +#define NLP_ADISC_SND 0x00000080/* sent ADISC request for this entry */ +#define NLP_LOGO_SND 0x00000100/* sent LOGO request for this entry */ +#define NLP_RNID_SND 0x00000400/* sent RNID request for this entry */ +#define NLP_ELS_SND_MASK 0x000007e0/* sent ELS request for this entry */ +#define NLP_DEFER_RM 0x00010000/* Remove this ndlp if no longer used */ +#define NLP_DELAY_TMO 0x00020000/* delay timeout is running for node */ +#define NLP_NPR_2B_DISC 0x00040000/* node is included in num_disc_nodes */ +#define NLP_RCV_PLOGI 0x00080000/* Rcv'ed PLOGI from remote system */ +#define NLP_LOGO_ACC 0x00100000/* Process LOGO after ACC completes */ +#define NLP_TGT_NO_SCSIID 0x00200000/* good PRLI but no binding for scsid */ +#define NLP_ACC_REGLOGIN 0x01000000/* Issue Reg Login after successful ACC */ -#define NLP_NPR_ADISC 0x2000000/* Issue ADISC when dq'ed from +#define NLP_NPR_ADISC 0x02000000/* Issue ADISC when dq'ed from NPR list */ -#define NLP_RM_DFLT_RPI 0x4000000/* need to remove leftover dflt RPI */ -#define NLP_NODEV_REMOVE 0x8000000/* Defer removal till discovery ends */ +#define NLP_RM_DFLT_RPI 0x04000000/* need to remove leftover dflt RPI */ +#define NLP_NODEV_REMOVE 0x08000000/* Defer removal till discovery ends */ #define NLP_TARGET_REMOVE 0x10000000/* Target remove in process */ +#define NLP_SC_REQ 0x20000000/* Target requires authentication */ /* ndlp usage management macros */ #define NLP_CHK_NODE_ACT (ndlp) (((ndlp)->nlp_usg_map \
drivers/scsi/lpfc/lpfc_els.c +92 -41
313 lines not on this page · raw message
drivers/scsi/lpfc/lpfc.h +1 -0
@@ -307,6 +307,7 @@ struct lpfc_vport {uint32_t fc_nlp_cnt;/* outstanding NODELIST requests */ uint32_t fc_rscn_id_cnt;/* count of RSCNs payloads in list */ +uint32_t fc_rscn_flush;/* flag use of fc_rscn_id_list */ struct lpfc_dmabuf *fc_rscn_id_list[FC_MAX_HOLD_RSCN ];struct lpfc_name fc_nodename;/* fc nodename */ struct lpfc_name fc_portname;/* fc portname */
drivers/scsi/lpfc/lpfc_hw.h +1 -0
@@ -581,6 +581,7 @@ struct ls_rjt { /* Structure is in Big E#define LSEXP_INVALID_O_SID 0x15#define LSEXP_INVALID_OX_RX 0x17#define LSEXP_CMD_IN_PROGRESS 0x19 +#define LSEXP_PORT_LOGIN_REQ 0x1E#define LSEXP_INVALID_NPORT_ID 0x1F#define LSEXP_INVALID_SEQ_ID 0x21#define LSEXP_INVALID_XCHG 0x23
drivers/scsi/lpfc/lpfc_init.c +3 -2
@@ -475,7 +475,8 @@ lpfc_hba_down_prep(struct lpfc_hba *phbafor (i =0 ; i <= phba->max_vpi && vports[i] !=NULL ; i++)lpfc_cleanup_discovery_resources (vports[i]);lpfc_destroy_vport_work_array (phba, vports); - }return 0 ; + } +return 0 ; }/************************************************************************/
@@ -1740,9 +1741,9 @@ lpfc_create_port(struct lpfc_hba *phba, vport = (struct lpfc_vport *) shost->hostdata; vport->phba = phba; - vport->load_flag |=FC_LOADING ; vport->fc_flag |=FC_VPORT_NEEDS_REG_VPI ; + vport->fc_rscn_flush =0 ;lpfc_get_vport_cfgparam (vport); shost->unique_id = instance;
drivers/scsi/lpfc/lpfc_logmsg.h +7 -3
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2004-2005 Emulex. All rights reserved. * +* Copyright (C) 2004-2008 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. * * www.emulex.com * * *
@@ -35,11 +35,15 @@#define LOG_ALL_MSG 0xffff/* LOG all messages */ #define lpfc_printf_vlog(vport, level, mask, fmt, arg...) \ + do { \ { if (((mask) &(vport)->cfg_log_verbose) || (level[1] <= '3')) \ dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \ - fmt, (vport)->phba->brd_no, vport->vpi, ##arg); } + fmt, (vport)->phba->brd_no, vport->vpi, ##arg); } \ + } while (0) #define lpfc_printf_log(phba, level, mask, fmt, arg...) \ + do { \ { if (((mask) &(phba)->pport->cfg_log_verbose) || (level[1] <= '3')) \ dev_printk(level, &((phba)->pcidev)->dev, "%d:" \ - fmt, phba->brd_no, ##arg); } + fmt, phba->brd_no, ##arg); } \ + } while (0)
drivers/scsi/lpfc/lpfc_mem.c +3 -1
@@ -265,6 +265,9 @@ lpfc_in_buf_free(struct lpfc_hba *phba, {struct hbq_dmabuf *hbq_entry; +if (!mp) +return ; +if (phba->sli3_options &LPFC_SLI3_HBQ_ENABLED ) { hbq_entry = container_of(mp, struct hbq_dmabuf, dbuf);if (hbq_entry->tag ==-1 ) {
@@ -279,4 +282,3 @@ lpfc_in_buf_free(struct lpfc_hba *phba, }return ; } -
drivers/scsi/lpfc/lpfc_sli.c +2 -2
@@ -2623,14 +2623,14 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phbspin_unlock_irqrestore (&phba->hbalock, drvr_flag);/* Mbox command <mbxCommand> cannot issue */ - LOG_MBOX_CANNOT_ISSUE_DATA(phba, pmbox, psli, flag) +LOG_MBOX_CANNOT_ISSUE_DATA (phba, pmbox, psli, flag);return MBX_NOT_FINISHED ; }if (mb->mbxCommand !=MBX_KILL_BOARD && flag &MBX_NOWAIT && !(readl (phba->HCregaddr) &HC_MBINT_ENA )) {spin_unlock_irqrestore (&phba->hbalock, drvr_flag); - LOG_MBOX_CANNOT_ISSUE_DATA(phba, pmbox, psli, flag) +LOG_MBOX_CANNOT_ISSUE_DATA (phba, pmbox, psli, flag);return MBX_NOT_FINISHED ; }