aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_attr.c
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2006-10-02 12:00:46 -0700
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-10-03 17:28:50 -0500
commit90991c85d398fd46b2b07440b5639eb50dfacb2b (patch)
tree7a6afcf35d293935ce3d3db8cd7553da0ee5268f /drivers/scsi/qla2xxx/qla_attr.c
parenta740a3f0407ed3344b28b05926b0ce61768e9893 (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.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 4e1e175cb9d..d4cf51a8796 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)
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,
@@ -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,