]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
net: macb: Change interrupt and napi enable order in open xilinx-v2019.1
authorHarini Katakam <harini.katakam@xilinx.com>
Tue, 7 May 2019 14:07:24 +0000 (19:37 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 7 May 2019 18:04:32 +0000 (11:04 -0700)
commit9c71c6e9f827635a82bb4adc9f4c39a7d172478d
tree4c1adbacbadaeb9be2545062482cc07fcf1950eb
parent6d3ce7c3dbc454607917c207476321c725a30edb
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.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/ethernet/cadence/macb_main.c