From: Jesse Brandeburg Date: Fri, 12 Sep 2008 02:56:28 +0000 (-0700) Subject: ixgbe: limit small mtu to minimum for ipv4 support X-Git-Tag: v2.6.28-rc1~717^2~195^2~31 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=42c783c5b1b755ae2ab2dec720ad58ffc2257a60;p=linux-2.6-omap-h63xx.git ixgbe: limit small mtu to minimum for ipv4 support Signed-off-by: Jesse Brandeburg Signed-off-by: Jeff Kirsher Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index cfaa3ca28f5..2c8895e9dae 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -2839,8 +2839,8 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu) struct ixgbe_adapter *adapter = netdev_priv(netdev); int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN; - if ((max_frame < (ETH_ZLEN + ETH_FCS_LEN)) || - (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE)) + /* MTU < 68 is an error and causes problems on some kernels */ + if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE)) return -EINVAL; DPRINTK(PROBE, INFO, "changing MTU from %d to %d\n",