ngbe_resume() declares err as u32 and unconditionally returns 0, so failures of wx_init_interrupt_scheme() or ngbe_open() are silently swallowed. The device stays in netif_device_detach() state with a broken interrupt scheme, the PM core is told the resume succeeded, and the netdev never appears in the networking stack again: the reset task also bails out early on the missing netif_device_present() check, so the device cannot self-heal. Fix the type to int and return err, making the tail of the resume path consistent with the pci_enable_device_mem() failure path at the top, which already propagates its error. A failed resume then becomes visible to the PM core and the device can be re-probed. Fixes: 6963e463256e ("net: ngbe: add Wake on Lan support") Cc: stable@vger.kernel.org Signed-off-by: Zhang Yunfei --- drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c index 855dc963c610..6d8289e2532d 100644 --- a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c +++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c @@ -954,7 +954,7 @@ static int ngbe_resume(struct pci_dev *pdev) { struct net_device *netdev; struct wx *wx; - u32 err; + int err; wx = pci_get_drvdata(pdev); netdev = wx->netdev; @@ -977,7 +977,7 @@ static int ngbe_resume(struct pci_dev *pdev) netif_device_attach(netdev); rtnl_unlock(); - return 0; + return err; } static struct pci_driver ngbe_driver = { -- 2.25.1