Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38965
b: refs/heads/master
c: a740a3f
h: refs/heads/master
i:
  38963: d77f586
v: v3
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Oct 3, 2006
1 parent f1d2b7e commit a8a44e4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1620f7c2d8e3fdd7dba04bfe5f9c42201eef1188
refs/heads/master: a740a3f0407ed3344b28b05926b0ce61768e9893
10 changes: 10 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,14 @@ qla2x00_get_host_symbolic_name(struct Scsi_Host *shost)
qla2x00_get_sym_node_name(ha, fc_host_symbolic_name(shost));
}

static void
qla2x00_set_host_system_hostname(struct Scsi_Host *shost)
{
scsi_qla_host_t *ha = to_qla_host(shost);

set_bit(REGISTER_FDMI_NEEDED, &ha->dpc_flags);
}

struct fc_function_template qla2xxx_transport_functions = {

.show_host_node_name = 1,
Expand All @@ -871,6 +879,8 @@ struct fc_function_template qla2xxx_transport_functions = {
.show_host_port_type = 1,
.get_host_symbolic_name = qla2x00_get_host_symbolic_name,
.show_host_symbolic_name = 1,
.set_host_system_hostname = qla2x00_set_host_system_hostname,
.show_host_system_hostname = 1,

.dd_fcrport_size = sizeof(struct fc_port *),
.show_rport_supported_classes = 1,
Expand Down
15 changes: 15 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_gs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,21 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
DEBUG13(printk("%s(%ld): OS_DEVICE_NAME=%s.\n", __func__, ha->host_no,
eiter->a.os_dev_name));

/* Hostname. */
if (strlen(fc_host_system_hostname(ha->host))) {
eiter = (struct ct_fdmi_port_attr *) (entries + size);
eiter->type = __constant_cpu_to_be16(FDMI_PORT_HOST_NAME);
snprintf(eiter->a.host_name, sizeof(eiter->a.host_name),
"%s", fc_host_system_hostname(ha->host));
alen = strlen(eiter->a.host_name);
alen += (alen & 3) ? (4 - (alen & 3)) : 4;
eiter->len = cpu_to_be16(4 + alen);
size += 4 + alen;

DEBUG13(printk("%s(%ld): HOSTNAME=%s.\n", __func__,
ha->host_no, eiter->a.host_name));
}

/* Update MS request size. */
qla2x00_update_ms_fdmi_iocb(ha, size + 16);

Expand Down

0 comments on commit a8a44e4

Please sign in to comment.