Commit 02f7a34f authored by Soren Brinkmann's avatar Soren Brinkmann Committed by David S. Miller

net: macb: Re-enable RX interrupt only when RX is done

When data is received during the driver processing received data the
NAPI is re-scheduled. In that case the RX interrupt should not be
re-enabled.
Signed-off-by: default avatarSoren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6a027b70
...@@ -891,16 +891,15 @@ static int macb_poll(struct napi_struct *napi, int budget) ...@@ -891,16 +891,15 @@ static int macb_poll(struct napi_struct *napi, int budget)
if (work_done < budget) { if (work_done < budget) {
napi_complete(napi); napi_complete(napi);
/*
* We've done what we can to clean the buffers. Make sure we
* get notified when new packets arrive.
*/
macb_writel(bp, IER, MACB_RX_INT_FLAGS);
/* Packets received while interrupts were disabled */ /* Packets received while interrupts were disabled */
status = macb_readl(bp, RSR); status = macb_readl(bp, RSR);
if (unlikely(status)) if (unlikely(status)) {
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
macb_writel(bp, ISR, MACB_BIT(RCOMP));
napi_reschedule(napi); napi_reschedule(napi);
} else {
macb_writel(bp, IER, MACB_RX_INT_FLAGS);
}
} }
/* TODO: Handle errors */ /* TODO: Handle errors */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment