Commit 64675a9c authored by Mathieu Othacehe's avatar Mathieu Othacehe Committed by Greg Kroah-Hartman
Browse files

net: cadence: macb: Fix a possible deadlock in macb_halt_tx.



[ Upstream commit c92d6089 ]

There is a situation where after THALT is set high, TGO stays high as
well. Because jiffies are never updated, as we are in a context with
interrupts disabled, we never exit that loop and have a deadlock.

That deadlock was noticed on a sama5d4 device that stayed locked for days.

Use retries instead of jiffies so that the timeout really works and we do
not have a deadlock anymore.

Fixes: e86cd53a ("net/macb: better manage tx errors")
Signed-off-by: default avatarMathieu Othacehe <othacehe@gnu.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250509121935.16282-1-othacehe@gnu.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d3336f74
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment