diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hbadisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index bb015960dbc9..154c715fb3af 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -658,6 +658,8 @@ lpfc_work_done(struct lpfc_hba *phba) | |||
658 | lpfc_ramp_down_queue_handler(phba); | 658 | lpfc_ramp_down_queue_handler(phba); |
659 | if (work_port_events & WORKER_RAMP_UP_QUEUE) | 659 | if (work_port_events & WORKER_RAMP_UP_QUEUE) |
660 | lpfc_ramp_up_queue_handler(phba); | 660 | lpfc_ramp_up_queue_handler(phba); |
661 | if (work_port_events & WORKER_DELAYED_DISC_TMO) | ||
662 | lpfc_delayed_disc_timeout_handler(vport); | ||
661 | } | 663 | } |
662 | lpfc_destroy_vport_work_array(phba, vports); | 664 | lpfc_destroy_vport_work_array(phba, vports); |
663 | 665 | ||
@@ -838,6 +840,11 @@ lpfc_linkdown_port(struct lpfc_vport *vport) | |||
838 | 840 | ||
839 | lpfc_port_link_failure(vport); | 841 | lpfc_port_link_failure(vport); |
840 | 842 | ||
843 | /* Stop delayed Nport discovery */ | ||
844 | spin_lock_irq(shost->host_lock); | ||
845 | vport->fc_flag &= ~FC_DISC_DELAYED; | ||
846 | spin_unlock_irq(shost->host_lock); | ||
847 | del_timer_sync(&vport->delayed_disc_tmo); | ||
841 | } | 848 | } |
842 | 849 | ||
843 | int | 850 | int |
@@ -3160,7 +3167,7 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
3160 | spin_unlock_irq(shost->host_lock); | 3167 | spin_unlock_irq(shost->host_lock); |
3161 | vport->unreg_vpi_cmpl = VPORT_OK; | 3168 | vport->unreg_vpi_cmpl = VPORT_OK; |
3162 | mempool_free(pmb, phba->mbox_mem_pool); | 3169 | mempool_free(pmb, phba->mbox_mem_pool); |
3163 | lpfc_cleanup_vports_rrqs(vport); | 3170 | lpfc_cleanup_vports_rrqs(vport, NULL); |
3164 | /* | 3171 | /* |
3165 | * This shost reference might have been taken at the beginning of | 3172 | * This shost reference might have been taken at the beginning of |
3166 | * lpfc_vport_delete() | 3173 | * lpfc_vport_delete() |
@@ -3900,6 +3907,8 @@ lpfc_drop_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | |||
3900 | if (ndlp->nlp_state == NLP_STE_UNUSED_NODE) | 3907 | if (ndlp->nlp_state == NLP_STE_UNUSED_NODE) |
3901 | return; | 3908 | return; |
3902 | lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNUSED_NODE); | 3909 | lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNUSED_NODE); |
3910 | if (vport->phba->sli_rev == LPFC_SLI_REV4) | ||
3911 | lpfc_cleanup_vports_rrqs(vport, ndlp); | ||
3903 | lpfc_nlp_put(ndlp); | 3912 | lpfc_nlp_put(ndlp); |
3904 | return; | 3913 | return; |
3905 | } | 3914 | } |
@@ -4289,7 +4298,7 @@ lpfc_cleanup_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | |||
4289 | 4298 | ||
4290 | list_del_init(&ndlp->els_retry_evt.evt_listp); | 4299 | list_del_init(&ndlp->els_retry_evt.evt_listp); |
4291 | list_del_init(&ndlp->dev_loss_evt.evt_listp); | 4300 | list_del_init(&ndlp->dev_loss_evt.evt_listp); |
4292 | 4301 | lpfc_cleanup_vports_rrqs(vport, ndlp); | |
4293 | lpfc_unreg_rpi(vport, ndlp); | 4302 | lpfc_unreg_rpi(vport, ndlp); |
4294 | 4303 | ||
4295 | return 0; | 4304 | return 0; |
@@ -4426,10 +4435,11 @@ lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did) | |||
4426 | { | 4435 | { |
4427 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | 4436 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); |
4428 | struct lpfc_nodelist *ndlp; | 4437 | struct lpfc_nodelist *ndlp; |
4438 | unsigned long iflags; | ||
4429 | 4439 | ||
4430 | spin_lock_irq(shost->host_lock); | 4440 | spin_lock_irqsave(shost->host_lock, iflags); |
4431 | ndlp = __lpfc_findnode_did(vport, did); | 4441 | ndlp = __lpfc_findnode_did(vport, did); |
4432 | spin_unlock_irq(shost->host_lock); | 4442 | spin_unlock_irqrestore(shost->host_lock, iflags); |
4433 | return ndlp; | 4443 | return ndlp; |
4434 | } | 4444 | } |
4435 | 4445 | ||