Re: [PATCH net v2] amd-xgbe: fix sleep while atomic on suspend/resume

From: Jakub Kicinski

Date: Sat Feb 28 2026 - 17:21:02 EST


On Thu, 26 Feb 2026 21:46:40 +0530 Raju Rangoju wrote:
> The xgbe_powerdown() and xgbe_powerup() functions use spinlocks
> (spin_lock_irqsave) while calling functions that may sleep:
> - napi_disable() can sleep waiting for NAPI polling to complete
> - flush_workqueue() can sleep waiting for pending work items
>
> This causes a "BUG: scheduling while atomic" error during suspend/resume
> cycles on systems using the AMD XGBE Ethernet controller.
>
> The spinlock protection in these functions is unnecessary as these
> functions are called from suspend/resume paths which are already serialized
> by the PM core
>
> Fix this by removing the spinlock from xgbe_powerdown() and xgbe_powerup()

I think you're deleting the only code that takes this lock.
Why not delete it completely?
--
pw-bot: cr