aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-05-15 19:32:39 -0400
committerJeff Garzik <jeff@garzik.org>2006-05-20 00:17:07 -0400
commita06631cbdc09fe33892f08238be498eaa84892ee (patch)
tree52d7d6d7677815f8be197bde05bb4f2df1a76bf4 /drivers/net/skge.c
parent20e777a2a7dc9fad3d0b016c662c2fb60e6b20e7 (diff)
[PATCH] skge: don't allow transmit ring to be too small
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 <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r--drivers/net/skge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 0dd42470136d..5ca5a1b546a1 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -401,7 +401,7 @@ static int skge_set_ring_param(struct net_device *dev,
401 int err; 401 int err;
402 402
403 if (p->rx_pending == 0 || p->rx_pending > MAX_RX_RING_SIZE || 403 if (p->rx_pending == 0 || p->rx_pending > MAX_RX_RING_SIZE ||
404 p->tx_pending == 0 || p->tx_pending > MAX_TX_RING_SIZE) 404 p->tx_pending < MAX_SKB_FRAGS+1 || p->tx_pending > MAX_TX_RING_SIZE)
405 return -EINVAL; 405 return -EINVAL;
406 406
407 skge->rx_ring.count = p->rx_pending; 407 skge->rx_ring.count = p->rx_pending;