]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: ngbevf: add link update flow
authorMengyuan Lou <mengyuanlou@net-swift.com>
Fri, 4 Jul 2025 09:49:23 +0000 (17:49 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Jul 2025 01:39:14 +0000 (18:39 -0700)
Add link update flow to wangxun 1G virtual functions.
Get link status from pf in mbox, and if it is failed then
check the vx_status, because vx_status switching is too slow.

Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
Link: https://patch.msgid.link/20250704094923.652-13-mengyuanlou@net-swift.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c

index a629b645d3a12755567a28e0029f578e2e8e717b..c1246ab5239c9b0f4e17c0c99b6b9992cf49f20c 100644 (file)
@@ -197,6 +197,7 @@ static int ngbevf_probe(struct pci_dev *pdev,
        eth_hw_addr_set(netdev, wx->mac.perm_addr);
        ether_addr_copy(netdev->perm_addr, wx->mac.addr);
 
+       wxvf_init_service(wx);
        err = wx_init_interrupt_scheme(wx);
        if (err)
                goto err_free_sw_init;
@@ -213,6 +214,8 @@ static int ngbevf_probe(struct pci_dev *pdev,
 err_register:
        wx_clear_interrupt_scheme(wx);
 err_free_sw_init:
+       timer_delete_sync(&wx->service_timer);
+       cancel_work_sync(&wx->service_task);
        kfree(wx->vfinfo);
        kfree(wx->rss_key);
        kfree(wx->mac_table);