aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/altera/altera_tse_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/altera/altera_tse_main.c')
-rw-r--r--drivers/net/ethernet/altera/altera_tse_main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
index 79ea35869e1e..90a76306ad0f 100644
--- a/drivers/net/ethernet/altera/altera_tse_main.c
+++ b/drivers/net/ethernet/altera/altera_tse_main.c
@@ -376,8 +376,13 @@ static int tse_rx(struct altera_tse_private *priv, int limit)
376 u16 pktlength; 376 u16 pktlength;
377 u16 pktstatus; 377 u16 pktstatus;
378 378
379 while (((rxstatus = priv->dmaops->get_rx_status(priv)) != 0) && 379 /* Check for count < limit first as get_rx_status is changing
380 (count < limit)) { 380 * the response-fifo so we must process the next packet
381 * after calling get_rx_status if a response is pending.
382 * (reading the last byte of the response pops the value from the fifo.)
383 */
384 while ((count < limit) &&
385 ((rxstatus = priv->dmaops->get_rx_status(priv)) != 0)) {
381 pktstatus = rxstatus >> 16; 386 pktstatus = rxstatus >> 16;
382 pktlength = rxstatus & 0xffff; 387 pktlength = rxstatus & 0xffff;
383 388