From: Bruce Allan Date: Fri, 25 Feb 2011 07:44:51 +0000 (+0000) Subject: e1000e: disable jumbo frames on 82579 when MACsec enabled in EEPROM X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=23e4f061306798dfb1941bd2f399949b705822c6;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git e1000e: disable jumbo frames on 82579 when MACsec enabled in EEPROM If/when an OEM enables MACsec in the 82579 EEPROM, disable jumbo frames support in the driver due to an interoperability issue in hardware that prevents jumbo packets from being transmitted or received. Signed-off-by: Bruce Allan Tested-by: Jeff Pieper Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/e1000e/defines.h b/drivers/net/e1000e/defines.h index 13149983d07..c516a7440be 100644 --- a/drivers/net/e1000e/defines.h +++ b/drivers/net/e1000e/defines.h @@ -86,6 +86,7 @@ #define E1000_CTRL_EXT_IAME 0x08000000 /* Interrupt acknowledge Auto-mask */ #define E1000_CTRL_EXT_INT_TIMER_CLR 0x20000000 /* Clear Interrupt timers after IMS clear */ #define E1000_CTRL_EXT_PBA_CLR 0x80000000 /* PBA Clear */ +#define E1000_CTRL_EXT_LSECCK 0x00001000 #define E1000_CTRL_EXT_PHYPDEN 0x00100000 /* Receive Descriptor bit definitions */ diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 9b434c0cbc9..ce1dbfdca11 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c @@ -758,7 +758,13 @@ static s32 e1000_get_variants_ich8lan(struct e1000_adapter *adapter) if (rc) return rc; - if (adapter->hw.phy.type == e1000_phy_ife) { + /* + * Disable Jumbo Frame support on parts with Intel 10/100 PHY or + * on parts with MACsec enabled in NVM (reflected in CTRL_EXT). + */ + if ((adapter->hw.phy.type == e1000_phy_ife) || + ((adapter->hw.mac.type >= e1000_pch2lan) && + (!(er32(CTRL_EXT) & E1000_CTRL_EXT_LSECCK)))) { adapter->flags &= ~FLAG_HAS_JUMBO_FRAMES; adapter->max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN; }