diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2006-10-02 15:00:46 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-10-03 18:28:50 -0400 |
commit | 90991c85d398fd46b2b07440b5639eb50dfacb2b (patch) | |
tree | 7a6afcf35d293935ce3d3db8cd7553da0ee5268f /drivers | |
parent | a740a3f0407ed3344b28b05926b0ce61768e9893 (diff) |
[SCSI] qla2xxx: Add support for fabric name FC transport attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 16 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 3 |
3 files changed, 19 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 4e1e175cb9da..d4cf51a8796b 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -865,6 +865,20 @@ qla2x00_set_host_system_hostname(struct Scsi_Host *shost) | |||
865 | set_bit(REGISTER_FDMI_NEEDED, &ha->dpc_flags); | 865 | set_bit(REGISTER_FDMI_NEEDED, &ha->dpc_flags); |
866 | } | 866 | } |
867 | 867 | ||
868 | static void | ||
869 | qla2x00_get_host_fabric_name(struct Scsi_Host *shost) | ||
870 | { | ||
871 | scsi_qla_host_t *ha = to_qla_host(shost); | ||
872 | u64 node_name; | ||
873 | |||
874 | if (ha->device_flags & SWITCH_FOUND) | ||
875 | node_name = wwn_to_u64(ha->fabric_node_name); | ||
876 | else | ||
877 | node_name = wwn_to_u64(ha->node_name); | ||
878 | |||
879 | fc_host_fabric_name(shost) = node_name; | ||
880 | } | ||
881 | |||
868 | struct fc_function_template qla2xxx_transport_functions = { | 882 | struct fc_function_template qla2xxx_transport_functions = { |
869 | 883 | ||
870 | .show_host_node_name = 1, | 884 | .show_host_node_name = 1, |
@@ -881,6 +895,8 @@ struct fc_function_template qla2xxx_transport_functions = { | |||
881 | .show_host_symbolic_name = 1, | 895 | .show_host_symbolic_name = 1, |
882 | .set_host_system_hostname = qla2x00_set_host_system_hostname, | 896 | .set_host_system_hostname = qla2x00_set_host_system_hostname, |
883 | .show_host_system_hostname = 1, | 897 | .show_host_system_hostname = 1, |
898 | .get_host_fabric_name = qla2x00_get_host_fabric_name, | ||
899 | .show_host_fabric_name = 1, | ||
884 | 900 | ||
885 | .dd_fcrport_size = sizeof(struct fc_port *), | 901 | .dd_fcrport_size = sizeof(struct fc_port *), |
886 | .show_rport_supported_classes = 1, | 902 | .show_rport_supported_classes = 1, |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 6d677b0fb551..c37a30aa2146 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -2362,6 +2362,7 @@ typedef struct scsi_qla_host { | |||
2362 | 2362 | ||
2363 | uint8_t *node_name; | 2363 | uint8_t *node_name; |
2364 | uint8_t *port_name; | 2364 | uint8_t *port_name; |
2365 | uint8_t fabric_node_name[WWN_SIZE]; | ||
2365 | uint32_t isp_abort_cnt; | 2366 | uint32_t isp_abort_cnt; |
2366 | 2367 | ||
2367 | /* Option ROM information. */ | 2368 | /* Option ROM information. */ |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 270096441f3e..d5d26273c04e 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -2280,7 +2280,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) | |||
2280 | loop_id = NPH_F_PORT; | 2280 | loop_id = NPH_F_PORT; |
2281 | else | 2281 | else |
2282 | loop_id = SNS_FL_PORT; | 2282 | loop_id = SNS_FL_PORT; |
2283 | rval = qla2x00_get_port_name(ha, loop_id, NULL, 0); | 2283 | rval = qla2x00_get_port_name(ha, loop_id, ha->fabric_node_name, 1); |
2284 | if (rval != QLA_SUCCESS) { | 2284 | if (rval != QLA_SUCCESS) { |
2285 | DEBUG2(printk("scsi(%ld): MBC_GET_PORT_NAME Failed, No FL " | 2285 | DEBUG2(printk("scsi(%ld): MBC_GET_PORT_NAME Failed, No FL " |
2286 | "Port\n", ha->host_no)); | 2286 | "Port\n", ha->host_no)); |
@@ -2288,6 +2288,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) | |||
2288 | ha->device_flags &= ~SWITCH_FOUND; | 2288 | ha->device_flags &= ~SWITCH_FOUND; |
2289 | return (QLA_SUCCESS); | 2289 | return (QLA_SUCCESS); |
2290 | } | 2290 | } |
2291 | ha->device_flags |= SWITCH_FOUND; | ||
2291 | 2292 | ||
2292 | /* Mark devices that need re-synchronization. */ | 2293 | /* Mark devices that need re-synchronization. */ |
2293 | rval2 = qla2x00_device_resync(ha); | 2294 | rval2 = qla2x00_device_resync(ha); |