Skip to content

Commit

Permalink
[SCSI] fc_transport: stop creating duplicate rport entries.
Browse files Browse the repository at this point in the history
Current fc_transport consumers initially register rports
with an UNKNOWN role-state and follow-up with a call to
fc_remote_port_rolechg().  Modify code in
fc_remote_port_add() to scan the fc_host_rport_bindings()
array for consistent bindings regardless of role-type.
Original code would only scan bindings array for targets,
causing duplicate fc_remote_ports/rport-X:Y-Z entries to be
created for the yet-to-be-role-changed rports.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Feb 28, 2006
1 parent eca7be5 commit 8b097a6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/scsi_transport_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1498,8 +1498,7 @@ fc_remote_port_add(struct Scsi_Host *shost, int channel,
}

/* Search the bindings array */
if (likely((ids->roles & FC_RPORT_ROLE_FCP_TARGET) &&
(fc_host_tgtid_bind_type(shost) != FC_TGTID_BIND_NONE))) {
if (fc_host_tgtid_bind_type(shost) != FC_TGTID_BIND_NONE) {

/* search for a matching consistent binding */

Expand Down

0 comments on commit 8b097a6

Please sign in to comment.