From: Stephen Hemminger Date: Mon, 15 May 2006 23:32:39 +0000 (-0700) Subject: [PATCH] skge: don't allow transmit ring to be too small X-Git-Tag: v2.6.17-rc5~80 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a06631cbdc09fe33892f08238be498eaa84892ee;p=linux-2.6 [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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 0dd4247013..5ca5a1b546 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, 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;