aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_main.c
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2006-03-02 21:20:29 -0500
committerroot <root@jk-desktop.jf.intel.com>2006-03-02 21:20:29 -0500
commit85b22eb632dc75887ba99edad49307a02c2ae7ec (patch)
tree07fca1fa18db61f6b3024ff2db290a6111356900 /drivers/net/e1000/e1000_main.c
parent9f68788856b134f93d9d10b19aa902924c61fc02 (diff)
e1000: Add enabled Jumbo frame support for 82573L
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r--drivers/net/e1000/e1000_main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 6603bd139064..58561a4955e3 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2978,6 +2978,7 @@ e1000_change_mtu(struct net_device *netdev, int new_mtu)
2978{ 2978{
2979 struct e1000_adapter *adapter = netdev_priv(netdev); 2979 struct e1000_adapter *adapter = netdev_priv(netdev);
2980 int max_frame = new_mtu + ENET_HEADER_SIZE + ETHERNET_FCS_SIZE; 2980 int max_frame = new_mtu + ENET_HEADER_SIZE + ETHERNET_FCS_SIZE;
2981 uint16_t eeprom_data = 0;
2981 2982
2982 if ((max_frame < MINIMUM_ETHERNET_FRAME_SIZE) || 2983 if ((max_frame < MINIMUM_ETHERNET_FRAME_SIZE) ||
2983 (max_frame > MAX_JUMBO_FRAME_SIZE)) { 2984 (max_frame > MAX_JUMBO_FRAME_SIZE)) {
@@ -2989,12 +2990,25 @@ e1000_change_mtu(struct net_device *netdev, int new_mtu)
2989 switch (adapter->hw.mac_type) { 2990 switch (adapter->hw.mac_type) {
2990 case e1000_82542_rev2_0: 2991 case e1000_82542_rev2_0:
2991 case e1000_82542_rev2_1: 2992 case e1000_82542_rev2_1:
2992 case e1000_82573:
2993 if (max_frame > MAXIMUM_ETHERNET_FRAME_SIZE) { 2993 if (max_frame > MAXIMUM_ETHERNET_FRAME_SIZE) {
2994 DPRINTK(PROBE, ERR, "Jumbo Frames not supported.\n"); 2994 DPRINTK(PROBE, ERR, "Jumbo Frames not supported.\n");
2995 return -EINVAL; 2995 return -EINVAL;
2996 } 2996 }
2997 break; 2997 break;
2998 case e1000_82573:
2999 /* only enable jumbo frames if ASPM is disabled completely
3000 * this means both bits must be zero in 0x1A bits 3:2 */
3001 e1000_read_eeprom(&adapter->hw, EEPROM_INIT_3GIO_3, 1,
3002 &eeprom_data);
3003 if (eeprom_data & EEPROM_WORD1A_ASPM_MASK) {
3004 if (max_frame > MAXIMUM_ETHERNET_FRAME_SIZE) {
3005 DPRINTK(PROBE, ERR,
3006 "Jumbo Frames not supported.\n");
3007 return -EINVAL;
3008 }
3009 break;
3010 }
3011 /* fall through to get support */
2998 case e1000_82571: 3012 case e1000_82571:
2999 case e1000_82572: 3013 case e1000_82572:
3000#define MAX_STD_JUMBO_FRAME_SIZE 9234 3014#define MAX_STD_JUMBO_FRAME_SIZE 9234