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/scsi/qla2xxx/qla_attr.c | |
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/scsi/qla2xxx/qla_attr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 16 |
1 files changed, 16 insertions, 0 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, |