Re: [PATCH net v2 1/2] net: ngbe: propagate resume errors to the PM core

From: Breno Leitao

Date: Tue Sep 22 2026 - 07:41:19 EST


On Tue, Sep 22, 2026 at 06:08:35PM +0800, Zhang Yunfei wrote:
> ngbe_resume() declares err as u32 and unconditionally returns 0, so
> failures of wx_init_interrupt_scheme() or ngbe_open() are silently
> swallowed, and the return value of ngbe_reset_hw() is ignored
> entirely. 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 propagate the errors instead, making the
> whole tail of the resume path consistent with the
> pci_enable_device_mem() failure path at the top, which already
> propagates its error. If the hardware reset fails, the remaining
> resume steps cannot succeed, so return early instead of continuing
> with a broken device. A failed resume is then reported to the PM
> core, which records and logs the failure, instead of being silently
> swallowed.
>
> Fixes: 6963e463256e ("net: ngbe: add Wake on Lan support")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Zhang Yunfei <zhangyunfei1@xxxxxxxxxx>

Reviewed-by: Breno Leitao <leitao@xxxxxxxxxx>