Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48e5ecae authored by Chris Friesen's avatar Chris Friesen Committed by David S. Miller
Browse files

amd8111e: Fix rx return code



The amd8111e rx poll routine currently mishandles the case when we
process exactly the number of packets specified in the budget.

This patch is basically as suggested by David Miller.

Signed-off-by: default avatarChris Friesen <cfriesen@nortel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 88271660
Loading
Loading
Loading
Loading
+8 −6
Original line number Original line Diff line number Diff line
@@ -833,12 +833,14 @@ static int amd8111e_rx_poll(struct napi_struct *napi, int budget)


	} while(intr0 & RINT0);
	} while(intr0 & RINT0);


	if (rx_pkt_limit > 0) {
		/* Receive descriptor is empty now */
		/* Receive descriptor is empty now */
		spin_lock_irqsave(&lp->lock, flags);
		spin_lock_irqsave(&lp->lock, flags);
		__netif_rx_complete(dev, napi);
		__netif_rx_complete(dev, napi);
		writel(VAL0|RINTEN0, mmio + INTEN0);
		writel(VAL0|RINTEN0, mmio + INTEN0);
		writel(VAL2 | RDMD0, mmio + CMD0);
		writel(VAL2 | RDMD0, mmio + CMD0);
		spin_unlock_irqrestore(&lp->lock, flags);
		spin_unlock_irqrestore(&lp->lock, flags);
	}


rx_not_empty:
rx_not_empty:
	return num_rx_pkt;
	return num_rx_pkt;