Commit 35e0cbd4 authored by Giridhar Malavali's avatar Giridhar Malavali Committed by James Bottomley

[SCSI] qla2xxx: Return proper fabric name based on device state.

Signed-off-by: default avatarGiridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent a5b36321
...@@ -1685,14 +1685,14 @@ static void ...@@ -1685,14 +1685,14 @@ static void
qla2x00_get_host_fabric_name(struct Scsi_Host *shost) qla2x00_get_host_fabric_name(struct Scsi_Host *shost)
{ {
scsi_qla_host_t *vha = shost_priv(shost); scsi_qla_host_t *vha = shost_priv(shost);
u64 node_name; uint8_t node_name[WWN_SIZE] = { 0xFF, 0xFF, 0xFF, 0xFF, \
0xFF, 0xFF, 0xFF, 0xFF};
u64 fabric_name = wwn_to_u64(node_name);
if (vha->device_flags & SWITCH_FOUND) if (vha->device_flags & SWITCH_FOUND)
node_name = wwn_to_u64(vha->fabric_node_name); fabric_name = wwn_to_u64(vha->fabric_node_name);
else
node_name = wwn_to_u64(vha->node_name);
fc_host_fabric_name(shost) = node_name; fc_host_fabric_name(shost) = fabric_name;
} }
static void static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment