* PATCH [4/15] qla2xxx: PortID binding fixes
@ 2004-05-07 5:51 Andrew Vasquez
0 siblings, 0 replies; only message in thread
From: Andrew Vasquez @ 2004-05-07 5:51 UTC (permalink / raw)
To: SCSI Mailing List, James Bottomley
ChangeSet
1.1925 04/04/30 10:48:48 andrew.vasquez@apc.qlogic.com +1 -0
Fix problem where port ID binding would not be honoured when
a device was moved within the fabric.
drivers/scsi/qla2xxx/qla_init.c | 33 ++++++++++++++++++++++++---------
1 files changed, 24 insertions(+), 9 deletions(-)
diff -Nru a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
--- a/drivers/scsi/qla2xxx/qla_init.c Mon May 3 15:13:47 2004
+++ b/drivers/scsi/qla2xxx/qla_init.c Mon May 3 15:13:47 2004
@@ -3290,6 +3290,7 @@
static uint16_t
qla2x00_fcport_bind(scsi_qla_host_t *ha, fc_port_t *fcport)
{
+ int found;
uint16_t tgt;
os_tgt_t *tq;
@@ -3298,18 +3299,32 @@
if ((tq = TGT_Q(ha, tgt)) == NULL)
continue;
- if (ha->binding_type == BIND_BY_PORT_ID &&
- fcport->d_id.b24 == tq->d_id.b24) {
- memcpy(tq->node_name, fcport->node_name, WWN_SIZE);
- memcpy(tq->port_name, fcport->port_name, WWN_SIZE);
+ found = 0;
+ switch (ha->binding_type) {
+ case BIND_BY_PORT_ID:
+ if (fcport->d_id.b24 == tq->d_id.b24) {
+ memcpy(tq->node_name, fcport->node_name,
+ WWN_SIZE);
+ memcpy(tq->port_name, fcport->port_name,
+ WWN_SIZE);
+ found++;
+ }
break;
- }
-
- if (memcmp(fcport->port_name, tq->port_name, WWN_SIZE) == 0) {
- /* In case of persistent binding, update the WWNN */
- memcpy(tq->node_name, fcport->node_name, WWN_SIZE);
+ case BIND_BY_PORT_NAME:
+ if (memcmp(fcport->port_name, tq->port_name,
+ WWN_SIZE) == 0) {
+ /*
+ * In case of persistent binding, update the
+ * WWNN.
+ */
+ memcpy(tq->node_name, fcport->node_name,
+ WWN_SIZE);
+ found++;
+ }
break;
}
+ if (found)
+ break;
}
/* TODO: honor the ConfigRequired flag */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-05-07 5:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-07 5:51 PATCH [4/15] qla2xxx: PortID binding fixes Andrew Vasquez
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.