From: Andrew Vasquez <andrew.vasquez@qlogic.com>
To: Linux-SCSI Mailing List <linux-scsi@vger.kernel.org>,
James Bottomley <james.bottomley@steeleye.com>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Subject: [PATCH 3/8] qla2xxx: Add support for system hostname FC transport attribute.
Date: Mon, 2 Oct 2006 12:00:45 -0700 [thread overview]
Message-ID: <11598156511495-git-send-email-andrew.vasquez@qlogic.com> (raw)
In-Reply-To: <20061002185947.GF16536@andrew-vasquezs-computer.local>
The system hostname will be used during a subsequent FDMI registration
with the fabric.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
---
drivers/scsi/qla2xxx/qla_attr.c | 10 ++++++++++
drivers/scsi/qla2xxx/qla_gs.c | 15 +++++++++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 4638469..4e1e175 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 Sc
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,
@@ -871,6 +879,8 @@ struct fc_function_template qla2xxx_tran
.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,
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index 225cf72..97fbc62 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)
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);
--
1.4.2.3.gf59615
next prev parent reply other threads:[~2006-10-02 19:00 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-02 18:59 [PATCH 0/8] qla2xxx: driver update Andrew Vasquez
2006-10-02 19:00 ` [PATCH 1/8] qla2xxx: Add iIDMA support Andrew Vasquez
2006-10-10 9:29 ` Christoph Hellwig
2006-10-02 19:00 ` [PATCH 2/8] qla2xxx: Add support for symbolic nodename FC transport attribute Andrew Vasquez
2006-10-10 9:30 ` Christoph Hellwig
2006-10-12 16:37 ` Andrew Vasquez
2006-10-02 19:00 ` Andrew Vasquez [this message]
2006-10-10 9:32 ` [PATCH 3/8] qla2xxx: Add support for system hostname " Christoph Hellwig
2006-10-02 19:00 ` [PATCH 4/8] qla2xxx: Add support for fabric name " Andrew Vasquez
2006-10-10 9:32 ` Christoph Hellwig
2006-10-02 19:00 ` [PATCH 5/8] qla2xxx: Add support for host port state " Andrew Vasquez
2006-10-10 9:33 ` Christoph Hellwig
2006-10-02 19:00 ` [PATCH 6/8] qla2xxx: Add MODULE_FIRMWARE tags Andrew Vasquez
2006-10-10 9:33 ` Christoph Hellwig
2006-10-02 19:00 ` [PATCH 7/8] qla2xxx: Stall mid-layer error handlers while rport is blocked Andrew Vasquez
2006-10-02 19:26 ` James Smart
2006-10-02 22:14 ` Matthew Wilcox
2006-10-02 23:05 ` Mike Anderson
2006-10-03 14:24 ` James Smart
2006-10-05 16:09 ` Mike Christie
2006-10-06 15:23 ` James Smart
2006-10-06 17:01 ` Mike Christie
2006-10-06 17:33 ` James Smart
2006-10-10 15:11 ` Patrick Mansfield
2006-10-02 19:00 ` [PATCH 8/8] qla2xxx: Update version number to 8.01.07-k2 Andrew Vasquez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11598156511495-git-send-email-andrew.vasquez@qlogic.com \
--to=andrew.vasquez@qlogic.com \
--cc=james.bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox