]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
net: macb: Change interrupt and napi enable order in open xlnx_rebase_v4.19_2019.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:05:22 +0000 (11:05 -0700)
commit9811303824b66a8db9a8ec61b570879336a9fde5
tree4c1adbacbadaeb9be2545062482cc07fcf1950eb
parentc722e33408d85922e27160b75d4e2f78990f7064
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