netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: jeff@garzik.org
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	akpm@linux-foundation.org, Bruce Allan <bruce.w.allan@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [PATCH 5/7] e1000e: increase minimum frame size allowed
Date: Fri, 08 Aug 2008 18:36:06 -0700	[thread overview]
Message-ID: <20080809013606.23913.73166.stgit@localhost.localdomain> (raw)
In-Reply-To: <20080809013544.23913.47157.stgit@localhost.localdomain>

From: Bruce Allan <bruce.w.allan@intel.com>

Setting an MTU value below 68 was disabling the network connection and
would not reconnect until the driver was reloaded.  Prevent changing the
MTU to anything below 68.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/e1000e/netdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 4573c7b..b8b26cf 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -3724,7 +3724,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
 	struct e1000_adapter *adapter = netdev_priv(netdev);
 	int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;
 
-	if ((max_frame < ETH_ZLEN + ETH_FCS_LEN) ||
+	if ((new_mtu < ETH_ZLEN + ETH_FCS_LEN + VLAN_HLEN) ||
 	    (max_frame > MAX_JUMBO_FRAME_SIZE)) {
 		e_err("Invalid MTU setting\n");
 		return -EINVAL;


  parent reply	other threads:[~2008-08-09  1:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-09  1:35 [PATCH 1/7] e1000e: Return 1 instead of a non-zero value for link up indication Jeff Kirsher
2008-08-09  1:35 ` [PATCH 2/7] e1000e: Set InterruptThrottleRate to default when invalid value used Jeff Kirsher
2008-08-09  1:35 ` [PATCH 3/7] e1000e: Use skb_copy_to_linear_data_offset introduced in 2.6.22 Jeff Kirsher
2008-08-09  1:36 ` [PATCH 4/7] e1000e: Increase Tx timeout factor for 10Mbps Jeff Kirsher
2008-08-09  1:36 ` Jeff Kirsher [this message]
2008-08-09  1:36 ` [PATCH 6/7] e1000e: test for unusable MSI support Jeff Kirsher
2008-08-09  1:36 ` [PATCH 7/7] e1000e: remove unnecessary snippet missed in prior check_options update Jeff Kirsher
2008-08-14  8:46 ` [PATCH 1/7] e1000e: Return 1 instead of a non-zero value for link up indication Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080809013606.23913.73166.stgit@localhost.localdomain \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bruce.w.allan@intel.com \
    --cc=davem@davemloft.net \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).