Skip to content

Commit 2f65132

Browse files
committed
Merge branch 'lan966x-fixes'
Horatiu Vultur says: ==================== net: lan966x: Fixes for sleep in atomic context This patch series contains 2 fixes for lan966x that is sleeping in atomic context. The first patch fixes the injection of the frames while the second one fixes the updating of the MAC table. v1->v2: - correct the fix tag in the second patch, it was using the wrong sha. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 8199d0c + 77bdaf3 commit 2f65132

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ static int lan966x_mac_wait_for_completion(struct lan966x *lan966x)
4040
{
4141
u32 val;
4242

43-
return readx_poll_timeout(lan966x_mac_get_status,
44-
lan966x, val,
45-
(ANA_MACACCESS_MAC_TABLE_CMD_GET(val)) ==
46-
MACACCESS_CMD_IDLE,
47-
TABLE_UPDATE_SLEEP_US, TABLE_UPDATE_TIMEOUT_US);
43+
return readx_poll_timeout_atomic(lan966x_mac_get_status,
44+
lan966x, val,
45+
(ANA_MACACCESS_MAC_TABLE_CMD_GET(val)) ==
46+
MACACCESS_CMD_IDLE,
47+
TABLE_UPDATE_SLEEP_US,
48+
TABLE_UPDATE_TIMEOUT_US);
4849
}
4950

5051
static void lan966x_mac_select(struct lan966x *lan966x,

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)