|
85 | 85 | #define RTL_R16(tp, reg) readw(tp->mmio_addr + (reg))
|
86 | 86 | #define RTL_R32(tp, reg) readl(tp->mmio_addr + (reg))
|
87 | 87 |
|
88 |
| -#define JUMBO_1K ETH_DATA_LEN |
89 | 88 | #define JUMBO_4K (4*1024 - ETH_HLEN - 2)
|
90 | 89 | #define JUMBO_6K (6*1024 - ETH_HLEN - 2)
|
91 | 90 | #define JUMBO_7K (7*1024 - ETH_HLEN - 2)
|
@@ -1494,7 +1493,7 @@ static netdev_features_t rtl8169_fix_features(struct net_device *dev,
|
1494 | 1493 | if (dev->mtu > TD_MSS_MAX)
|
1495 | 1494 | features &= ~NETIF_F_ALL_TSO;
|
1496 | 1495 |
|
1497 |
| - if (dev->mtu > JUMBO_1K && |
| 1496 | + if (dev->mtu > ETH_DATA_LEN && |
1498 | 1497 | tp->mac_version > RTL_GIGA_MAC_VER_06)
|
1499 | 1498 | features &= ~(NETIF_F_CSUM_MASK | NETIF_F_ALL_TSO);
|
1500 | 1499 |
|
@@ -5360,7 +5359,7 @@ static int rtl_jumbo_max(struct rtl8169_private *tp)
|
5360 | 5359 | {
|
5361 | 5360 | /* Non-GBit versions don't support jumbo frames */
|
5362 | 5361 | if (!tp->supports_gmii)
|
5363 |
| - return JUMBO_1K; |
| 5362 | + return 0; |
5364 | 5363 |
|
5365 | 5364 | switch (tp->mac_version) {
|
5366 | 5365 | /* RTL8169 */
|
@@ -5591,10 +5590,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
5591 | 5590 | dev->hw_features |= NETIF_F_RXALL;
|
5592 | 5591 | dev->hw_features |= NETIF_F_RXFCS;
|
5593 | 5592 |
|
5594 |
| - /* MTU range: 60 - hw-specific max */ |
5595 |
| - dev->min_mtu = ETH_ZLEN; |
5596 | 5593 | jumbo_max = rtl_jumbo_max(tp);
|
5597 |
| - dev->max_mtu = jumbo_max; |
| 5594 | + if (jumbo_max) |
| 5595 | + dev->max_mtu = jumbo_max; |
5598 | 5596 |
|
5599 | 5597 | rtl_set_irq_mask(tp);
|
5600 | 5598 |
|
@@ -5624,7 +5622,7 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
5624 | 5622 | (RTL_R32(tp, TxConfig) >> 20) & 0xfcf,
|
5625 | 5623 | pci_irq_vector(pdev, 0));
|
5626 | 5624 |
|
5627 |
| - if (jumbo_max > JUMBO_1K) |
| 5625 | + if (jumbo_max) |
5628 | 5626 | netif_info(tp, probe, dev,
|
5629 | 5627 | "jumbo features [frames: %d bytes, tx checksumming: %s]\n",
|
5630 | 5628 | jumbo_max, tp->mac_version <= RTL_GIGA_MAC_VER_06 ?
|
|
0 commit comments