aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cadence/macb.c
diff options
context:
space:
mode:
authorSoren Brinkmann <soren.brinkmann@xilinx.com>2014-05-04 18:43:00 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-05 17:11:18 -0400
commit02f7a34f34e30ee6fd02e01201ae130003e516ab (patch)
treea7d836841193fb37d4c3f787f0d8c9b1db1ed3d7 /drivers/net/ethernet/cadence/macb.c
parent6a027b705fb6d2214647a638b44ea91ee6ce7e4c (diff)
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: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cadence/macb.c')
-rw-r--r--drivers/net/ethernet/cadence/macb.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index e38fe39d9589..3f4b8ee0b0e7 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -891,16 +891,15 @@ static int macb_poll(struct napi_struct *napi, int budget)
891 if (work_done < budget) { 891 if (work_done < budget) {
892 napi_complete(napi); 892 napi_complete(napi);
893 893
894 /*
895 * We've done what we can to clean the buffers. Make sure we
896 * get notified when new packets arrive.
897 */
898 macb_writel(bp, IER, MACB_RX_INT_FLAGS);
899
900 /* Packets received while interrupts were disabled */ 894 /* Packets received while interrupts were disabled */
901 status = macb_readl(bp, RSR); 895 status = macb_readl(bp, RSR);
902 if (unlikely(status)) 896 if (unlikely(status)) {
897 if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
898 macb_writel(bp, ISR, MACB_BIT(RCOMP));
903 napi_reschedule(napi); 899 napi_reschedule(napi);
900 } else {
901 macb_writel(bp, IER, MACB_RX_INT_FLAGS);
902 }
904 } 903 }
905 904
906 /* TODO: Handle errors */ 905 /* TODO: Handle errors */