nvethernet: add lane bringup restart callback

Issue: In the current scenrio, when the remote
interface is brought down and up. There is no way
of getting the link up again with the remote device
which in turn fails the data transfers even though
interface from other end is brought up.

Fix: When interface is gone down on the other side,
MAC receives local faults and in this scenario
no data should be sent to MAC, so disable network
queues and initiate the lane bring up process for
monitoring the link status. Once the link is up,
re enable the network queues for data transfers.

Also added support for enabling driver logs using
msglvl of ethtool

Bug 3744088
Bug 3654543
Bug 3665378

Change-Id: I16cdee74e4e3ff6cd176924575f5005f385d4c5d
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2730876
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Narayan Reddy
2022-06-18 11:37:01 +00:00
committed by Revanth Kumar Uppala
parent f502700729
commit 99acf2912b
4 changed files with 54 additions and 1 deletions

View File

@@ -884,6 +884,13 @@ static inline void set_speed_work_func(struct work_struct *work)
return;
}
if (atomic_read(&pdata->set_speed_ref_cnt) == 1) {
/* set_speed already going on either from workq or interrupt */
return;
}
atomic_set(&pdata->set_speed_ref_cnt, OSI_ENABLE);
/* Speed will be overwritten as per the PHY interface mode */
speed = phydev->speed;
/* MAC and XFI speed should match in XFI mode */
@@ -903,6 +910,7 @@ static inline void set_speed_work_func(struct work_struct *work)
netdev_dbg(dev, "Retry set speed\n");
schedule_delayed_work(&pdata->set_speed_work,
msecs_to_jiffies(1000));
atomic_set(&pdata->set_speed_ref_cnt, OSI_DISABLE);
return;
}
@@ -918,6 +926,8 @@ static inline void set_speed_work_func(struct work_struct *work)
}
pdata->eee_active = ether_conf_eee(pdata, eee_enable);
netif_carrier_on(dev);
atomic_set(&pdata->set_speed_ref_cnt, OSI_DISABLE);
}
static void ether_en_dis_monitor_clks(struct ether_priv_data *pdata,
@@ -6567,6 +6577,7 @@ static int ether_probe(struct platform_device *pdev)
pdata->rx_m_enabled = false;
pdata->rx_pcs_m_enabled = false;
atomic_set(&pdata->tx_ts_ref_cnt, -1);
atomic_set(&pdata->set_speed_ref_cnt, OSI_DISABLE);
#ifdef ETHER_NVGRO
__skb_queue_head_init(&pdata->mq);
__skb_queue_head_init(&pdata->fq);