aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2007-07-19 18:05:58 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-20 10:23:45 -0400
commit5881569bb33cdb0d4cdcd44d9ca2551ab04fb811 (patch)
treeda41f4596cda3f8a544fb53de7cfbb84d09cbda6 /drivers
parentc76f2c013f7fce83d54acd9d414af7e989e0a1dd (diff)
[SCSI] qla2xxx: Correct setting of 'current' and 'supported' speeds during FDMI registration.
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_def.h8
-rw-r--r--drivers/scsi/qla2xxx/qla_gs.c29
2 files changed, 28 insertions, 9 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index d505c0456de3..f98eb6340e1f 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -1711,6 +1711,14 @@ struct ct_fdmi_hba_attributes {
1711#define FDMI_PORT_OS_DEVICE_NAME 5 1711#define FDMI_PORT_OS_DEVICE_NAME 5
1712#define FDMI_PORT_HOST_NAME 6 1712#define FDMI_PORT_HOST_NAME 6
1713 1713
1714#define FDMI_PORT_SPEED_1GB 0x1
1715#define FDMI_PORT_SPEED_2GB 0x2
1716#define FDMI_PORT_SPEED_10GB 0x4
1717#define FDMI_PORT_SPEED_4GB 0x8
1718#define FDMI_PORT_SPEED_8GB 0x10
1719#define FDMI_PORT_SPEED_16GB 0x20
1720#define FDMI_PORT_SPEED_UNKNOWN 0x8000
1721
1714struct ct_fdmi_port_attr { 1722struct ct_fdmi_port_attr {
1715 uint16_t type; 1723 uint16_t type;
1716 uint16_t len; 1724 uint16_t len;
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index 9be312331bcc..301279a1a492 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -1528,11 +1528,15 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
1528 eiter->type = __constant_cpu_to_be16(FDMI_PORT_SUPPORT_SPEED); 1528 eiter->type = __constant_cpu_to_be16(FDMI_PORT_SUPPORT_SPEED);
1529 eiter->len = __constant_cpu_to_be16(4 + 4); 1529 eiter->len = __constant_cpu_to_be16(4 + 4);
1530 if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 1530 if (IS_QLA24XX(ha) || IS_QLA54XX(ha))
1531 eiter->a.sup_speed = __constant_cpu_to_be32(4); 1531 eiter->a.sup_speed = __constant_cpu_to_be32(
1532 FDMI_PORT_SPEED_1GB|FDMI_PORT_SPEED_2GB|
1533 FDMI_PORT_SPEED_4GB);
1532 else if (IS_QLA23XX(ha)) 1534 else if (IS_QLA23XX(ha))
1533 eiter->a.sup_speed = __constant_cpu_to_be32(2); 1535 eiter->a.sup_speed =__constant_cpu_to_be32(
1536 FDMI_PORT_SPEED_1GB|FDMI_PORT_SPEED_2GB);
1534 else 1537 else
1535 eiter->a.sup_speed = __constant_cpu_to_be32(1); 1538 eiter->a.sup_speed = __constant_cpu_to_be32(
1539 FDMI_PORT_SPEED_1GB);
1536 size += 4 + 4; 1540 size += 4 + 4;
1537 1541
1538 DEBUG13(printk("%s(%ld): SUPPORTED_SPEED=%x.\n", __func__, ha->host_no, 1542 DEBUG13(printk("%s(%ld): SUPPORTED_SPEED=%x.\n", __func__, ha->host_no,
@@ -1543,14 +1547,21 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
1543 eiter->type = __constant_cpu_to_be16(FDMI_PORT_CURRENT_SPEED); 1547 eiter->type = __constant_cpu_to_be16(FDMI_PORT_CURRENT_SPEED);
1544 eiter->len = __constant_cpu_to_be16(4 + 4); 1548 eiter->len = __constant_cpu_to_be16(4 + 4);
1545 switch (ha->link_data_rate) { 1549 switch (ha->link_data_rate) {
1546 case 0: 1550 case PORT_SPEED_1GB:
1547 eiter->a.cur_speed = __constant_cpu_to_be32(1); 1551 eiter->a.cur_speed =
1552 __constant_cpu_to_be32(FDMI_PORT_SPEED_1GB);
1548 break; 1553 break;
1549 case 1: 1554 case PORT_SPEED_2GB:
1550 eiter->a.cur_speed = __constant_cpu_to_be32(2); 1555 eiter->a.cur_speed =
1556 __constant_cpu_to_be32(FDMI_PORT_SPEED_2GB);
1551 break; 1557 break;
1552 case 3: 1558 case PORT_SPEED_4GB:
1553 eiter->a.cur_speed = __constant_cpu_to_be32(4); 1559 eiter->a.cur_speed =
1560 __constant_cpu_to_be32(FDMI_PORT_SPEED_4GB);
1561 break;
1562 default:
1563 eiter->a.cur_speed =
1564 __constant_cpu_to_be32(FDMI_PORT_SPEED_UNKNOWN);
1554 break; 1565 break;
1555 } 1566 }
1556 size += 4 + 4; 1567 size += 4 + 4;