diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2008-06-26 04:14:15 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-06-27 01:27:43 -0400 |
commit | ccc57aac9c9532b4540968632a8c4a0b946dbcc4 (patch) | |
tree | b7f24f9c34bfd1efd964390ae5a4be823a5c84b0 | |
parent | 59524a37446e18a672188d86d23c8c76fd488621 (diff) |
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>
-rw-r--r-- | drivers/net/tc35815.c | 2 |
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) | |||
1736 | skb = lp->rx_skbs[cur_bd].skb; | 1736 | skb = lp->rx_skbs[cur_bd].skb; |
1737 | prefetch(skb->data); | 1737 | prefetch(skb->data); |
1738 | lp->rx_skbs[cur_bd].skb = NULL; | 1738 | lp->rx_skbs[cur_bd].skb = NULL; |
1739 | lp->fbl_count--; | ||
1740 | pci_unmap_single(lp->pci_dev, | 1739 | pci_unmap_single(lp->pci_dev, |
1741 | lp->rx_skbs[cur_bd].skb_dma, | 1740 | lp->rx_skbs[cur_bd].skb_dma, |
1742 | RX_BUF_SIZE, PCI_DMA_FROMDEVICE); | 1741 | RX_BUF_SIZE, PCI_DMA_FROMDEVICE); |
@@ -1792,6 +1791,7 @@ tc35815_rx(struct net_device *dev) | |||
1792 | #ifdef TC35815_USE_PACKEDBUFFER | 1791 | #ifdef TC35815_USE_PACKEDBUFFER |
1793 | while (lp->fbl_curid != id) | 1792 | while (lp->fbl_curid != id) |
1794 | #else | 1793 | #else |
1794 | lp->fbl_count--; | ||
1795 | while (lp->fbl_count < RX_BUF_NUM) | 1795 | while (lp->fbl_count < RX_BUF_NUM) |
1796 | #endif | 1796 | #endif |
1797 | { | 1797 | { |