Skip to content

Commit e1bae75

Browse files
committed
Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2016-02-24 This series contains updates to e1000e, igb and igbvf. Raanan provides updates for e1000e, first increases the ULP timer since it now takes longer for the ULP exit to complete on Skylake. Fixes the configuration of the internal hardware PHY clock gating mechanism, which was causing packet loss due to mis configuring. Fixed additional ULP configuration settings which were not being properly cleared after cable connect in V-Pro capable systems. Added support for more i219 devices. Takuma Ueba provides a fix for I210 where IPv6 autoconf test sometimes fails due to DAD NS for link-local is not transmitted. To avoid this issue, we need to wait until 1000BASE-T status register "Remote receiver status OK". Todd provides a patch to override EEPROM WoL settings for specific OEM devices. Then renamed igb defines to be more generic, since the define E1000_MRQC_ENABLE_RSS_4Q enables 4 and 8 queues depending on the part. Roland Hii fixes an issue where only the half cycle time of less than or equal to 70 millisecond uses the I210 clock output function. His patch adds additional conditions when half cycle time is equal to 125 or 250 or 500 millisecond to use the clock output function. Alex Duyck adds support for generic transmit checksums for igb and igbvf. Jon Maxwell fixes an issues where customer applications are registering and un-registering multicast addresses every few seconds which is leading to many "Link is up" messages in the logs as a result of the netif_carrier_off(netdev) in igbvf_msix_other(). So remove the link is up message when registering multicast addresses. Corinna Vinschen provides a fix for when switching off VLAN offloading on i350, the VLAN interface becomes unusable. Stefan Assmann updates the driver to use ndo_stop() instead of dev_close() when running ethtool offline self test. Since dev_close() causes IFF_UP to be cleared which will remove the interfaces routes and some addresses. v2: Dropped patches 6-10 in the original series. Patch 6-7 added support for character device for AVB and based on community feedback, we do not want to do this. Patches 8-10 provided fixes to the problematic code added in patches 6 & 7. So all of them must go! ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 2246387 + 46eafa5 commit e1bae75

File tree

13 files changed

+261
-144
lines changed

13 files changed

+261
-144
lines changed

drivers/net/ethernet/intel/e1000e/hw.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ struct e1000_hw;
9292
#define E1000_DEV_ID_PCH_SPT_I219_LM2 0x15B7 /* SPT-H PCH */
9393
#define E1000_DEV_ID_PCH_SPT_I219_V2 0x15B8 /* SPT-H PCH */
9494
#define E1000_DEV_ID_PCH_LBG_I219_LM3 0x15B9 /* LBG PCH */
95+
#define E1000_DEV_ID_PCH_SPT_I219_LM4 0x15D7
96+
#define E1000_DEV_ID_PCH_SPT_I219_V4 0x15D8
97+
#define E1000_DEV_ID_PCH_SPT_I219_LM5 0x15E3
98+
#define E1000_DEV_ID_PCH_SPT_I219_V5 0x15D6
9599

96100
#define E1000_REVISION_4 4
97101

drivers/net/ethernet/intel/e1000e/ich8lan.c

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,9 +1252,9 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
12521252
ew32(H2ME, mac_reg);
12531253
}
12541254

1255-
/* Poll up to 100msec for ME to clear ULP_CFG_DONE */
1255+
/* Poll up to 300msec for ME to clear ULP_CFG_DONE. */
12561256
while (er32(FWSM) & E1000_FWSM_ULP_CFG_DONE) {
1257-
if (i++ == 10) {
1257+
if (i++ == 30) {
12581258
ret_val = -E1000_ERR_PHY;
12591259
goto out;
12601260
}
@@ -1328,6 +1328,8 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
13281328
I218_ULP_CONFIG1_RESET_TO_SMBUS |
13291329
I218_ULP_CONFIG1_WOL_HOST |
13301330
I218_ULP_CONFIG1_INBAND_EXIT |
1331+
I218_ULP_CONFIG1_EN_ULP_LANPHYPC |
1332+
I218_ULP_CONFIG1_DIS_CLR_STICKY_ON_PERST |
13311333
I218_ULP_CONFIG1_DISABLE_SMB_PERST);
13321334
e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg);
13331335

@@ -1433,6 +1435,18 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
14331435
emi_addr = I217_RX_CONFIG;
14341436
ret_val = e1000_write_emi_reg_locked(hw, emi_addr, emi_val);
14351437

1438+
if (hw->mac.type == e1000_pch_lpt ||
1439+
hw->mac.type == e1000_pch_spt) {
1440+
u16 phy_reg;
1441+
1442+
e1e_rphy_locked(hw, I217_PLL_CLOCK_GATE_REG, &phy_reg);
1443+
phy_reg &= ~I217_PLL_CLOCK_GATE_MASK;
1444+
if (speed == SPEED_100 || speed == SPEED_10)
1445+
phy_reg |= 0x3E8;
1446+
else
1447+
phy_reg |= 0xFA;
1448+
e1e_wphy_locked(hw, I217_PLL_CLOCK_GATE_REG, phy_reg);
1449+
}
14361450
hw->phy.ops.release(hw);
14371451

14381452
if (ret_val)
@@ -1467,6 +1481,18 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
14671481
hw->phy.ops.release(hw);
14681482
if (ret_val)
14691483
return ret_val;
1484+
} else {
1485+
ret_val = hw->phy.ops.acquire(hw);
1486+
if (ret_val)
1487+
return ret_val;
1488+
1489+
ret_val = e1e_wphy_locked(hw,
1490+
PHY_REG(776, 20),
1491+
0xC023);
1492+
hw->phy.ops.release(hw);
1493+
if (ret_val)
1494+
return ret_val;
1495+
14701496
}
14711497
}
14721498
}

