aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_hbadisc.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2012-08-03 12:35:03 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-09-14 09:34:46 -0400
commit34f5ad8bddeda2a6b8d0dd1b61a015d06e62e1a4 (patch)
tree7d7b134176d53e19eaff21f42c555aa999fb61dc /drivers/scsi/lpfc/lpfc_hbadisc.c
parent908e18e4e7a1e77d3cefb227599d653a6907bbb4 (diff)
[SCSI] lpfc 8.3.33: Fix error when remote port switches address
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hbadisc.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 9b4f92941dc..6b36d95668c 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -123,6 +123,10 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport *rport)
123 "rport devlosscb: sid:x%x did:x%x flg:x%x", 123 "rport devlosscb: sid:x%x did:x%x flg:x%x",
124 ndlp->nlp_sid, ndlp->nlp_DID, ndlp->nlp_flag); 124 ndlp->nlp_sid, ndlp->nlp_DID, ndlp->nlp_flag);
125 125
126 lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_NODE,
127 "3181 dev_loss_callbk x%06x, rport %p flg x%x\n",
128 ndlp->nlp_DID, ndlp->rport, ndlp->nlp_flag);
129
126 /* Don't defer this if we are in the process of deleting the vport 130 /* Don't defer this if we are in the process of deleting the vport
127 * or unloading the driver. The unload will cleanup the node 131 * or unloading the driver. The unload will cleanup the node
128 * appropriately we just need to cleanup the ndlp rport info here. 132 * appropriately we just need to cleanup the ndlp rport info here.
@@ -142,6 +146,15 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport *rport)
142 if (ndlp->nlp_state == NLP_STE_MAPPED_NODE) 146 if (ndlp->nlp_state == NLP_STE_MAPPED_NODE)
143 return; 147 return;
144 148
149 if (ndlp->nlp_type & NLP_FABRIC) {
150
151 /* If the WWPN of the rport and ndlp don't match, ignore it */
152 if (rport->port_name != wwn_to_u64(ndlp->nlp_portname.u.wwn)) {
153 put_device(&rport->dev);
154 return;
155 }
156 }
157
145 evtp = &ndlp->dev_loss_evt; 158 evtp = &ndlp->dev_loss_evt;
146 159
147 if (!list_empty(&evtp->evt_listp)) 160 if (!list_empty(&evtp->evt_listp))
@@ -202,6 +215,10 @@ lpfc_dev_loss_tmo_handler(struct lpfc_nodelist *ndlp)
202 "rport devlosstmo:did:x%x type:x%x id:x%x", 215 "rport devlosstmo:did:x%x type:x%x id:x%x",
203 ndlp->nlp_DID, ndlp->nlp_type, rport->scsi_target_id); 216 ndlp->nlp_DID, ndlp->nlp_type, rport->scsi_target_id);
204 217
218 lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_NODE,
219 "3182 dev_loss_tmo_handler x%06x, rport %p flg x%x\n",
220 ndlp->nlp_DID, ndlp->rport, ndlp->nlp_flag);
221
205 /* Don't defer this if we are in the process of deleting the vport 222 /* Don't defer this if we are in the process of deleting the vport
206 * or unloading the driver. The unload will cleanup the node 223 * or unloading the driver. The unload will cleanup the node
207 * appropriately we just need to cleanup the ndlp rport info here. 224 * appropriately we just need to cleanup the ndlp rport info here.
@@ -3834,6 +3851,10 @@ lpfc_register_remote_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
3834 if (rport_ids.roles != FC_RPORT_ROLE_UNKNOWN) 3851 if (rport_ids.roles != FC_RPORT_ROLE_UNKNOWN)
3835 fc_remote_port_rolechg(rport, rport_ids.roles); 3852 fc_remote_port_rolechg(rport, rport_ids.roles);
3836 3853
3854 lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_NODE,
3855 "3183 rport register x%06x, rport %p role x%x\n",
3856 ndlp->nlp_DID, rport, rport_ids.roles);
3857
3837 if ((rport->scsi_target_id != -1) && 3858 if ((rport->scsi_target_id != -1) &&
3838 (rport->scsi_target_id < LPFC_MAX_TARGET)) { 3859 (rport->scsi_target_id < LPFC_MAX_TARGET)) {
3839 ndlp->nlp_sid = rport->scsi_target_id; 3860 ndlp->nlp_sid = rport->scsi_target_id;
@@ -3850,6 +3871,10 @@ lpfc_unregister_remote_port(struct lpfc_nodelist *ndlp)
3850 "rport delete: did:x%x flg:x%x type x%x", 3871 "rport delete: did:x%x flg:x%x type x%x",
3851 ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_type); 3872 ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_type);
3852 3873
3874 lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_NODE,
3875 "3184 rport unregister x%06x, rport %p\n",
3876 ndlp->nlp_DID, rport);
3877
3853 fc_remote_port_delete(rport); 3878 fc_remote_port_delete(rport);
3854 3879
3855 return; 3880 return;
@@ -5365,9 +5390,17 @@ __lpfc_find_node(struct lpfc_vport *vport, node_filter filter, void *param)
5365 struct lpfc_nodelist *ndlp; 5390 struct lpfc_nodelist *ndlp;
5366 5391
5367 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) { 5392 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {
5368 if (filter(ndlp, param)) 5393 if (filter(ndlp, param)) {
5394 lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
5395 "3185 FIND node filter %p DID "
5396 "Data: x%p x%x x%x\n",
5397 filter, ndlp, ndlp->nlp_DID,
5398 ndlp->nlp_flag);
5369 return ndlp; 5399 return ndlp;
5400 }
5370 } 5401 }
5402 lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
5403 "3186 FIND node filter %p NOT FOUND.\n", filter);
5371 return NULL; 5404 return NULL;
5372} 5405}
5373 5406