Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15630
b: refs/heads/master
c: 23dc04f
h: refs/heads/master
v: v3
  • Loading branch information
James.Smart@Emulex.Com authored and James Bottomley committed Dec 14, 2005
1 parent 6aa5af8 commit e672e6f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6281bfe0002acd7765cb4afe0304c36962ad6b15
refs/heads/master: 23dc04f1ec0d2f8fdda82ad1f9aa87b6ed74cd4a
18 changes: 10 additions & 8 deletions trunk/drivers/scsi/lpfc/lpfc_hbadisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1017,12 +1017,7 @@ lpfc_register_remote_port(struct lpfc_hba * phba,
rport_ids.port_name = wwn_to_u64(ndlp->nlp_portname.u.wwn);
rport_ids.port_id = ndlp->nlp_DID;
rport_ids.roles = FC_RPORT_ROLE_UNKNOWN;
if (ndlp->nlp_type & NLP_FCP_TARGET)
rport_ids.roles |= FC_RPORT_ROLE_FCP_TARGET;
if (ndlp->nlp_type & NLP_FCP_INITIATOR)
rport_ids.roles |= FC_RPORT_ROLE_FCP_INITIATOR;

scsi_block_requests(phba->host);
ndlp->rport = rport = fc_remote_port_add(phba->host, 0, &rport_ids);
if (!rport) {
dev_printk(KERN_WARNING, &phba->pcidev->dev,
Expand All @@ -1039,7 +1034,16 @@ lpfc_register_remote_port(struct lpfc_hba * phba,
}
rdata = rport->dd_data;
rdata->pnode = ndlp;
scsi_unblock_requests(phba->host);

if (ndlp->nlp_type & NLP_FCP_TARGET)
rport_ids.roles |= FC_RPORT_ROLE_FCP_TARGET;
if (ndlp->nlp_type & NLP_FCP_INITIATOR)
rport_ids.roles |= FC_RPORT_ROLE_FCP_INITIATOR;


if (rport_ids.roles != FC_RPORT_ROLE_UNKNOWN)
fc_remote_port_rolechg(rport, rport_ids.roles);


return;
}
Expand All @@ -1053,9 +1057,7 @@ lpfc_unregister_remote_port(struct lpfc_hba * phba,

ndlp->rport = NULL;
rdata->pnode = NULL;
scsi_block_requests(phba->host);
fc_remote_port_delete(rport);
scsi_unblock_requests(phba->host);

return;
}
Expand Down

0 comments on commit e672e6f

Please sign in to comment.