]> git.proxmox.com Git - pve-kernel.git/blob - e1000e_4.10_max-mtu.patch
build: dynamically choose number of jobs
[pve-kernel.git] / e1000e_4.10_max-mtu.patch
1 diff --git a/src/netdev.c b/src/netdev.c
2 index 73b0f9a..aef1bc2 100644
3 --- a/src/netdev.c
4 +++ b/src/netdev.c
5 @@ -6724,19 +6724,12 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
6 int max_frame = new_mtu + VLAN_ETH_HLEN + ETH_FCS_LEN;
7
8 /* Jumbo frame support */
9 - if ((max_frame > (VLAN_ETH_FRAME_LEN + ETH_FCS_LEN)) &&
10 + if ((new_mtu > ETH_DATA_LEN) &&
11 !(adapter->flags & FLAG_HAS_JUMBO_FRAMES)) {
12 e_err("Jumbo Frames not supported.\n");
13 return -EINVAL;
14 }
15
16 - /* Supported frame sizes */
17 - if ((new_mtu < (VLAN_ETH_ZLEN + ETH_FCS_LEN)) ||
18 - (max_frame > adapter->max_hw_frame_size)) {
19 - e_err("Unsupported MTU setting\n");
20 - return -EINVAL;
21 - }
22 -
23 /* Jumbo frame workaround on 82579 and newer requires CRC be stripped */
24 if ((adapter->hw.mac.type >= e1000_pch2lan) &&
25 !(adapter->flags2 & FLAG2_CRC_STRIPPING) &&
26 @@ -8262,6 +8255,11 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
27 #endif /* HAVE_NETDEV_VLAN_FEATURES */
28 }
29
30 + /* MTU range: 68 - max_hw_frame_size */
31 + netdev->min_mtu = ETH_MIN_MTU;
32 + netdev->max_mtu = adapter->max_hw_frame_size -
33 + (VLAN_ETH_HLEN + ETH_FCS_LEN);
34 +
35 if (e1000e_enable_mng_pass_thru(&adapter->hw))
36 adapter->flags |= FLAG_MNG_PT_ENABLED;
37