diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2006-03-02 21:20:29 -0500 |
---|---|---|
committer | root <root@jk-desktop.jf.intel.com> | 2006-03-02 21:20:29 -0500 |
commit | 85b22eb632dc75887ba99edad49307a02c2ae7ec (patch) | |
tree | 07fca1fa18db61f6b3024ff2db290a6111356900 /drivers/net/e1000 | |
parent | 9f68788856b134f93d9d10b19aa902924c61fc02 (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')
-rw-r--r-- | drivers/net/e1000/e1000_hw.h | 5 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 16 |
2 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h index 0848e556b1a9..f565b201c49e 100644 --- a/drivers/net/e1000/e1000_hw.h +++ b/drivers/net/e1000/e1000_hw.h | |||
@@ -1875,6 +1875,7 @@ struct e1000_hw { | |||
1875 | #define E1000_MANC_TCO_RESET 0x00010000 /* TCO Reset Occurred */ | 1875 | #define E1000_MANC_TCO_RESET 0x00010000 /* TCO Reset Occurred */ |
1876 | #define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */ | 1876 | #define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */ |
1877 | #define E1000_MANC_REPORT_STATUS 0x00040000 /* Status Reporting Enabled */ | 1877 | #define E1000_MANC_REPORT_STATUS 0x00040000 /* Status Reporting Enabled */ |
1878 | #define E1000_MANC_RCV_ALL 0x00080000 /* Receive All Enabled */ | ||
1878 | #define E1000_MANC_BLK_PHY_RST_ON_IDE 0x00040000 /* Block phy resets */ | 1879 | #define E1000_MANC_BLK_PHY_RST_ON_IDE 0x00040000 /* Block phy resets */ |
1879 | #define E1000_MANC_EN_MAC_ADDR_FILTER 0x00100000 /* Enable MAC address | 1880 | #define E1000_MANC_EN_MAC_ADDR_FILTER 0x00100000 /* Enable MAC address |
1880 | * filtering */ | 1881 | * filtering */ |
@@ -2036,6 +2037,7 @@ struct e1000_host_command_info { | |||
2036 | #define EEPROM_INIT_CONTROL1_REG 0x000A | 2037 | #define EEPROM_INIT_CONTROL1_REG 0x000A |
2037 | #define EEPROM_INIT_CONTROL2_REG 0x000F | 2038 | #define EEPROM_INIT_CONTROL2_REG 0x000F |
2038 | #define EEPROM_INIT_CONTROL3_PORT_B 0x0014 | 2039 | #define EEPROM_INIT_CONTROL3_PORT_B 0x0014 |
2040 | #define EEPROM_INIT_3GIO_3 0x001A | ||
2039 | #define EEPROM_INIT_CONTROL3_PORT_A 0x0024 | 2041 | #define EEPROM_INIT_CONTROL3_PORT_A 0x0024 |
2040 | #define EEPROM_CFG 0x0012 | 2042 | #define EEPROM_CFG 0x0012 |
2041 | #define EEPROM_FLASH_VERSION 0x0032 | 2043 | #define EEPROM_FLASH_VERSION 0x0032 |
@@ -2085,6 +2087,9 @@ struct e1000_host_command_info { | |||
2085 | #define EEPROM_WORD0F_ANE 0x0800 | 2087 | #define EEPROM_WORD0F_ANE 0x0800 |
2086 | #define EEPROM_WORD0F_SWPDIO_EXT 0x00F0 | 2088 | #define EEPROM_WORD0F_SWPDIO_EXT 0x00F0 |
2087 | 2089 | ||
2090 | /* Mask bits for fields in Word 0x1a of the EEPROM */ | ||
2091 | #define EEPROM_WORD1A_ASPM_MASK 0x000C | ||
2092 | |||
2088 | /* For checksumming, the sum of all words in the EEPROM should equal 0xBABA. */ | 2093 | /* For checksumming, the sum of all words in the EEPROM should equal 0xBABA. */ |
2089 | #define EEPROM_SUM 0xBABA | 2094 | #define EEPROM_SUM 0xBABA |
2090 | 2095 | ||
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 |