diff options
author | James Smart <James.Smart@Emulex.Com> | 2008-06-14 22:52:47 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-12 09:22:27 -0400 |
commit | 0d2b6b83030d6a88cbf7db57f84f2daf0e0b251b (patch) | |
tree | 7523cdfa622916864ccd1cecef6f407a482e35e6 /drivers/scsi/lpfc/lpfc_hbadisc.c | |
parent | 915caaaf622172bd3451e7b76ba9cfcea80e87c7 (diff) |
[SCSI] lpfc 8.2.7 : Discovery Fixes
- Fix ADISC timeout on initiators causing devloss timeout on targets
- Correct FAN processing : port state vs unreg rpi's wasn't consistent
- Correct mismatches between ASICs and PLOGI that would skip PLOGI
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hbadisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 7cb68feb04fd..f3dc19dfac5b 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -1087,6 +1087,8 @@ lpfc_mbx_cmpl_read_la(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
1087 | MAILBOX_t *mb = &pmb->mb; | 1087 | MAILBOX_t *mb = &pmb->mb; |
1088 | struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *) (pmb->context1); | 1088 | struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *) (pmb->context1); |
1089 | 1089 | ||
1090 | /* Unblock ELS traffic */ | ||
1091 | phba->sli.ring[LPFC_ELS_RING].flag &= ~LPFC_STOP_IOCB_EVENT; | ||
1090 | /* Check for error */ | 1092 | /* Check for error */ |
1091 | if (mb->mbxStatus) { | 1093 | if (mb->mbxStatus) { |
1092 | lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT, | 1094 | lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT, |
@@ -1650,7 +1652,6 @@ lpfc_nlp_set_state(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
1650 | ndlp->nlp_DID, old_state, state); | 1652 | ndlp->nlp_DID, old_state, state); |
1651 | 1653 | ||
1652 | if (old_state == NLP_STE_NPR_NODE && | 1654 | if (old_state == NLP_STE_NPR_NODE && |
1653 | (ndlp->nlp_flag & NLP_DELAY_TMO) != 0 && | ||
1654 | state != NLP_STE_NPR_NODE) | 1655 | state != NLP_STE_NPR_NODE) |
1655 | lpfc_cancel_retry_delay_tmo(vport, ndlp); | 1656 | lpfc_cancel_retry_delay_tmo(vport, ndlp); |
1656 | if (old_state == NLP_STE_UNMAPPED_NODE) { | 1657 | if (old_state == NLP_STE_UNMAPPED_NODE) { |
@@ -1687,8 +1688,7 @@ lpfc_dequeue_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | |||
1687 | { | 1688 | { |
1688 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | 1689 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); |
1689 | 1690 | ||
1690 | if ((ndlp->nlp_flag & NLP_DELAY_TMO) != 0) | 1691 | lpfc_cancel_retry_delay_tmo(vport, ndlp); |
1691 | lpfc_cancel_retry_delay_tmo(vport, ndlp); | ||
1692 | if (ndlp->nlp_state && !list_empty(&ndlp->nlp_listp)) | 1692 | if (ndlp->nlp_state && !list_empty(&ndlp->nlp_listp)) |
1693 | lpfc_nlp_counters(vport, ndlp->nlp_state, -1); | 1693 | lpfc_nlp_counters(vport, ndlp->nlp_state, -1); |
1694 | spin_lock_irq(shost->host_lock); | 1694 | spin_lock_irq(shost->host_lock); |
@@ -1701,8 +1701,7 @@ lpfc_dequeue_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | |||
1701 | static void | 1701 | static void |
1702 | lpfc_disable_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | 1702 | lpfc_disable_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) |
1703 | { | 1703 | { |
1704 | if ((ndlp->nlp_flag & NLP_DELAY_TMO) != 0) | 1704 | lpfc_cancel_retry_delay_tmo(vport, ndlp); |
1705 | lpfc_cancel_retry_delay_tmo(vport, ndlp); | ||
1706 | if (ndlp->nlp_state && !list_empty(&ndlp->nlp_listp)) | 1705 | if (ndlp->nlp_state && !list_empty(&ndlp->nlp_listp)) |
1707 | lpfc_nlp_counters(vport, ndlp->nlp_state, -1); | 1706 | lpfc_nlp_counters(vport, ndlp->nlp_state, -1); |
1708 | lpfc_nlp_state_cleanup(vport, ndlp, ndlp->nlp_state, | 1707 | lpfc_nlp_state_cleanup(vport, ndlp, ndlp->nlp_state, |
@@ -2121,10 +2120,8 @@ lpfc_cleanup_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | |||
2121 | ndlp->nlp_last_elscmd = 0; | 2120 | ndlp->nlp_last_elscmd = 0; |
2122 | del_timer_sync(&ndlp->nlp_delayfunc); | 2121 | del_timer_sync(&ndlp->nlp_delayfunc); |
2123 | 2122 | ||
2124 | if (!list_empty(&ndlp->els_retry_evt.evt_listp)) | 2123 | list_del_init(&ndlp->els_retry_evt.evt_listp); |
2125 | list_del_init(&ndlp->els_retry_evt.evt_listp); | 2124 | list_del_init(&ndlp->dev_loss_evt.evt_listp); |
2126 | if (!list_empty(&ndlp->dev_loss_evt.evt_listp)) | ||
2127 | list_del_init(&ndlp->dev_loss_evt.evt_listp); | ||
2128 | 2125 | ||
2129 | lpfc_unreg_rpi(vport, ndlp); | 2126 | lpfc_unreg_rpi(vport, ndlp); |
2130 | 2127 | ||
@@ -2144,10 +2141,7 @@ lpfc_nlp_remove(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | |||
2144 | LPFC_MBOXQ_t *mbox; | 2141 | LPFC_MBOXQ_t *mbox; |
2145 | int rc; | 2142 | int rc; |
2146 | 2143 | ||
2147 | if (ndlp->nlp_flag & NLP_DELAY_TMO) { | 2144 | lpfc_cancel_retry_delay_tmo(vport, ndlp); |
2148 | lpfc_cancel_retry_delay_tmo(vport, ndlp); | ||
2149 | } | ||
2150 | |||
2151 | if (ndlp->nlp_flag & NLP_DEFER_RM && !ndlp->nlp_rpi) { | 2145 | if (ndlp->nlp_flag & NLP_DEFER_RM && !ndlp->nlp_rpi) { |
2152 | /* For this case we need to cleanup the default rpi | 2146 | /* For this case we need to cleanup the default rpi |
2153 | * allocated by the firmware. | 2147 | * allocated by the firmware. |
@@ -2317,8 +2311,7 @@ lpfc_setup_disc_node(struct lpfc_vport *vport, uint32_t did) | |||
2317 | /* Since this node is marked for discovery, | 2311 | /* Since this node is marked for discovery, |
2318 | * delay timeout is not needed. | 2312 | * delay timeout is not needed. |
2319 | */ | 2313 | */ |
2320 | if (ndlp->nlp_flag & NLP_DELAY_TMO) | 2314 | lpfc_cancel_retry_delay_tmo(vport, ndlp); |
2321 | lpfc_cancel_retry_delay_tmo(vport, ndlp); | ||
2322 | } else | 2315 | } else |
2323 | ndlp = NULL; | 2316 | ndlp = NULL; |
2324 | } else { | 2317 | } else { |