summaryrefslogtreecommitdiffstats
path: root/drivers/net/tc35815.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-06-26 17:14:15 +0900
committerJeff Garzik <jgarzik@redhat.com>2008-06-27 01:27:43 -0400
commitccc57aac9c9532b4540968632a8c4a0b946dbcc4 (patch)
treeb7f24f9c34bfd1efd964390ae5a4be823a5c84b0 /drivers/net/tc35815.c
parent59524a37446e18a672188d86d23c8c76fd488621 (diff)
downloadblackbird-op-linux-ccc57aac9c9532b4540968632a8c4a0b946dbcc4.tar.gz
blackbird-op-linux-ccc57aac9c9532b4540968632a8c4a0b946dbcc4.zip
tc35815: Fix receiver hangup on Rx FIFO overflow
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>
Diffstat (limited to 'drivers/net/tc35815.c')
-rw-r--r--drivers/net/tc35815.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index dccea525165e..b07b8cbadeaf 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -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
{
OpenPOWER on IntegriCloud