aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2007-09-20 17:07:41 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:50:06 -0400
commit8a85e17152e8fb5f04a4791416a4642b260b95cb (patch)
treeb3103bfa5628d12fb6ce6cf7160bdda409e4be29 /drivers/scsi/qla2xxx
parent63a8651f2548c6bb5132c0b4e7dad4f57a9274db (diff)
[SCSI] qla2xxx: Set correct attribute count during FDMI RPA.
Also remove legacy '/proc' name during OS_DEVICE_NAME registration. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h2
-rw-r--r--drivers/scsi/qla2xxx/qla_gs.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 75ab898b02b0..511e3cd435fa 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -1705,7 +1705,7 @@ struct ct_fdmi_hba_attributes {
1705/* 1705/*
1706 * Port attribute types. 1706 * Port attribute types.
1707 */ 1707 */
1708#define FDMI_PORT_ATTR_COUNT 5 1708#define FDMI_PORT_ATTR_COUNT 6
1709#define FDMI_PORT_FC4_TYPES 1 1709#define FDMI_PORT_FC4_TYPES 1
1710#define FDMI_PORT_SUPPORT_SPEED 2 1710#define FDMI_PORT_SUPPORT_SPEED 2
1711#define FDMI_PORT_CURRENT_SPEED 3 1711#define FDMI_PORT_CURRENT_SPEED 3
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index a7e23583f899..eb0784c9ff83 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -1517,7 +1517,7 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
1517 1517
1518 /* Attributes */ 1518 /* Attributes */
1519 ct_req->req.rpa.attrs.count = 1519 ct_req->req.rpa.attrs.count =
1520 __constant_cpu_to_be32(FDMI_PORT_ATTR_COUNT); 1520 __constant_cpu_to_be32(FDMI_PORT_ATTR_COUNT - 1);
1521 entries = ct_req->req.rpa.port_name; 1521 entries = ct_req->req.rpa.port_name;
1522 1522
1523 /* FC4 types. */ 1523 /* FC4 types. */
@@ -1600,7 +1600,7 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
1600 /* OS device name. */ 1600 /* OS device name. */
1601 eiter = (struct ct_fdmi_port_attr *) (entries + size); 1601 eiter = (struct ct_fdmi_port_attr *) (entries + size);
1602 eiter->type = __constant_cpu_to_be16(FDMI_PORT_OS_DEVICE_NAME); 1602 eiter->type = __constant_cpu_to_be16(FDMI_PORT_OS_DEVICE_NAME);
1603 sprintf(eiter->a.os_dev_name, "/proc/scsi/qla2xxx/%ld", ha->host_no); 1603 strcpy(eiter->a.os_dev_name, QLA2XXX_DRIVER_NAME);
1604 alen = strlen(eiter->a.os_dev_name); 1604 alen = strlen(eiter->a.os_dev_name);
1605 alen += (alen & 3) ? (4 - (alen & 3)) : 4; 1605 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1606 eiter->len = cpu_to_be16(4 + alen); 1606 eiter->len = cpu_to_be16(4 + alen);
@@ -1611,6 +1611,8 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
1611 1611
1612 /* Hostname. */ 1612 /* Hostname. */
1613 if (strlen(fc_host_system_hostname(ha->host))) { 1613 if (strlen(fc_host_system_hostname(ha->host))) {
1614 ct_req->req.rpa.attrs.count =
1615 __constant_cpu_to_be32(FDMI_PORT_ATTR_COUNT);
1614 eiter = (struct ct_fdmi_port_attr *) (entries + size); 1616 eiter = (struct ct_fdmi_port_attr *) (entries + size);
1615 eiter->type = __constant_cpu_to_be16(FDMI_PORT_HOST_NAME); 1617 eiter->type = __constant_cpu_to_be16(FDMI_PORT_HOST_NAME);
1616 snprintf(eiter->a.host_name, sizeof(eiter->a.host_name), 1618 snprintf(eiter->a.host_name, sizeof(eiter->a.host_name),