Don't allow coalescing values to be bigger than the transmit ring.
Since if you set them that big, the interrupt never happens and driver
livelocks.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>


--- sky2-1.0.orig/drivers/net/sky2.c    2006-02-20 09:48:32.000000000 -0800
+++ sky2-1.0/drivers/net/sky2.c 2006-02-20 12:12:04.000000000 -0800
@@ -2884,11 +2884,11 @@
            (ecmd->rx_coalesce_usecs_irq < tmin || ecmd->rx_coalesce_usecs_irq 
> tmax))
                return -EINVAL;
 
-       if (ecmd->tx_max_coalesced_frames > 0xffff)
+       if (ecmd->tx_max_coalesced_frames >= TX_RING_SIZE-1)
                return -EINVAL;
-       if (ecmd->rx_max_coalesced_frames > 0xff)
+       if (ecmd->rx_max_coalesced_frames > RX_MAX_PENDING)
                return -EINVAL;
-       if (ecmd->rx_max_coalesced_frames_irq > 0xff)
+       if (ecmd->rx_max_coalesced_frames_irq >RX_MAX_PENDING)
                return -EINVAL;
 
        if (ecmd->tx_coalesce_usecs == 0)

--

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to