lpfc 8.1.10 : Add support for dev_loss_tmo_callbk and fast_io_fail_tmo_callbk
Subsystems (2)
PATCH 3/5 lpfc 8.1.10 : Add support for dev_loss_tmo_callbk and fast_io_fail_tmo_callbk
Add support for new dev_loss_tmo callback
Goodness is that it removes code for a parallel nodev timer that existed in the driver
Add support for the new fast_io_fail callback
Signed-off-by James Smart <[email protected]>
drivers/scsi/lpfc/lpfc.h +3 -0
@@ -285,6 +285,7 @@ #define FC_BYPASSED_MODE 0x20000uint32_t cfg_log_verbose;uint32_t cfg_lun_queue_depth;uint32_t cfg_nodev_tmo; +uint32_t cfg_devloss_tmo;uint32_t cfg_hba_queue_depth;uint32_t cfg_fcp_class;uint32_t cfg_use_adisc;
@@ -303,6 +304,8 @@ #define FC_BYPASSED_MODE 0x20000uint32_t cfg_sg_seg_cnt;uint32_t cfg_sg_dma_buf_size; +uint32_t dev_loss_tmo_changed; +lpfc_vpd_t vpd;/* vital product data */ struct Scsi_Host *host;
drivers/scsi/lpfc/lpfc_attr.c +127 -28
212 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_crtn.h +3 -0
@@ -18,6 +18,7 @@* included with this package. * *******************************************************************/ +struct fc_rport ;void lpfc_dump_mem (struct lpfc_hba *,LPFC_MBOXQ_t *,uint16_t );void lpfc_read_nv (struct lpfc_hba *,LPFC_MBOXQ_t *); int lpfc_read_la(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb,
@@ -200,6 +201,8 @@ extern struct scsi_host_template lpfc_teextern struct fc_function_template lpfc_transport_functions;void lpfc_get_hba_sym_node_name (struct lpfc_hba * phba,uint8_t * symbp); +void lpfc_terminate_rport_io (struct fc_rport *); +void lpfc_dev_loss_tmo_callbk (struct fc_rport *rport);#define ScsiResult (host_code, scsi_code) (((host_code) << 16) | scsi_code)#define HBA_EVENT_RSCN 5
drivers/scsi/lpfc/lpfc_ct.c +0 -25
@@ -324,7 +324,6 @@ lpfc_ns_rsp(struct lpfc_hba * phba, strustruct lpfc_sli_ct_request *Response = (struct lpfc_sli_ct_request *) mp->virt;struct lpfc_nodelist *ndlp =NULL ; -struct lpfc_nodelist *next_ndlp;struct lpfc_dmabuf *mlast, *next_mp;uint32_t *ctptr = (uint32_t *) & Response->un.gid.PortType;uint32_t Did;
@@ -399,30 +398,6 @@ nsout1:* current driver state. */ if (phba->hba_state ==LPFC_HBA_READY ) { - -/* -* Switch ports that connect a loop of multiple targets need -* special consideration. The driver wants to unregister the -* rpi only on the target that was pulled from the loop. On -* RSCN, the driver wants to rediscover an NPort only if the -* driver flagged it as NLP_NPR_2B_DISC. Provided adisc is -* not enabled and the NPort is not capable of retransmissions -* (FC Tape) prevent timing races with the scsi error handler by -* unregistering the Nport's RPI. This action causes all -* outstanding IO to flush back to the midlayer. -*/ -list_for_each_entry_safe (ndlp, next_ndlp, &phba->fc_npr_list, - nlp_listp) { -if (!(ndlp->nlp_flag &NLP_NPR_2B_DISC ) && - (lpfc_rscn_payload_check (phba, ndlp->nlp_DID))) { -if ((phba->cfg_use_adisc ==0 ) && - !(ndlp->nlp_fcp_info & -NLP_FCP_2_DEVICE )) { -lpfc_unreg_rpi (phba, ndlp); - ndlp->nlp_flag &= ~NLP_NPR_ADISC ; - } - } - }lpfc_els_flush_rscn (phba);spin_lock_irq (phba->host->host_lock); phba->fc_flag |=FC_RSCN_MODE ;/* we are still in RSCN mode */
drivers/scsi/lpfc/lpfc_disc.h +1 -5
@@ -30,7 +30,6 @@ #define LPFC_DISC_FLOGI_TMO 10 /*/* worker thread events */ enum lpfc_work_type { -LPFC_EVT_NODEV_TMO ,LPFC_EVT_ONLINE ,LPFC_EVT_OFFLINE ,LPFC_EVT_WARM_START ,
@@ -74,11 +73,9 @@ #define NLP_NO_SID 0xffff#define NLP_FCP_2_DEVICE 0x10/* FCP-2 device */ struct timer_list nlp_delayfunc;/* Used for delayed ELS cmds */ -struct timer_list nlp_tmofunc;/* Used for nodev tmo */ struct fc_rport *rport;/* Corresponding FC transport port structure */ struct lpfc_hba *nlp_phba; -struct lpfc_work_evt nodev_timeout_evt;struct lpfc_work_evt els_retry_evt;unsigned long last_ramp_up_time;/* jiffy of last ramp up */ unsigned long last_q_full_time;/* jiffy of last queue full */
@@ -102,7 +99,6 @@ #define NLP_ADISC_SND 0x80 /* sent#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_NODEV_TMO 0x10000/* nodev timeout is running for node */ #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 */
@@ -169,7 +165,7 @@ #define NLP_STE_FREED_NODE 0xff /*/ /* * For a Link Down, all nodes on the ADISC, PLOGI, unmapped or mapped -* lists will receive a DEVICE_RECOVERY event. If the linkdown or nodev timers +* lists will receive a DEVICE_RECOVERY event. If the linkdown or devloss timers * expire, all effected nodes will receive a DEVICE_RM event. */ /*
drivers/scsi/lpfc/lpfc_hbadisc.c +69 -109
285 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_nportdisc.c +1 -1
@@ -1813,7 +1813,7 @@ lpfc_device_recov_npr_node(struct lpfc_h*/ /* * For a Link Down, all nodes on the ADISC, PLOGI, unmapped or mapped -* lists will receive a DEVICE_RECOVERY event. If the linkdown or nodev timers +* lists will receive a DEVICE_RECOVERY event. If the linkdown or devloss timers * expire, all effected nodes will receive a DEVICE_RM event. */ /*
drivers/scsi/lpfc/lpfc_scsi.c +5 -5
@@ -935,7 +935,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnschedule_timeout_uninterruptible (LPFC_ABORT_WAIT *HZ );spin_lock_irq (phba->host->host_lock);if (++loop_count - > (2 * phba->cfg_nodev_tmo)/LPFC_ABORT_WAIT ) + > (2 * phba->cfg_devloss_tmo)/LPFC_ABORT_WAIT )break ; }
@@ -978,7 +978,7 @@ lpfc_reset_lun_handler(struct scsi_cmndspin_lock_irq (shost->host_lock);/* * If target is not in a MAPPED state, delay the reset until -* target is rediscovered or nodev timeout expires. +* target is rediscovered or devloss timeout expires. */ while (1 ) {if (!pnode)
@@ -1050,7 +1050,7 @@ lpfc_reset_lun_handler(struct scsi_cmndspin_lock_irq (phba->host->host_lock);if (++loopcnt - > (2 * phba->cfg_nodev_tmo)/LPFC_RESET_WAIT ) + > (2 * phba->cfg_devloss_tmo)/LPFC_RESET_WAIT )break ; cnt = lpfc_sli_sum_iocb(phba,
@@ -1151,7 +1151,7 @@ lpfc_reset_bus_handler(struct scsi_cmndspin_lock_irq (phba->host->host_lock);if (++loopcnt - > (2 * phba->cfg_nodev_tmo)/LPFC_RESET_WAIT ) + > (2 * phba->cfg_devloss_tmo)/LPFC_RESET_WAIT )break ; cnt = lpfc_sli_sum_iocb(phba,
@@ -1249,7 +1249,7 @@ lpfc_slave_configure(struct scsi_device* target pointer is stored in the starget_data for the * driver's sysfs entry point functions. */ - rport->dev_loss_tmo = phba->cfg_nodev_tmo +5 ; + rport->dev_loss_tmo = phba->cfg_devloss_tmo;if (phba->cfg_poll &ENABLE_FCP_RING_POLLING ) {lpfc_sli_poll_fcp_ring (phba);