]>
Commit | Line | Data |
---|---|---|
1 | diff --git a/src/e1000_defines.h b/src/e1000_defines.h | |
2 | index 6de3988..d58e12f 100644 | |
3 | --- a/src/e1000_defines.h | |
4 | +++ b/src/e1000_defines.h | |
5 | @@ -423,7 +423,8 @@ | |
6 | #define ETHERNET_IEEE_VLAN_TYPE 0x8100 /* 802.3ac packet */ | |
7 | ||
8 | #define ETHERNET_FCS_SIZE 4 | |
9 | -#define MAX_JUMBO_FRAME_SIZE 0x3F00 | |
10 | +#define MAX_JUMBO_FRAME_SIZE 0x2600 | |
11 | +#define MAX_STD_JUMBO_FRAME_SIZE 9216 | |
12 | /* The datasheet maximum supported RX size is 9.5KB (9728 bytes) */ | |
13 | #define MAX_RX_JUMBO_FRAME_SIZE 0x2600 | |
14 | #define E1000_TX_PTR_GAP 0x1F | |
15 | diff --git a/src/igb_main.c b/src/igb_main.c | |
16 | index 2dff0f4..bbfe87e 100644 | |
17 | --- a/src/igb_main.c | |
18 | +++ b/src/igb_main.c | |
19 | @@ -2852,6 +2852,10 @@ static int igb_probe(struct pci_dev *pdev, | |
20 | if (pci_using_dac) | |
21 | netdev->features |= NETIF_F_HIGHDMA; | |
22 | ||
23 | + /* MTU range: 68 - 9216 */ | |
24 | + netdev->min_mtu = ETH_MIN_MTU; | |
25 | + netdev->max_mtu = MAX_STD_JUMBO_FRAME_SIZE; | |
26 | + | |
27 | adapter->en_mng_pt = e1000_enable_mng_pass_thru(hw); | |
28 | #ifdef DEBUG | |
29 | if (adapter->dmac != IGB_DMAC_DISABLE) | |
30 | @@ -5832,17 +5836,6 @@ static int igb_change_mtu(struct net_device *netdev, int new_mtu) | |
31 | struct pci_dev *pdev = adapter->pdev; | |
32 | int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; | |
33 | ||
34 | - if ((new_mtu < 68) || (max_frame > MAX_JUMBO_FRAME_SIZE)) { | |
35 | - dev_err(pci_dev_to_dev(pdev), "Invalid MTU setting\n"); | |
36 | - return -EINVAL; | |
37 | - } | |
38 | - | |
39 | -#define MAX_STD_JUMBO_FRAME_SIZE 9238 | |
40 | - if (max_frame > MAX_STD_JUMBO_FRAME_SIZE) { | |
41 | - dev_err(pci_dev_to_dev(pdev), "MTU > 9216 not supported.\n"); | |
42 | - return -EINVAL; | |
43 | - } | |
44 | - | |
45 | /* adjust max frame to be at least the size of a standard frame */ | |
46 | if (max_frame < (ETH_FRAME_LEN + ETH_FCS_LEN)) | |
47 | max_frame = ETH_FRAME_LEN + ETH_FCS_LEN; |