aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/igb/igb_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index cc94412ddf89..a50db5398fa5 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1834,11 +1834,11 @@ static void igb_setup_rctl(struct igb_adapter *adapter)
1834 rctl |= E1000_RCTL_SECRC; 1834 rctl |= E1000_RCTL_SECRC;
1835 1835
1836 /* 1836 /*
1837 * disable store bad packets, long packet enable, and clear size bits. 1837 * disable store bad packets and clear size bits.
1838 */ 1838 */
1839 rctl &= ~(E1000_RCTL_SBP | E1000_RCTL_LPE | E1000_RCTL_SZ_256); 1839 rctl &= ~(E1000_RCTL_SBP | E1000_RCTL_SZ_256);
1840 1840
1841 if (adapter->netdev->mtu > ETH_DATA_LEN) 1841 /* enable LPE when to prevent packets larger than max_frame_size */
1842 rctl |= E1000_RCTL_LPE; 1842 rctl |= E1000_RCTL_LPE;
1843 1843
1844 /* Setup buffer sizes */ 1844 /* Setup buffer sizes */
@@ -1864,7 +1864,7 @@ static void igb_setup_rctl(struct igb_adapter *adapter)
1864 */ 1864 */
1865 /* allocations using alloc_page take too long for regular MTU 1865 /* allocations using alloc_page take too long for regular MTU
1866 * so only enable packet split for jumbo frames */ 1866 * so only enable packet split for jumbo frames */
1867 if (rctl & E1000_RCTL_LPE) { 1867 if (adapter->netdev->mtu > ETH_DATA_LEN) {
1868 adapter->rx_ps_hdr_size = IGB_RXBUFFER_128; 1868 adapter->rx_ps_hdr_size = IGB_RXBUFFER_128;
1869 srrctl |= adapter->rx_ps_hdr_size << 1869 srrctl |= adapter->rx_ps_hdr_size <<
1870 E1000_SRRCTL_BSIZEHDRSIZE_SHIFT; 1870 E1000_SRRCTL_BSIZEHDRSIZE_SHIFT;