Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38966
b: refs/heads/master
c: 90991c8
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Oct 3, 2006
1 parent a8a44e4 commit 8b1a621
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a740a3f0407ed3344b28b05926b0ce61768e9893
refs/heads/master: 90991c85d398fd46b2b07440b5639eb50dfacb2b
16 changes: 16 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,20 @@ qla2x00_set_host_system_hostname(struct Scsi_Host *shost)
set_bit(REGISTER_FDMI_NEEDED, &ha->dpc_flags);
}

static void
qla2x00_get_host_fabric_name(struct Scsi_Host *shost)
{
scsi_qla_host_t *ha = to_qla_host(shost);
u64 node_name;

if (ha->device_flags & SWITCH_FOUND)
node_name = wwn_to_u64(ha->fabric_node_name);
else
node_name = wwn_to_u64(ha->node_name);

fc_host_fabric_name(shost) = node_name;
}

struct fc_function_template qla2xxx_transport_functions = {

.show_host_node_name = 1,
Expand All @@ -881,6 +895,8 @@ struct fc_function_template qla2xxx_transport_functions = {
.show_host_symbolic_name = 1,
.set_host_system_hostname = qla2x00_set_host_system_hostname,
.show_host_system_hostname = 1,
.get_host_fabric_name = qla2x00_get_host_fabric_name,
.show_host_fabric_name = 1,

.dd_fcrport_size = sizeof(struct fc_port *),
.show_rport_supported_classes = 1,
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/qla2xxx/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -2362,6 +2362,7 @@ typedef struct scsi_qla_host {

uint8_t *node_name;
uint8_t *port_name;
uint8_t fabric_node_name[WWN_SIZE];
uint32_t isp_abort_cnt;

/* Option ROM information. */
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -2280,14 +2280,15 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha)
loop_id = NPH_F_PORT;
else
loop_id = SNS_FL_PORT;
rval = qla2x00_get_port_name(ha, loop_id, NULL, 0);
rval = qla2x00_get_port_name(ha, loop_id, ha->fabric_node_name, 1);
if (rval != QLA_SUCCESS) {
DEBUG2(printk("scsi(%ld): MBC_GET_PORT_NAME Failed, No FL "
"Port\n", ha->host_no));

ha->device_flags &= ~SWITCH_FOUND;
return (QLA_SUCCESS);
}
ha->device_flags |= SWITCH_FOUND;

/* Mark devices that need re-synchronization. */
rval2 = qla2x00_device_resync(ha);
Expand Down

0 comments on commit 8b1a621

Please sign in to comment.