aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2006-10-02 15:00:45 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-10-03 18:28:46 -0400
commita740a3f0407ed3344b28b05926b0ce61768e9893 (patch)
tree619098f97854aae9b07aaab908af3a059409255d /drivers
parent1620f7c2d8e3fdd7dba04bfe5f9c42201eef1188 (diff)
[SCSI] qla2xxx: Add support for system hostname FC transport attribute.
The system hostname will be used during a subsequent FDMI registration with the fabric. 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.c10
-rw-r--r--drivers/scsi/qla2xxx/qla_gs.c15
2 files changed, 25 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 463846942e16..4e1e175cb9da 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -857,6 +857,14 @@ qla2x00_get_host_symbolic_name(struct Scsi_Host *shost)
857 qla2x00_get_sym_node_name(ha, fc_host_symbolic_name(shost)); 857 qla2x00_get_sym_node_name(ha, fc_host_symbolic_name(shost));
858} 858}
859 859
860static void
861qla2x00_set_host_system_hostname(struct Scsi_Host *shost)
862{
863 scsi_qla_host_t *ha = to_qla_host(shost);
864
865 set_bit(REGISTER_FDMI_NEEDED, &ha->dpc_flags);
866}
867
860struct fc_function_template qla2xxx_transport_functions = { 868struct fc_function_template qla2xxx_transport_functions = {
861 869
862 .show_host_node_name = 1, 870 .show_host_node_name = 1,
@@ -871,6 +879,8 @@ struct fc_function_template qla2xxx_transport_functions = {
871 .show_host_port_type = 1, 879 .show_host_port_type = 1,
872 .get_host_symbolic_name = qla2x00_get_host_symbolic_name, 880 .get_host_symbolic_name = qla2x00_get_host_symbolic_name,
873 .show_host_symbolic_name = 1, 881 .show_host_symbolic_name = 1,
882 .set_host_system_hostname = qla2x00_set_host_system_hostname,
883 .show_host_system_hostname = 1,
874 884
875 .dd_fcrport_size = sizeof(struct fc_port *), 885 .dd_fcrport_size = sizeof(struct fc_port *),
876 .show_rport_supported_classes = 1, 886 .show_rport_supported_classes = 1,
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index 225cf724dcfb..97fbc62ec669 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -1580,6 +1580,21 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
1580 DEBUG13(printk("%s(%ld): OS_DEVICE_NAME=%s.\n", __func__, ha->host_no, 1580 DEBUG13(printk("%s(%ld): OS_DEVICE_NAME=%s.\n", __func__, ha->host_no,
1581 eiter->a.os_dev_name)); 1581 eiter->a.os_dev_name));
1582 1582
1583 /* Hostname. */
1584 if (strlen(fc_host_system_hostname(ha->host))) {
1585 eiter = (struct ct_fdmi_port_attr *) (entries + size);
1586 eiter->type = __constant_cpu_to_be16(FDMI_PORT_HOST_NAME);
1587 snprintf(eiter->a.host_name, sizeof(eiter->a.host_name),
1588 "%s", fc_host_system_hostname(ha->host));
1589 alen = strlen(eiter->a.host_name);
1590 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1591 eiter->len = cpu_to_be16(4 + alen);
1592 size += 4 + alen;
1593
1594 DEBUG13(printk("%s(%ld): HOSTNAME=%s.\n", __func__,
1595 ha->host_no, eiter->a.host_name));
1596 }
1597
1583 /* Update MS request size. */ 1598 /* Update MS request size. */
1584 qla2x00_update_ms_fdmi_iocb(ha, size + 16); 1599 qla2x00_update_ms_fdmi_iocb(ha, size + 16);
1585 1600