提交 90991c85 编写于 作者: A Andrew Vasquez 提交者: James Bottomley

[SCSI] qla2xxx: Add support for fabric name FC transport attribute.

Signed-off-by: NAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 a740a3f0
...@@ -865,6 +865,20 @@ qla2x00_set_host_system_hostname(struct Scsi_Host *shost) ...@@ -865,6 +865,20 @@ qla2x00_set_host_system_hostname(struct Scsi_Host *shost)
set_bit(REGISTER_FDMI_NEEDED, &ha->dpc_flags); 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 = { struct fc_function_template qla2xxx_transport_functions = {
.show_host_node_name = 1, .show_host_node_name = 1,
...@@ -881,6 +895,8 @@ struct fc_function_template qla2xxx_transport_functions = { ...@@ -881,6 +895,8 @@ struct fc_function_template qla2xxx_transport_functions = {
.show_host_symbolic_name = 1, .show_host_symbolic_name = 1,
.set_host_system_hostname = qla2x00_set_host_system_hostname, .set_host_system_hostname = qla2x00_set_host_system_hostname,
.show_host_system_hostname = 1, .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 *), .dd_fcrport_size = sizeof(struct fc_port *),
.show_rport_supported_classes = 1, .show_rport_supported_classes = 1,
......
...@@ -2362,6 +2362,7 @@ typedef struct scsi_qla_host { ...@@ -2362,6 +2362,7 @@ typedef struct scsi_qla_host {
uint8_t *node_name; uint8_t *node_name;
uint8_t *port_name; uint8_t *port_name;
uint8_t fabric_node_name[WWN_SIZE];
uint32_t isp_abort_cnt; uint32_t isp_abort_cnt;
/* Option ROM information. */ /* Option ROM information. */
......
...@@ -2280,7 +2280,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) ...@@ -2280,7 +2280,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha)
loop_id = NPH_F_PORT; loop_id = NPH_F_PORT;
else else
loop_id = SNS_FL_PORT; 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) { if (rval != QLA_SUCCESS) {
DEBUG2(printk("scsi(%ld): MBC_GET_PORT_NAME Failed, No FL " DEBUG2(printk("scsi(%ld): MBC_GET_PORT_NAME Failed, No FL "
"Port\n", ha->host_no)); "Port\n", ha->host_no));
...@@ -2288,6 +2288,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) ...@@ -2288,6 +2288,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha)
ha->device_flags &= ~SWITCH_FOUND; ha->device_flags &= ~SWITCH_FOUND;
return (QLA_SUCCESS); return (QLA_SUCCESS);
} }
ha->device_flags |= SWITCH_FOUND;
/* Mark devices that need re-synchronization. */ /* Mark devices that need re-synchronization. */
rval2 = qla2x00_device_resync(ha); rval2 = qla2x00_device_resync(ha);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册