forked from luck/tmp_suning_uos_patched
Merge branch 'Fix-bugs-in-Octeontx2-netdev-driver'
Subbaraya Sundeep says: ==================== Fix bugs in Octeontx2 netdev driver There are problems in the existing Octeontx2 netdev drivers like missing cancel_work for the reset task, missing lock in reset task and missing unergister_netdev in driver remove. This patch set fixes the above problems. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
fa662d7816
|
@ -1730,10 +1730,12 @@ static void otx2_reset_task(struct work_struct *work)
|
|||
if (!netif_running(pf->netdev))
|
||||
return;
|
||||
|
||||
rtnl_lock();
|
||||
otx2_stop(pf->netdev);
|
||||
pf->reset_count++;
|
||||
otx2_open(pf->netdev);
|
||||
netif_trans_update(pf->netdev);
|
||||
rtnl_unlock();
|
||||
}
|
||||
|
||||
static const struct net_device_ops otx2_netdev_ops = {
|
||||
|
@ -2111,6 +2113,7 @@ static void otx2_remove(struct pci_dev *pdev)
|
|||
|
||||
pf = netdev_priv(netdev);
|
||||
|
||||
cancel_work_sync(&pf->reset_task);
|
||||
/* Disable link notifications */
|
||||
otx2_cgx_config_linkevents(pf, false);
|
||||
|
||||
|
|
|
@ -617,6 +617,8 @@ static void otx2vf_remove(struct pci_dev *pdev)
|
|||
|
||||
vf = netdev_priv(netdev);
|
||||
|
||||
cancel_work_sync(&vf->reset_task);
|
||||
unregister_netdev(netdev);
|
||||
otx2vf_disable_mbox_intr(vf);
|
||||
|
||||
otx2_detach_resources(&vf->mbox);
|
||||
|
|
Loading…
Reference in New Issue
Block a user