Skip to content

Commit 0504453

Browse files
harini-katakamdavem330
authored andcommitted
net: macb: Change interrupt and napi enable order in open
Current order in open: -> Enable interrupts (macb_init_hw) -> Enable NAPI -> Start PHY Sequence of RX handling: -> RX interrupt occurs -> Interrupt is cleared and interrupt bits disabled in handler -> NAPI is scheduled -> In NAPI, RX budget is processed and RX interrupts are re-enabled With the above, on QEMU or fixed link setups (where PHY state doesn't matter), there's a chance macb RX interrupt occurs before NAPI is enabled. This will result in NAPI being scheduled before it is enabled. Fix this macb open by changing the order. Fixes: ae1f2a5 ("net: macb: Added support for many RX queues") Signed-off-by: Harini Katakam <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ff6ab32 commit 0504453

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2461,12 +2461,12 @@ static int macb_open(struct net_device *dev)
24612461
goto pm_exit;
24622462
}
24632463

2464-
bp->macbgem_ops.mog_init_rings(bp);
2465-
macb_init_hw(bp);
2466-
24672464
for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
24682465
napi_enable(&queue->napi);
24692466

2467+
bp->macbgem_ops.mog_init_rings(bp);
2468+
macb_init_hw(bp);
2469+
24702470
/* schedule a link state check */
24712471
phy_start(dev->phydev);
24722472

0 commit comments

Comments
 (0)