]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
tc35815: Fix receiver hangup on Rx FIFO overflow
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Thu, 26 Jun 2008 08:14:15 +0000 (17:14 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 27 Jun 2008 05:27:43 +0000 (01:27 -0400)
On Rx FIFO overflow error, the controller consume a buffer descriptor
but currently the driver does not give it back to the controller.
This results unrecoverable 'Buffer List Exhausted' condition.  This
patch fix this problem by moving a "fbl_count--" line to proper place.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/tc35815.c

index dccea525165ef0c84b4ced4b4ce27393b8ae558d..b07b8cbadeaf8eb4a34dbbfe848ad5499f2a628b 100644 (file)
@@ -1736,7 +1736,6 @@ tc35815_rx(struct net_device *dev)
                        skb = lp->rx_skbs[cur_bd].skb;
                        prefetch(skb->data);
                        lp->rx_skbs[cur_bd].skb = NULL;
-                       lp->fbl_count--;
                        pci_unmap_single(lp->pci_dev,
                                         lp->rx_skbs[cur_bd].skb_dma,
                                         RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
@@ -1792,6 +1791,7 @@ tc35815_rx(struct net_device *dev)
 #ifdef TC35815_USE_PACKEDBUFFER
                        while (lp->fbl_curid != id)
 #else
+                       lp->fbl_count--;
                        while (lp->fbl_count < RX_BUF_NUM)
 #endif
                        {