Skip to content

Commit

Permalink
[PATCH] skge: don't allow transmit ring to be too small
Browse files Browse the repository at this point in the history
The driver will get stuck (permanent transmit timeout), if the transmit
ring size is set too small.  It needs to have enough ring elements to
hold one maximum size transmit.

Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed May 20, 2006
1 parent 20e777a commit a06631c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/skge.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static int skge_set_ring_param(struct net_device *dev,
int err;

if (p->rx_pending == 0 || p->rx_pending > MAX_RX_RING_SIZE ||
p->tx_pending == 0 || p->tx_pending > MAX_TX_RING_SIZE)
p->tx_pending < MAX_SKB_FRAGS+1 || p->tx_pending > MAX_TX_RING_SIZE)
return -EINVAL;

skge->rx_ring.count = p->rx_pending;
Expand Down

0 comments on commit a06631c

Please sign in to comment.