From: Jakub Kicinski <kuba@kernel.org>
To: Raju Rangoju <Raju.Rangoju@amd.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<pabeni@redhat.com>, <edumazet@google.com>, <davem@davemloft.net>,
<andrew+netdev@lunn.ch>, <Thomas.Lendacky@amd.com>
Subject: Re: [PATCH net v2] amd-xgbe: fix sleep while atomic on suspend/resume
Date: Sat, 28 Feb 2026 14:20:56 -0800 [thread overview]
Message-ID: <20260228142056.2e6022ae@kernel.org> (raw)
In-Reply-To: <20260226161640.61246-1-Raju.Rangoju@amd.com>
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
prev parent reply other threads:[~2026-02-28 22:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 16:16 [PATCH net v2] amd-xgbe: fix sleep while atomic on suspend/resume Raju Rangoju
2026-02-28 22:20 ` Jakub Kicinski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260228142056.2e6022ae@kernel.org \
--to=kuba@kernel.org \
--cc=Raju.Rangoju@amd.com \
--cc=Thomas.Lendacky@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox