Skip to content

Commit

Permalink
tc35815: Fix receiver hangup on Rx FIFO overflow
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Atsushi Nemoto authored and Jeff Garzik committed Jun 27, 2008
1 parent 59524a3 commit ccc57aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/tc35815.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit ccc57aa

Please sign in to comment.