linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fc_transport: stop creating duplicate rport entries.
@ 2006-02-14 22:22 Andrew Vasquez
  2006-02-15 13:54 ` James Smart
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Vasquez @ 2006-02-14 22:22 UTC (permalink / raw)
  To: Linux-SCSI Mailing List

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>
---

This should go into 2.6.16.

diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index f2c9acf..929032e 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -1498,8 +1498,7 @@ fc_remote_port_add(struct Scsi_Host *sho
 	}
 
 	/* 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 */
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-02-24 23:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-14 22:22 [PATCH] fc_transport: stop creating duplicate rport entries Andrew Vasquez
2006-02-15 13:54 ` James Smart
2006-02-21 21:52   ` Michael Reed
2006-02-21 22:07     ` Michael Reed
2006-02-21 22:11     ` James Smart
2006-02-24 23:37       ` Michael Reed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).