Skip to content

Commit b6ab149

Browse files
HoratiuVulturdavem330
authored andcommitted
net: lan966x: Fix sleep in atomic context when injecting frames
On lan966x, when injecting a frame it was polling the register QS_INJ_STATUS to see if it can continue with the injection of the frame. The problem was that it was using readx_poll_timeout which could sleep in atomic context. This patch fixes this issue by using readx_poll_timeout_atomic. Fixes: d28d6d2 ("net: lan966x: add port module support") Signed-off-by: Horatiu Vultur <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8199d0c commit b6ab149

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/microchip/lan966x/lan966x_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ static int lan966x_port_inj_ready(struct lan966x *lan966x, u8 grp)
182182
{
183183
u32 val;
184184

185-
return readx_poll_timeout(lan966x_port_inj_status, lan966x, val,
186-
QS_INJ_STATUS_FIFO_RDY_GET(val) & BIT(grp),
187-
READL_SLEEP_US, READL_TIMEOUT_US);
185+
return readx_poll_timeout_atomic(lan966x_port_inj_status, lan966x, val,
186+
QS_INJ_STATUS_FIFO_RDY_GET(val) & BIT(grp),
187+
READL_SLEEP_US, READL_TIMEOUT_US);
188188
}
189189

190190
static int lan966x_port_ifh_xmit(struct sk_buff *skb,

0 commit comments

Comments
 (0)