mirror of
https://github.com/torvalds/linux.git
synced 2026-09-26 18:12:03 +02:00
scsi: qla2xxx: Add 64G/128G port speed setting support
The port speed setting paths topped out at 32G: qla2x00_port_speed_store() only mapped sysfs inputs up to 32 (and their no-loss-of-sync forms up to 320), and qla2x00_set_data_rate() only accepted PORT_SPEED_AUTO/4/8/16/32 in its switch. A user request for 64G or 128G therefore hit the default arm and was silently downgraded to auto-negotiation. Map the 64 and 128 sysfs inputs (and their /10 no-loss-of-sync forms 640 and 1280) to PORT_SPEED_64GB and PORT_SPEED_128GB, and accept those values in qla2x00_set_data_rate(). The firmware validates the requested rate against the adapter's actual capability. Signed-off-by: Nilesh Javali <njavali@marvell.com> Reviewed-by: Hannes Reinecke <hare@kernel.org> Link: https://patch.msgid.link/20260723050413.3897522-45-njavali@marvell.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
parent
8ac3f225f9
commit
f6e384eb8c
|
|
@ -1835,7 +1835,7 @@ qla2x00_port_speed_store(struct device *dev, struct device_attribute *attr,
|
|||
return rval;
|
||||
speed = type;
|
||||
if (type == 40 || type == 80 || type == 160 ||
|
||||
type == 320) {
|
||||
type == 320 || type == 640 || type == 1280) {
|
||||
ql_dbg(ql_dbg_user, vha, 0x70d9,
|
||||
"Setting will be affected after a loss of sync\n");
|
||||
type = type/10;
|
||||
|
|
@ -1860,6 +1860,12 @@ qla2x00_port_speed_store(struct device *dev, struct device_attribute *attr,
|
|||
case 32:
|
||||
ha->set_data_rate = PORT_SPEED_32GB;
|
||||
break;
|
||||
case 64:
|
||||
ha->set_data_rate = PORT_SPEED_64GB;
|
||||
break;
|
||||
case 128:
|
||||
ha->set_data_rate = PORT_SPEED_128GB;
|
||||
break;
|
||||
default:
|
||||
ql_log(ql_log_warn, vha, 0x1199,
|
||||
"Unrecognized speed setting:%lx. Setting Autoneg\n",
|
||||
|
|
|
|||
|
|
@ -4793,7 +4793,14 @@ qla24xx_config_rings(struct scsi_qla_host *vha)
|
|||
ql_dbg(ql_dbg_init, vha, 0x00fd,
|
||||
"Speed set by user : %s Gbps \n",
|
||||
qla2x00_get_link_speed_str(ha, ha->set_data_rate));
|
||||
icb->firmware_options_3 = cpu_to_le32(ha->set_data_rate << 13);
|
||||
/*
|
||||
* The ICB data-rate field is 3 bits (bits 13-15); rates above
|
||||
* 64G do not fit and would overflow into bit 16 (75 ohm
|
||||
* termination select). Such rates are forced via MBC_DATA_RATE.
|
||||
*/
|
||||
if (ha->set_data_rate <= PORT_SPEED_64GB)
|
||||
icb->firmware_options_3 =
|
||||
cpu_to_le32(ha->set_data_rate << 13);
|
||||
}
|
||||
|
||||
/* PCI posting */
|
||||
|
|
|
|||
|
|
@ -5720,6 +5720,8 @@ qla2x00_set_data_rate(scsi_qla_host_t *vha, uint16_t mode)
|
|||
case PORT_SPEED_8GB:
|
||||
case PORT_SPEED_16GB:
|
||||
case PORT_SPEED_32GB:
|
||||
case PORT_SPEED_64GB:
|
||||
case PORT_SPEED_128GB:
|
||||
val = ha->set_data_rate;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user