diff options
author | Dick Kennedy <dick.kennedy@broadcom.com> | 2017-08-23 16:55:32 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-08-24 22:29:35 -0400 |
commit | d2aa48761e4f102b672e9ff1b6c8d26af782b286 (patch) | |
tree | c3f3c4996d091da3200ccd8fdb3afc0d748c76f9 /drivers/scsi/lpfc/lpfc_nportdisc.c | |
parent | 2877cbffb79ed121a6bcc5edbe629d3aba36cd29 (diff) | |
download | linux-stable-d2aa48761e4f102b672e9ff1b6c8d26af782b286.tar.gz linux-stable-d2aa48761e4f102b672e9ff1b6c8d26af782b286.tar.bz2 linux-stable-d2aa48761e4f102b672e9ff1b6c8d26af782b286.zip |
scsi: lpfc: Fix rediscovery on switch blade pull
When the switch blade is pulled out then plugged back in, the driver
does not issue a PLOGI to the target
When the switch blade is pulled out, it does not reset the link. The
driver ends up issuing a LOGO to the target, and finally sees devloss.
Since the driver believes that a LOGO is outstanding, it does not issue
a PLOGI to the target upon link up
Correct by placing the ndlp in UNUSED state When devloss happens in
LOGO_ISSUE state.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nportdisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nportdisc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 95b2b43ac37d..a4488d6339c1 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -2192,12 +2192,15 @@ lpfc_device_rm_logo_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, void *arg, uint32_t evt) { /* - * Take no action. If a LOGO is outstanding, then possibly DevLoss has - * timed out and is calling for Device Remove. In this case, the LOGO - * must be allowed to complete in state LOGO_ISSUE so that the rpi - * and other NLP flags are correctly cleaned up. + * DevLoss has timed out and is calling for Device Remove. + * In this case, abort the LOGO and cleanup the ndlp */ - return ndlp->nlp_state; + + lpfc_unreg_rpi(vport, ndlp); + /* software abort outstanding PLOGI */ + lpfc_els_abort(vport->phba, ndlp); + lpfc_drop_node(vport, ndlp); + return NLP_STE_FREED_NODE; } static uint32_t |