]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] fc_transport: stop creating duplicate rport entries.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Tue, 14 Feb 2006 22:22:14 +0000 (14:22 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Tue, 28 Feb 2006 03:25:40 +0000 (21:25 -0600)
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>
drivers/scsi/scsi_transport_fc.c

index f2c9acf11bd0c394084230718cfcbf48614d6e59..929032e370db6647d595b36c3f0531fc32472587 100644 (file)
@@ -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 */