|
@@ -3299,7 +3299,9 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
|
|
{
|
|
{
|
|
struct lio *lio = NULL;
|
|
struct lio *lio = NULL;
|
|
struct net_device *netdev;
|
|
struct net_device *netdev;
|
|
- u8 mac[6], i, j, *fw_ver;
|
|
|
|
|
|
+ u8 mac[6], i, j, *fw_ver, *micro_ver;
|
|
|
|
+ unsigned long micro;
|
|
|
|
+ u32 cur_ver;
|
|
struct octeon_soft_command *sc;
|
|
struct octeon_soft_command *sc;
|
|
struct liquidio_if_cfg_context *ctx;
|
|
struct liquidio_if_cfg_context *ctx;
|
|
struct liquidio_if_cfg_resp *resp;
|
|
struct liquidio_if_cfg_resp *resp;
|
|
@@ -3429,6 +3431,14 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
|
|
fw_ver);
|
|
fw_ver);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* extract micro version field; point past '<maj>.<min>.' */
|
|
|
|
+ micro_ver = fw_ver + strlen(LIQUIDIO_BASE_VERSION) + 1;
|
|
|
|
+ if (kstrtoul(micro_ver, 10, µ) != 0)
|
|
|
|
+ micro = 0;
|
|
|
|
+ octeon_dev->fw_info.ver.maj = LIQUIDIO_BASE_MAJOR_VERSION;
|
|
|
|
+ octeon_dev->fw_info.ver.min = LIQUIDIO_BASE_MINOR_VERSION;
|
|
|
|
+ octeon_dev->fw_info.ver.rev = micro;
|
|
|
|
+
|
|
octeon_swap_8B_data((u64 *)(&resp->cfg_info),
|
|
octeon_swap_8B_data((u64 *)(&resp->cfg_info),
|
|
(sizeof(struct liquidio_if_cfg_info)) >> 3);
|
|
(sizeof(struct liquidio_if_cfg_info)) >> 3);
|
|
|
|
|
|
@@ -3671,7 +3681,19 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
|
|
OCTEON_CN2350_25GB_SUBSYS_ID ||
|
|
OCTEON_CN2350_25GB_SUBSYS_ID ||
|
|
octeon_dev->subsystem_id ==
|
|
octeon_dev->subsystem_id ==
|
|
OCTEON_CN2360_25GB_SUBSYS_ID) {
|
|
OCTEON_CN2360_25GB_SUBSYS_ID) {
|
|
- liquidio_get_speed(lio);
|
|
|
|
|
|
+ cur_ver = OCT_FW_VER(octeon_dev->fw_info.ver.maj,
|
|
|
|
+ octeon_dev->fw_info.ver.min,
|
|
|
|
+ octeon_dev->fw_info.ver.rev);
|
|
|
|
+
|
|
|
|
+ /* speed control unsupported in f/w older than 1.7.2 */
|
|
|
|
+ if (cur_ver < OCT_FW_VER(1, 7, 2)) {
|
|
|
|
+ dev_info(&octeon_dev->pci_dev->dev,
|
|
|
|
+ "speed setting not supported by f/w.");
|
|
|
|
+ octeon_dev->speed_setting = 25;
|
|
|
|
+ octeon_dev->no_speed_setting = 1;
|
|
|
|
+ } else {
|
|
|
|
+ liquidio_get_speed(lio);
|
|
|
|
+ }
|
|
|
|
|
|
if (octeon_dev->speed_setting == 0) {
|
|
if (octeon_dev->speed_setting == 0) {
|
|
octeon_dev->speed_setting = 25;
|
|
octeon_dev->speed_setting = 25;
|