diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-18 23:56:57 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-18 23:56:57 +0100 |
commit | 3542f6b1836d8940615104e22248bb9b7cf54f5f (patch) | |
tree | 6808fae6dfb12bb4b7e5e0df4efbe3e0dae8c537 /drivers/net/ethernet/dnet.c | |
parent | pcmcia: add missing include for new pci resource handler (diff) | |
parent | Linux 3.19-rc5 (diff) | |
download | linux-3542f6b1836d8940615104e22248bb9b7cf54f5f.tar.xz linux-3542f6b1836d8940615104e22248bb9b7cf54f5f.zip |
Merge 3.19-rc5 into char-misc-next
We want the 3.19-rc5 fixes in here for our testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet/dnet.c')
-rw-r--r-- | drivers/net/ethernet/dnet.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/ethernet/dnet.c b/drivers/net/ethernet/dnet.c index a379c3e4b57f..13d00a38a5bd 100644 --- a/drivers/net/ethernet/dnet.c +++ b/drivers/net/ethernet/dnet.c @@ -398,13 +398,8 @@ static int dnet_poll(struct napi_struct *napi, int budget) * break out of while loop if there are no more * packets waiting */ - if (!(dnet_readl(bp, RX_FIFO_WCNT) >> 16)) { - napi_complete(napi); - int_enable = dnet_readl(bp, INTR_ENB); - int_enable |= DNET_INTR_SRC_RX_CMDFIFOAF; - dnet_writel(bp, int_enable, INTR_ENB); - return 0; - } + if (!(dnet_readl(bp, RX_FIFO_WCNT) >> 16)) + break; cmd_word = dnet_readl(bp, RX_LEN_FIFO); pkt_len = cmd_word & 0xFFFF; @@ -433,20 +428,17 @@ static int dnet_poll(struct napi_struct *napi, int budget) "size %u.\n", dev->name, pkt_len); } - budget -= npackets; - if (npackets < budget) { /* We processed all packets available. Tell NAPI it can - * stop polling then re-enable rx interrupts */ + * stop polling then re-enable rx interrupts. + */ napi_complete(napi); int_enable = dnet_readl(bp, INTR_ENB); int_enable |= DNET_INTR_SRC_RX_CMDFIFOAF; dnet_writel(bp, int_enable, INTR_ENB); - return 0; } - /* There are still packets waiting */ - return 1; + return npackets; } static irqreturn_t dnet_interrupt(int irq, void *dev_id) |