aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJames.Smart@Emulex.Com <James.Smart@Emulex.Com>2005-11-28 11:41:44 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2005-12-13 20:18:47 -0500
commit23dc04f1ec0d2f8fdda82ad1f9aa87b6ed74cd4a (patch)
tree969cf15f4be04be9cc3f3b20d8faf166f0261ffd /drivers
parent6281bfe0002acd7765cb4afe0304c36962ad6b15 (diff)
[SCSI] lpfc 8.1.1 : Adjust use of scsi_block_requests and interaction w/ FC transport
- Remove unnecessary scsi_block_requests calls on rport deletes. This was deadlocking the sdev removals as they wanted to flush commands. - No longer block requests when adding the remote port (to block discovery). Instead, register, then change port role. Maps to Qlogic behavior, and closer to the register-node-upon-first-ELS behavior. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 259eeb161b82..a1f751e79405 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -1017,12 +1017,7 @@ lpfc_register_remote_port(struct lpfc_hba * phba,
1017 rport_ids.port_name = wwn_to_u64(ndlp->nlp_portname.u.wwn); 1017 rport_ids.port_name = wwn_to_u64(ndlp->nlp_portname.u.wwn);
1018 rport_ids.port_id = ndlp->nlp_DID; 1018 rport_ids.port_id = ndlp->nlp_DID;
1019 rport_ids.roles = FC_RPORT_ROLE_UNKNOWN; 1019 rport_ids.roles = FC_RPORT_ROLE_UNKNOWN;
1020 if (ndlp->nlp_type & NLP_FCP_TARGET)
1021 rport_ids.roles |= FC_RPORT_ROLE_FCP_TARGET;
1022 if (ndlp->nlp_type & NLP_FCP_INITIATOR)
1023 rport_ids.roles |= FC_RPORT_ROLE_FCP_INITIATOR;
1024 1020
1025 scsi_block_requests(phba->host);
1026 ndlp->rport = rport = fc_remote_port_add(phba->host, 0, &rport_ids); 1021 ndlp->rport = rport = fc_remote_port_add(phba->host, 0, &rport_ids);
1027 if (!rport) { 1022 if (!rport) {
1028 dev_printk(KERN_WARNING, &phba->pcidev->dev, 1023 dev_printk(KERN_WARNING, &phba->pcidev->dev,
@@ -1039,7 +1034,16 @@ lpfc_register_remote_port(struct lpfc_hba * phba,
1039 } 1034 }
1040 rdata = rport->dd_data; 1035 rdata = rport->dd_data;
1041 rdata->pnode = ndlp; 1036 rdata->pnode = ndlp;
1042 scsi_unblock_requests(phba->host); 1037
1038 if (ndlp->nlp_type & NLP_FCP_TARGET)
1039 rport_ids.roles |= FC_RPORT_ROLE_FCP_TARGET;
1040 if (ndlp->nlp_type & NLP_FCP_INITIATOR)
1041 rport_ids.roles |= FC_RPORT_ROLE_FCP_INITIATOR;
1042
1043
1044 if (rport_ids.roles != FC_RPORT_ROLE_UNKNOWN)
1045 fc_remote_port_rolechg(rport, rport_ids.roles);
1046
1043 1047
1044 return; 1048 return;
1045} 1049}
@@ -1053,9 +1057,7 @@ lpfc_unregister_remote_port(struct lpfc_hba * phba,
1053 1057
1054 ndlp->rport = NULL; 1058 ndlp->rport = NULL;
1055 rdata->pnode = NULL; 1059 rdata->pnode = NULL;
1056 scsi_block_requests(phba->host);
1057 fc_remote_port_delete(rport); 1060 fc_remote_port_delete(rport);
1058 scsi_unblock_requests(phba->host);
1059 1061
1060 return; 1062 return;
1061} 1063}