From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: "Garzik, Jeff" <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org, "Brandeburg,
Jesse" <jesse.brandeburg@intel.com>,
"Kok, Auke" <auke-jan.h.kok@intel.com>,
"Kok, Auke" <auke@foo-projects.org>,
"Ronciak, John" <john.ronciak@intel.com>
Subject: [PATCH 3/4] e1000: fix panic on large frame receive when mtu=default
Date: Fri, 14 Jul 2006 16:29:48 -0700 [thread overview]
Message-ID: <20060714232947.22378.30207.stgit@gitlost.site> (raw)
In-Reply-To: <20060714232452.22378.32866.stgit@gitlost.site>
A panic was reported when receiving 1522 size packets if using
the default MTU. we should set the initial rx buffer length to the
value that e1000changemtu sets so that we can receive any packet
that would not be dropped by LPE=0.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke.jan.h.kok@intel.com>
---
drivers/net/e1000/e1000.h | 3 +++
drivers/net/e1000/e1000_main.c | 3 +--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index f411bbb..d304297 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -110,6 +110,9 @@ struct e1000_adapter;
#define E1000_MIN_RXD 80
#define E1000_MAX_82544_RXD 4096
+/* this is the size past which hardware will drop packets when setting LPE=0 */
+#define MAXIMUM_ETHERNET_VLAN_SIZE 1522
+
/* Supported Rx Buffer Sizes */
#define E1000_RXBUFFER_128 128 /* Used for packet split */
#define E1000_RXBUFFER_256 256 /* Used for packet split */
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 0074a3a..154acb2 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1068,7 +1068,7 @@ e1000_sw_init(struct e1000_adapter *adap
pci_read_config_word(pdev, PCI_COMMAND, &hw->pci_cmd_word);
- adapter->rx_buffer_len = MAXIMUM_ETHERNET_FRAME_SIZE;
+ adapter->rx_buffer_len = MAXIMUM_ETHERNET_VLAN_SIZE;
adapter->rx_ps_bsize0 = E1000_RXBUFFER_128;
hw->max_frame_size = netdev->mtu +
ENET_HEADER_SIZE + ETHERNET_FCS_SIZE;
@@ -3148,7 +3148,6 @@ e1000_change_mtu(struct net_device *netd
adapter->rx_buffer_len = E1000_RXBUFFER_16384;
/* adjust allocation if LPE protects us, and we aren't using SBP */
-#define MAXIMUM_ETHERNET_VLAN_SIZE 1522
if (!adapter->hw.tbi_compatibility_on &&
((max_frame == MAXIMUM_ETHERNET_FRAME_SIZE) ||
(max_frame == MAXIMUM_ETHERNET_VLAN_SIZE)))
--
Auke Kok <auke-jan.h.kok@intel.com>
next prev parent reply other threads:[~2006-07-14 23:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-14 23:24 [PATCH 0/4] e1000: fixes for 7.1.9-k2 Kok, Auke
2006-07-14 23:29 ` [PATCH 1/4] e1000: Redo netpoll fix to address community concerns Kok, Auke
2006-07-14 23:29 ` [PATCH 2/4] e1000: remove CRC bytes from measured packet length Kok, Auke
2006-07-14 23:29 ` Kok, Auke [this message]
2006-07-14 23:29 ` [PATCH 4/4] e1000: bump version to 7.1.9-k4 Kok, Auke
2006-07-15 0:03 ` [PATCH 0/4] e1000: fixes for 7.1.9-k2 Matt Mackall
2006-07-15 0:15 ` Jeff Kirsher
2006-07-15 0:44 ` Matt Mackall
2006-07-17 17:27 ` 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=20060714232947.22378.30207.stgit@gitlost.site \
--to=auke-jan.h.kok@intel.com \
--cc=auke@foo-projects.org \
--cc=jesse.brandeburg@intel.com \
--cc=jgarzik@pobox.com \
--cc=john.ronciak@intel.com \
--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).