drivers/net/ethernet/intel/e1000e/ich8lan.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@
188188
#define I218_ULP_CONFIG1_INBAND_EXIT 0x0020 /* Inband on ULP exit */
189189
#define I218_ULP_CONFIG1_WOL_HOST 0x0040 /* WoL Host on ULP exit */
190190
#define I218_ULP_CONFIG1_RESET_TO_SMBUS 0x0100 /* Reset to SMBus mode */
191+
/* enable ULP even if when phy powered down via lanphypc */
192+
#define I218_ULP_CONFIG1_EN_ULP_LANPHYPC 0x0400
193+
/* disable clear of sticky ULP on PERST */
194+
#define I218_ULP_CONFIG1_DIS_CLR_STICKY_ON_PERST 0x0800
191195
#define I218_ULP_CONFIG1_DISABLE_SMB_PERST 0x1000 /* Disable on PERST# */
192196

193197
/* SMBus Address Phy Register */
@@ -226,6 +230,9 @@
226230
#define HV_PM_CTRL_PLL_STOP_IN_K1_GIGA 0x100
227231
#define HV_PM_CTRL_K1_ENABLE 0x4000
228232

233+
#define I217_PLL_CLOCK_GATE_REG PHY_REG(772, 28)
234+
#define I217_PLL_CLOCK_GATE_MASK 0x07FF
235+
229236
#define SW_FLAG_TIMEOUT 1000 /* SW Semaphore flag timeout in ms */
230237

231238
/* Inband Control */

drivers/net/ethernet/intel/e1000e/netdev.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7452,6 +7452,10 @@ static const struct pci_device_id e1000_pci_tbl[] = {
74527452
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM2), board_pch_spt },
74537453
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V2), board_pch_spt },
74547454
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LBG_I219_LM3), board_pch_spt },
7455+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM4), board_pch_spt },
7456+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V4), board_pch_spt },
7457+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM5), board_pch_spt },
7458+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V5), board_pch_spt },
74557459

74567460
{ 0, 0, 0, 0, 0, 0, 0 } /* terminate list */
74577461
};

drivers/net/ethernet/intel/igb/e1000_82575.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2920,7 +2920,7 @@ static struct e1000_mac_operations e1000_mac_ops_82575 = {
29202920
#endif
29212921
};
29222922

2923-
static struct e1000_phy_operations e1000_phy_ops_82575 = {
2923+
static const struct e1000_phy_operations e1000_phy_ops_82575 = {
29242924
.acquire = igb_acquire_phy_82575,
29252925
.get_cfg_done = igb_get_cfg_done_82575,
29262926
.release = igb_release_phy_82575,

drivers/net/ethernet/intel/igb/e1000_82575.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ s32 igb_write_i2c_byte(struct e1000_hw *hw, u8 byte_offset, u8 dev_addr,
5656
#define E1000_SRRCTL_TIMESTAMP 0x40000000
5757

5858

59-
#define E1000_MRQC_ENABLE_RSS_4Q 0x00000002
59+
#define E1000_MRQC_ENABLE_RSS_MQ 0x00000002
6060
#define E1000_MRQC_ENABLE_VMDQ 0x00000003
6161
#define E1000_MRQC_RSS_FIELD_IPV4_UDP 0x00400000
62-
#define E1000_MRQC_ENABLE_VMDQ_RSS_2Q 0x00000005
62+
#define E1000_MRQC_ENABLE_VMDQ_RSS_MQ 0x00000005
6363
#define E1000_MRQC_RSS_FIELD_IPV6_UDP 0x00800000
6464
#define E1000_MRQC_RSS_FIELD_IPV6_UDP_EX 0x01000000
6565

drivers/net/ethernet/intel/igb/e1000_hw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ struct e1000_thermal_sensor_data {
372372
struct e1000_info {
373373
s32 (*get_invariants)(struct e1000_hw *);
374374
struct e1000_mac_operations *mac_ops;
375-
struct e1000_phy_operations *phy_ops;
375+
const struct e1000_phy_operations *phy_ops;
376376
struct e1000_nvm_operations *nvm_ops;
377377
};
378378

drivers/net/ethernet/intel/igb/igb.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ enum igb_boards {
510510
extern char igb_driver_name[];
511511
extern char igb_driver_version[];
512512

513+
int igb_open(struct net_device *netdev);
514+
int igb_close(struct net_device *netdev);
513515
int igb_up(struct igb_adapter *);
514516
void igb_down(struct igb_adapter *);
515517
void igb_reinit_locked(struct igb_adapter *);

drivers/net/ethernet/intel/igb/igb_ethtool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,7 +2017,7 @@ static void igb_diag_test(struct net_device *netdev,
20172017

20182018
if (if_running)
20192019
/* indicate we're in test mode */
2020-
dev_close(netdev);
2020+
igb_close(netdev);
20212021
else
20222022
igb_reset(adapter);
20232023

@@ -2050,7 +2050,7 @@ static void igb_diag_test(struct net_device *netdev,
20502050

20512051
clear_bit(__IGB_TESTING, &adapter->state);
20522052
if (if_running)
2053-
dev_open(netdev);
2053+
igb_open(netdev);
20542054
} else {
20552055
dev_info(&adapter->pdev->dev, "online testing starting\n");
20562056

0 commit comments

Comments
 (0)