[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>
This commit is contained in:
parent
c76f2c013f
commit
5881569bb3
|
@ -1711,6 +1711,14 @@ struct ct_fdmi_hba_attributes {
|
||||||
#define FDMI_PORT_OS_DEVICE_NAME 5
|
#define FDMI_PORT_OS_DEVICE_NAME 5
|
||||||
#define FDMI_PORT_HOST_NAME 6
|
#define FDMI_PORT_HOST_NAME 6
|
||||||
|
|
||||||
|
#define FDMI_PORT_SPEED_1GB 0x1
|
||||||
|
#define FDMI_PORT_SPEED_2GB 0x2
|
||||||
|
#define FDMI_PORT_SPEED_10GB 0x4
|
||||||
|
#define FDMI_PORT_SPEED_4GB 0x8
|
||||||
|
#define FDMI_PORT_SPEED_8GB 0x10
|
||||||
|
#define FDMI_PORT_SPEED_16GB 0x20
|
||||||
|
#define FDMI_PORT_SPEED_UNKNOWN 0x8000
|
||||||
|
|
||||||
struct ct_fdmi_port_attr {
|
struct ct_fdmi_port_attr {
|
||||||
uint16_t type;
|
uint16_t type;
|
||||||
uint16_t len;
|
uint16_t len;
|
||||||
|
|
|
@ -1528,11 +1528,15 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
|
||||||
eiter->type = __constant_cpu_to_be16(FDMI_PORT_SUPPORT_SPEED);
|
eiter->type = __constant_cpu_to_be16(FDMI_PORT_SUPPORT_SPEED);
|
||||||
eiter->len = __constant_cpu_to_be16(4 + 4);
|
eiter->len = __constant_cpu_to_be16(4 + 4);
|
||||||
if (IS_QLA24XX(ha) || IS_QLA54XX(ha))
|
if (IS_QLA24XX(ha) || IS_QLA54XX(ha))
|
||||||
eiter->a.sup_speed = __constant_cpu_to_be32(4);
|
eiter->a.sup_speed = __constant_cpu_to_be32(
|
||||||
|
FDMI_PORT_SPEED_1GB|FDMI_PORT_SPEED_2GB|
|
||||||
|
FDMI_PORT_SPEED_4GB);
|
||||||
else if (IS_QLA23XX(ha))
|
else if (IS_QLA23XX(ha))
|
||||||
eiter->a.sup_speed = __constant_cpu_to_be32(2);
|
eiter->a.sup_speed =__constant_cpu_to_be32(
|
||||||
|
FDMI_PORT_SPEED_1GB|FDMI_PORT_SPEED_2GB);
|
||||||
else
|
else
|
||||||
eiter->a.sup_speed = __constant_cpu_to_be32(1);
|
eiter->a.sup_speed = __constant_cpu_to_be32(
|
||||||
|
FDMI_PORT_SPEED_1GB);
|
||||||
size += 4 + 4;
|
size += 4 + 4;
|
||||||
|
|
||||||
DEBUG13(printk("%s(%ld): SUPPORTED_SPEED=%x.\n", __func__, ha->host_no,
|
DEBUG13(printk("%s(%ld): SUPPORTED_SPEED=%x.\n", __func__, ha->host_no,
|
||||||
|
@ -1543,14 +1547,21 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
|
||||||
eiter->type = __constant_cpu_to_be16(FDMI_PORT_CURRENT_SPEED);
|
eiter->type = __constant_cpu_to_be16(FDMI_PORT_CURRENT_SPEED);
|
||||||
eiter->len = __constant_cpu_to_be16(4 + 4);
|
eiter->len = __constant_cpu_to_be16(4 + 4);
|
||||||
switch (ha->link_data_rate) {
|
switch (ha->link_data_rate) {
|
||||||
case 0:
|
case PORT_SPEED_1GB:
|
||||||
eiter->a.cur_speed = __constant_cpu_to_be32(1);
|
eiter->a.cur_speed =
|
||||||
|
__constant_cpu_to_be32(FDMI_PORT_SPEED_1GB);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case PORT_SPEED_2GB:
|
||||||
eiter->a.cur_speed = __constant_cpu_to_be32(2);
|
eiter->a.cur_speed =
|
||||||
|
__constant_cpu_to_be32(FDMI_PORT_SPEED_2GB);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case PORT_SPEED_4GB:
|
||||||
eiter->a.cur_speed = __constant_cpu_to_be32(4);
|
eiter->a.cur_speed =
|
||||||
|
__constant_cpu_to_be32(FDMI_PORT_SPEED_4GB);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
eiter->a.cur_speed =
|
||||||
|
__constant_cpu_to_be32(FDMI_PORT_SPEED_UNKNOWN);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
size += 4 + 4;
|
size += 4 + 4;
|
||||||
|
|
Loading…
Reference in New Issue