All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20
@ 2021-07-20 23:20 Tony Nguyen
  2021-07-20 23:20 ` [PATCH net-next 01/12] e1000e: Add handshake with the CSME to support S0ix Tony Nguyen
                   ` (12 more replies)
  0 siblings, 13 replies; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:20 UTC (permalink / raw)
  To: davem, kuba; +Cc: Tony Nguyen, netdev, sasha.neftin, vitaly.lifshits

This series contains updates to e1000e and igc drivers.

Sasha adds initial S0ix support for devices with CSME and adds polling
for exiting of DPG. He sets the PHY to low power idle when in S0ix. He
also adds support for new device IDs for and adds a space to debug
messaging to help with readability for e1000e.

For igc, he ensures that q_vector array is not accessed beyond its
bounds and removes unneeded PHY related checks.

Tree Davies corrects a spelling mistake in e1000e.

Muhammad corrects the value written when there is no TSN offloading
and adjusts timeout value to avoid possible Tx hang for igc.

The following are changes since commit 8887ca5474bd9ddb56cabc88856bb035774e0041:
  net: phy: at803x: simplify custom phy id matching
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 1GbE

Muhammad Husaini Zulkifli (2):
  igc: Set QBVCYCLET_S to 0 for TSN Basic Scheduling
  igc: Increase timeout value for Speed 100/1000/2500

Sasha Neftin (9):
  e1000e: Add handshake with the CSME to support S0ix
  e1000e: Add polling mechanism to indicate CSME DPG exit
  e1000e: Additional PHY power saving in S0ix
  e1000e: Add support for Lunar Lake
  e1000e: Add support for the next LOM generation
  e1000e: Add space to the debug print
  igc: Check if num of q_vectors is smaller than max before array access
  igc: Remove _I_PHY_ID checking
  igc: Remove phy->type checking

Tree Davies (1):
  net/e1000e: Fix spelling mistake "The" -> "This"

 drivers/net/ethernet/intel/e1000e/ethtool.c |   2 +
 drivers/net/ethernet/intel/e1000e/hw.h      |   9 +
 drivers/net/ethernet/intel/e1000e/ich8lan.c |  13 +-
 drivers/net/ethernet/intel/e1000e/ich8lan.h |   3 +
 drivers/net/ethernet/intel/e1000e/netdev.c  | 370 ++++++++++++--------
 drivers/net/ethernet/intel/e1000e/ptp.c     |   1 +
 drivers/net/ethernet/intel/e1000e/regs.h    |   1 +
 drivers/net/ethernet/intel/igc/igc_base.c   |  10 +-
 drivers/net/ethernet/intel/igc/igc_main.c   |  31 +-
 drivers/net/ethernet/intel/igc/igc_phy.c    |   6 +-
 drivers/net/ethernet/intel/igc/igc_tsn.c    |   2 +-
 11 files changed, 262 insertions(+), 186 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH net-next 01/12] e1000e: Add handshake with the CSME to support S0ix
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
@ 2021-07-20 23:20 ` Tony Nguyen
  2021-07-20 23:20 ` [PATCH net-next 02/12] e1000e: Add polling mechanism to indicate CSME DPG exit Tony Nguyen
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:20 UTC (permalink / raw)
  To: davem, kuba
  Cc: Sasha Neftin, netdev, anthony.l.nguyen, vitaly.lifshits,
	Dima Ruinskiy, Dvora Fuxbrumer

From: Sasha Neftin <sasha.neftin@intel.com>

On the corporate system, the driver will ask from the CSME
(manageability engine) to perform device settings are required
to allow S0ix residency.
This patch provides initial support.

Reviewed-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/e1000e/ich8lan.h |   2 +
 drivers/net/ethernet/intel/e1000e/netdev.c  | 328 +++++++++++---------
 2 files changed, 176 insertions(+), 154 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.h b/drivers/net/ethernet/intel/e1000e/ich8lan.h
index 1502895eb45d..e59456d867db 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.h
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.h
@@ -47,6 +47,8 @@
 #define E1000_SHRAH_PCH_LPT(_i)		(0x0540C + ((_i) * 8))
 
 #define E1000_H2ME		0x05B50	/* Host to ME */
+#define E1000_H2ME_START_DPG	0x00000001	/* indicate the ME of DPG */
+#define E1000_H2ME_EXIT_DPG	0x00000002	/* indicate the ME exit DPG */
 #define E1000_H2ME_ULP		0x00000800	/* ULP Indication Bit */
 #define E1000_H2ME_ENFORCE_SETTINGS	0x00001000	/* Enforce Settings */
 
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 757a54c39eef..4fa6f9f7d199 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6343,42 +6343,104 @@ static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter)
 	u32 mac_data;
 	u16 phy_data;
 
-	/* Disable the periodic inband message,
-	 * don't request PCIe clock in K1 page770_17[10:9] = 10b
-	 */
-	e1e_rphy(hw, HV_PM_CTRL, &phy_data);
-	phy_data &= ~HV_PM_CTRL_K1_CLK_REQ;
-	phy_data |= BIT(10);
-	e1e_wphy(hw, HV_PM_CTRL, phy_data);
+	if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID) {
+		/* Request ME configure the device for S0ix */
+		mac_data = er32(H2ME);
+		mac_data |= E1000_H2ME_START_DPG;
+		mac_data &= ~E1000_H2ME_EXIT_DPG;
+		ew32(H2ME, mac_data);
+	} else {
+		/* Request driver configure the device to S0ix */
+		/* Disable the periodic inband message,
+		 * don't request PCIe clock in K1 page770_17[10:9] = 10b
+		 */
+		e1e_rphy(hw, HV_PM_CTRL, &phy_data);
+		phy_data &= ~HV_PM_CTRL_K1_CLK_REQ;
+		phy_data |= BIT(10);
+		e1e_wphy(hw, HV_PM_CTRL, phy_data);
 
-	/* Make sure we don't exit K1 every time a new packet arrives
-	 * 772_29[5] = 1 CS_Mode_Stay_In_K1
-	 */
-	e1e_rphy(hw, I217_CGFREG, &phy_data);
-	phy_data |= BIT(5);
-	e1e_wphy(hw, I217_CGFREG, phy_data);
+		/* Make sure we don't exit K1 every time a new packet arrives
+		 * 772_29[5] = 1 CS_Mode_Stay_In_K1
+		 */
+		e1e_rphy(hw, I217_CGFREG, &phy_data);
+		phy_data |= BIT(5);
+		e1e_wphy(hw, I217_CGFREG, phy_data);
 
-	/* Change the MAC/PHY interface to SMBus
-	 * Force the SMBus in PHY page769_23[0] = 1
-	 * Force the SMBus in MAC CTRL_EXT[11] = 1
-	 */
-	e1e_rphy(hw, CV_SMB_CTRL, &phy_data);
-	phy_data |= CV_SMB_CTRL_FORCE_SMBUS;
-	e1e_wphy(hw, CV_SMB_CTRL, phy_data);
-	mac_data = er32(CTRL_EXT);
-	mac_data |= E1000_CTRL_EXT_FORCE_SMBUS;
-	ew32(CTRL_EXT, mac_data);
+		/* Change the MAC/PHY interface to SMBus
+		 * Force the SMBus in PHY page769_23[0] = 1
+		 * Force the SMBus in MAC CTRL_EXT[11] = 1
+		 */
+		e1e_rphy(hw, CV_SMB_CTRL, &phy_data);
+		phy_data |= CV_SMB_CTRL_FORCE_SMBUS;
+		e1e_wphy(hw, CV_SMB_CTRL, phy_data);
+		mac_data = er32(CTRL_EXT);
+		mac_data |= E1000_CTRL_EXT_FORCE_SMBUS;
+		ew32(CTRL_EXT, mac_data);
+
+		/* DFT control: PHY bit: page769_20[0] = 1
+		 * Gate PPW via EXTCNF_CTRL - set 0x0F00[7] = 1
+		 */
+		e1e_rphy(hw, I82579_DFT_CTRL, &phy_data);
+		phy_data |= BIT(0);
+		e1e_wphy(hw, I82579_DFT_CTRL, phy_data);
+
+		mac_data = er32(EXTCNF_CTRL);
+		mac_data |= E1000_EXTCNF_CTRL_GATE_PHY_CFG;
+		ew32(EXTCNF_CTRL, mac_data);
+
+		/* Enable the Dynamic Power Gating in the MAC */
+		mac_data = er32(FEXTNVM7);
+		mac_data |= BIT(22);
+		ew32(FEXTNVM7, mac_data);
+
+		/* Disable disconnected cable conditioning for Power Gating */
+		mac_data = er32(DPGFR);
+		mac_data |= BIT(2);
+		ew32(DPGFR, mac_data);
+
+		/* Don't wake from dynamic Power Gating with clock request */
+		mac_data = er32(FEXTNVM12);
+		mac_data |= BIT(12);
+		ew32(FEXTNVM12, mac_data);
+
+		/* Ungate PGCB clock */
+		mac_data = er32(FEXTNVM9);
+		mac_data &= ~BIT(28);
+		ew32(FEXTNVM9, mac_data);
+
+		/* Enable K1 off to enable mPHY Power Gating */
+		mac_data = er32(FEXTNVM6);
+		mac_data |= BIT(31);
+		ew32(FEXTNVM6, mac_data);
+
+		/* Enable mPHY power gating for any link and speed */
+		mac_data = er32(FEXTNVM8);
+		mac_data |= BIT(9);
+		ew32(FEXTNVM8, mac_data);
+
+		/* Enable the Dynamic Clock Gating in the DMA and MAC */
+		mac_data = er32(CTRL_EXT);
+		mac_data |= E1000_CTRL_EXT_DMA_DYN_CLK_EN;
+		ew32(CTRL_EXT, mac_data);
+
+		/* No MAC DPG gating SLP_S0 in modern standby
+		 * Switch the logic of the lanphypc to use PMC counter
+		 */
+		mac_data = er32(FEXTNVM5);
+		mac_data |= BIT(7);
+		ew32(FEXTNVM5, mac_data);
+	}
 
-	/* DFT control: PHY bit: page769_20[0] = 1
-	 * Gate PPW via EXTCNF_CTRL - set 0x0F00[7] = 1
-	 */
-	e1e_rphy(hw, I82579_DFT_CTRL, &phy_data);
-	phy_data |= BIT(0);
-	e1e_wphy(hw, I82579_DFT_CTRL, phy_data);
+	/* Disable the time synchronization clock */
+	mac_data = er32(FEXTNVM7);
+	mac_data |= BIT(31);
+	mac_data &= ~BIT(0);
+	ew32(FEXTNVM7, mac_data);
 
-	mac_data = er32(EXTCNF_CTRL);
-	mac_data |= E1000_EXTCNF_CTRL_GATE_PHY_CFG;
-	ew32(EXTCNF_CTRL, mac_data);
+	/* Dynamic Power Gating Enable */
+	mac_data = er32(CTRL_EXT);
+	mac_data |= BIT(3);
+	ew32(CTRL_EXT, mac_data);
 
 	/* Check MAC Tx/Rx packet buffer pointers.
 	 * Reset MAC Tx/Rx packet buffer pointers to suppress any
@@ -6414,59 +6476,6 @@ static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter)
 	mac_data = er32(RDFPC);
 	if (mac_data)
 		ew32(RDFPC, 0);
-
-	/* Enable the Dynamic Power Gating in the MAC */
-	mac_data = er32(FEXTNVM7);
-	mac_data |= BIT(22);
-	ew32(FEXTNVM7, mac_data);
-
-	/* Disable the time synchronization clock */
-	mac_data = er32(FEXTNVM7);
-	mac_data |= BIT(31);
-	mac_data &= ~BIT(0);
-	ew32(FEXTNVM7, mac_data);
-
-	/* Dynamic Power Gating Enable */
-	mac_data = er32(CTRL_EXT);
-	mac_data |= BIT(3);
-	ew32(CTRL_EXT, mac_data);
-
-	/* Disable disconnected cable conditioning for Power Gating */
-	mac_data = er32(DPGFR);
-	mac_data |= BIT(2);
-	ew32(DPGFR, mac_data);
-
-	/* Don't wake from dynamic Power Gating with clock request */
-	mac_data = er32(FEXTNVM12);
-	mac_data |= BIT(12);
-	ew32(FEXTNVM12, mac_data);
-
-	/* Ungate PGCB clock */
-	mac_data = er32(FEXTNVM9);
-	mac_data &= ~BIT(28);
-	ew32(FEXTNVM9, mac_data);
-
-	/* Enable K1 off to enable mPHY Power Gating */
-	mac_data = er32(FEXTNVM6);
-	mac_data |= BIT(31);
-	ew32(FEXTNVM6, mac_data);
-
-	/* Enable mPHY power gating for any link and speed */
-	mac_data = er32(FEXTNVM8);
-	mac_data |= BIT(9);
-	ew32(FEXTNVM8, mac_data);
-
-	/* Enable the Dynamic Clock Gating in the DMA and MAC */
-	mac_data = er32(CTRL_EXT);
-	mac_data |= E1000_CTRL_EXT_DMA_DYN_CLK_EN;
-	ew32(CTRL_EXT, mac_data);
-
-	/* No MAC DPG gating SLP_S0 in modern standby
-	 * Switch the logic of the lanphypc to use PMC counter
-	 */
-	mac_data = er32(FEXTNVM5);
-	mac_data |= BIT(7);
-	ew32(FEXTNVM5, mac_data);
 }
 
 static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
@@ -6475,87 +6484,98 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
 	u32 mac_data;
 	u16 phy_data;
 
-	/* Disable the Dynamic Power Gating in the MAC */
-	mac_data = er32(FEXTNVM7);
-	mac_data &= 0xFFBFFFFF;
-	ew32(FEXTNVM7, mac_data);
+	if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID) {
+		/* Request ME unconfigure the device from S0ix */
+		mac_data = er32(H2ME);
+		mac_data &= ~E1000_H2ME_START_DPG;
+		mac_data |= E1000_H2ME_EXIT_DPG;
+		ew32(H2ME, mac_data);
+	} else {
+		/* Request driver unconfigure the device from S0ix */
+
+		/* Disable the Dynamic Power Gating in the MAC */
+		mac_data = er32(FEXTNVM7);
+		mac_data &= 0xFFBFFFFF;
+		ew32(FEXTNVM7, mac_data);
+
+		/* Disable mPHY power gating for any link and speed */
+		mac_data = er32(FEXTNVM8);
+		mac_data &= ~BIT(9);
+		ew32(FEXTNVM8, mac_data);
+
+		/* Disable K1 off */
+		mac_data = er32(FEXTNVM6);
+		mac_data &= ~BIT(31);
+		ew32(FEXTNVM6, mac_data);
+
+		/* Disable Ungate PGCB clock */
+		mac_data = er32(FEXTNVM9);
+		mac_data |= BIT(28);
+		ew32(FEXTNVM9, mac_data);
+
+		/* Cancel not waking from dynamic
+		 * Power Gating with clock request
+		 */
+		mac_data = er32(FEXTNVM12);
+		mac_data &= ~BIT(12);
+		ew32(FEXTNVM12, mac_data);
 
-	/* Enable the time synchronization clock */
-	mac_data = er32(FEXTNVM7);
-	mac_data |= BIT(0);
-	ew32(FEXTNVM7, mac_data);
+		/* Cancel disable disconnected cable conditioning
+		 * for Power Gating
+		 */
+		mac_data = er32(DPGFR);
+		mac_data &= ~BIT(2);
+		ew32(DPGFR, mac_data);
 
-	/* Disable mPHY power gating for any link and speed */
-	mac_data = er32(FEXTNVM8);
-	mac_data &= ~BIT(9);
-	ew32(FEXTNVM8, mac_data);
+		/* Disable the Dynamic Clock Gating in the DMA and MAC */
+		mac_data = er32(CTRL_EXT);
+		mac_data &= 0xFFF7FFFF;
+		ew32(CTRL_EXT, mac_data);
 
-	/* Disable K1 off */
-	mac_data = er32(FEXTNVM6);
-	mac_data &= ~BIT(31);
-	ew32(FEXTNVM6, mac_data);
+		/* Revert the lanphypc logic to use the internal Gbe counter
+		 * and not the PMC counter
+		 */
+		mac_data = er32(FEXTNVM5);
+		mac_data &= 0xFFFFFF7F;
+		ew32(FEXTNVM5, mac_data);
 
-	/* Disable Ungate PGCB clock */
-	mac_data = er32(FEXTNVM9);
-	mac_data |= BIT(28);
-	ew32(FEXTNVM9, mac_data);
+		/* Enable the periodic inband message,
+		 * Request PCIe clock in K1 page770_17[10:9] =01b
+		 */
+		e1e_rphy(hw, HV_PM_CTRL, &phy_data);
+		phy_data &= 0xFBFF;
+		phy_data |= HV_PM_CTRL_K1_CLK_REQ;
+		e1e_wphy(hw, HV_PM_CTRL, phy_data);
 
-	/* Cancel not waking from dynamic
-	 * Power Gating with clock request
-	 */
-	mac_data = er32(FEXTNVM12);
-	mac_data &= ~BIT(12);
-	ew32(FEXTNVM12, mac_data);
+		/* Return back configuration
+		 * 772_29[5] = 0 CS_Mode_Stay_In_K1
+		 */
+		e1e_rphy(hw, I217_CGFREG, &phy_data);
+		phy_data &= 0xFFDF;
+		e1e_wphy(hw, I217_CGFREG, phy_data);
 
-	/* Cancel disable disconnected cable conditioning
-	 * for Power Gating
-	 */
-	mac_data = er32(DPGFR);
-	mac_data &= ~BIT(2);
-	ew32(DPGFR, mac_data);
+		/* Change the MAC/PHY interface to Kumeran
+		 * Unforce the SMBus in PHY page769_23[0] = 0
+		 * Unforce the SMBus in MAC CTRL_EXT[11] = 0
+		 */
+		e1e_rphy(hw, CV_SMB_CTRL, &phy_data);
+		phy_data &= ~CV_SMB_CTRL_FORCE_SMBUS;
+		e1e_wphy(hw, CV_SMB_CTRL, phy_data);
+		mac_data = er32(CTRL_EXT);
+		mac_data &= ~E1000_CTRL_EXT_FORCE_SMBUS;
+		ew32(CTRL_EXT, mac_data);
+	}
 
 	/* Disable Dynamic Power Gating */
 	mac_data = er32(CTRL_EXT);
 	mac_data &= 0xFFFFFFF7;
 	ew32(CTRL_EXT, mac_data);
 
-	/* Disable the Dynamic Clock Gating in the DMA and MAC */
-	mac_data = er32(CTRL_EXT);
-	mac_data &= 0xFFF7FFFF;
-	ew32(CTRL_EXT, mac_data);
-
-	/* Revert the lanphypc logic to use the internal Gbe counter
-	 * and not the PMC counter
-	 */
-	mac_data = er32(FEXTNVM5);
-	mac_data &= 0xFFFFFF7F;
-	ew32(FEXTNVM5, mac_data);
-
-	/* Enable the periodic inband message,
-	 * Request PCIe clock in K1 page770_17[10:9] =01b
-	 */
-	e1e_rphy(hw, HV_PM_CTRL, &phy_data);
-	phy_data &= 0xFBFF;
-	phy_data |= HV_PM_CTRL_K1_CLK_REQ;
-	e1e_wphy(hw, HV_PM_CTRL, phy_data);
-
-	/* Return back configuration
-	 * 772_29[5] = 0 CS_Mode_Stay_In_K1
-	 */
-	e1e_rphy(hw, I217_CGFREG, &phy_data);
-	phy_data &= 0xFFDF;
-	e1e_wphy(hw, I217_CGFREG, phy_data);
-
-	/* Change the MAC/PHY interface to Kumeran
-	 * Unforce the SMBus in PHY page769_23[0] = 0
-	 * Unforce the SMBus in MAC CTRL_EXT[11] = 0
-	 */
-	e1e_rphy(hw, CV_SMB_CTRL, &phy_data);
-	phy_data &= ~CV_SMB_CTRL_FORCE_SMBUS;
-	e1e_wphy(hw, CV_SMB_CTRL, phy_data);
-	mac_data = er32(CTRL_EXT);
-	mac_data &= ~E1000_CTRL_EXT_FORCE_SMBUS;
-	ew32(CTRL_EXT, mac_data);
+	/* Enable the time synchronization clock */
+	mac_data = er32(FEXTNVM7);
+	mac_data &= ~BIT(31);
+	mac_data |= BIT(0);
+	ew32(FEXTNVM7, mac_data);
 }
 
 static int e1000e_pm_freeze(struct device *dev)
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 02/12] e1000e: Add polling mechanism to indicate CSME DPG exit
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
  2021-07-20 23:20 ` [PATCH net-next 01/12] e1000e: Add handshake with the CSME to support S0ix Tony Nguyen
@ 2021-07-20 23:20 ` Tony Nguyen
  2021-07-20 23:20 ` [PATCH net-next 03/12] e1000e: Additional PHY power saving in S0ix Tony Nguyen
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:20 UTC (permalink / raw)
  To: davem, kuba
  Cc: Sasha Neftin, netdev, anthony.l.nguyen, vitaly.lifshits, Dvora Fuxbrumer

From: Sasha Neftin <sasha.neftin@intel.com>

Per guidance from the CSME architecture team, it may take
up to 1 second for unconfiguring dynamic power gating mode.
Practically it can take more time. Wait up to 2.5 seconds to indicate
dynamic power gating exit from the S0ix configuration. Detect
scenarios that take more than 1 second but less than 2.5 seconds
will emit warning message.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/e1000e/ich8lan.h |  1 +
 drivers/net/ethernet/intel/e1000e/netdev.c  | 24 +++++++++++++++++++++
 drivers/net/ethernet/intel/e1000e/regs.h    |  1 +
 3 files changed, 26 insertions(+)

diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.h b/drivers/net/ethernet/intel/e1000e/ich8lan.h
index e59456d867db..9b145f6248a8 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.h
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.h
@@ -41,6 +41,7 @@
 #define E1000_FWSM_WLOCK_MAC_MASK	0x0380
 #define E1000_FWSM_WLOCK_MAC_SHIFT	7
 #define E1000_FWSM_ULP_CFG_DONE		0x00000400	/* Low power cfg done */
+#define E1000_EXFWSM_DPG_EXIT_DONE	0x00000001
 
 /* Shared Receive Address Registers */
 #define E1000_SHRAL_PCH_LPT(_i)		(0x05408 + ((_i) * 8))
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 4fa6f9f7d199..27107a927455 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6481,8 +6481,10 @@ static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter)
 static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
 {
 	struct e1000_hw *hw = &adapter->hw;
+	bool firmware_bug = false;
 	u32 mac_data;
 	u16 phy_data;
+	u32 i = 0;
 
 	if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID) {
 		/* Request ME unconfigure the device from S0ix */
@@ -6490,6 +6492,28 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
 		mac_data &= ~E1000_H2ME_START_DPG;
 		mac_data |= E1000_H2ME_EXIT_DPG;
 		ew32(H2ME, mac_data);
+
+		/* Poll up to 2.5 seconds for ME to unconfigure DPG.
+		 * If this takes more than 1 second, show a warning indicating a
+		 * firmware bug
+		 */
+		while (!(er32(EXFWSM) & E1000_EXFWSM_DPG_EXIT_DONE)) {
+			if (i > 100 && !firmware_bug)
+				firmware_bug = true;
+
+			if (i++ == 250) {
+				e_dbg("Timeout (firmware bug): %d msec\n",
+				      i * 10);
+				break;
+			}
+
+			usleep_range(10000, 11000);
+		}
+		if (firmware_bug)
+			e_warn("DPG_EXIT_DONE took %d msec. This is a firmware bug\n",
+			       i * 10);
+		else
+			e_dbg("DPG_EXIT_DONE cleared after %d msec\n", i * 10);
 	} else {
 		/* Request driver unconfigure the device from S0ix */
 
diff --git a/drivers/net/ethernet/intel/e1000e/regs.h b/drivers/net/ethernet/intel/e1000e/regs.h
index 8165ba2619a4..6c0cd8cab3ef 100644
--- a/drivers/net/ethernet/intel/e1000e/regs.h
+++ b/drivers/net/ethernet/intel/e1000e/regs.h
@@ -213,6 +213,7 @@
 #define E1000_FACTPS	0x05B30	/* Function Active and Power State to MNG */
 #define E1000_SWSM	0x05B50	/* SW Semaphore */
 #define E1000_FWSM	0x05B54	/* FW Semaphore */
+#define E1000_EXFWSM	0x05B58	/* Extended FW Semaphore */
 /* Driver-only SW semaphore (not used by BOOT agents) */
 #define E1000_SWSM2	0x05B58
 #define E1000_FFLT_DBG	0x05F04	/* Debug Register */
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 03/12] e1000e: Additional PHY power saving in S0ix
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
  2021-07-20 23:20 ` [PATCH net-next 01/12] e1000e: Add handshake with the CSME to support S0ix Tony Nguyen
  2021-07-20 23:20 ` [PATCH net-next 02/12] e1000e: Add polling mechanism to indicate CSME DPG exit Tony Nguyen
@ 2021-07-20 23:20 ` Tony Nguyen
  2021-07-20 23:20 ` [PATCH net-next 04/12] e1000e: Add support for Lunar Lake Tony Nguyen
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:20 UTC (permalink / raw)
  To: davem, kuba
  Cc: Sasha Neftin, netdev, anthony.l.nguyen, vitaly.lifshits,
	Dima Ruinskiy, Dvora Fuxbrumer

From: Sasha Neftin <sasha.neftin@intel.com>

After transferring the MAC-PHY interface to the SMBus set the PHY
to S0ix low power idle mode.

Suggested-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 27107a927455..79e8791119cd 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6378,10 +6378,16 @@ static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter)
 		ew32(CTRL_EXT, mac_data);
 
 		/* DFT control: PHY bit: page769_20[0] = 1
+		 * page769_20[7] - PHY PLL stop
+		 * page769_20[8] - PHY go to the electrical idle
+		 * page769_20[9] - PHY serdes disable
 		 * Gate PPW via EXTCNF_CTRL - set 0x0F00[7] = 1
 		 */
 		e1e_rphy(hw, I82579_DFT_CTRL, &phy_data);
 		phy_data |= BIT(0);
+		phy_data |= BIT(7);
+		phy_data |= BIT(8);
+		phy_data |= BIT(9);
 		e1e_wphy(hw, I82579_DFT_CTRL, phy_data);
 
 		mac_data = er32(EXTCNF_CTRL);
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 04/12] e1000e: Add support for Lunar Lake
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
                   ` (2 preceding siblings ...)
  2021-07-20 23:20 ` [PATCH net-next 03/12] e1000e: Additional PHY power saving in S0ix Tony Nguyen
@ 2021-07-20 23:20 ` Tony Nguyen
  2021-07-20 23:20 ` [PATCH net-next 05/12] e1000e: Add support for the next LOM generation Tony Nguyen
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:20 UTC (permalink / raw)
  To: davem, kuba
  Cc: Sasha Neftin, netdev, anthony.l.nguyen, vitaly.lifshits, Dvora Fuxbrumer

From: Sasha Neftin <sasha.neftin@intel.com>

Add devices IDs for the next LOM generations that will be
available on the next Intel Client platform (Lunar Lake)
This patch provides the initial support for these devices

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/e1000e/ethtool.c | 2 ++
 drivers/net/ethernet/intel/e1000e/hw.h      | 5 +++++
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 7 +++++++
 drivers/net/ethernet/intel/e1000e/netdev.c  | 6 ++++++
 drivers/net/ethernet/intel/e1000e/ptp.c     | 1 +
 5 files changed, 21 insertions(+)

diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c
index 06442e6bef73..7256b43b7a65 100644
--- a/drivers/net/ethernet/intel/e1000e/ethtool.c
+++ b/drivers/net/ethernet/intel/e1000e/ethtool.c
@@ -903,6 +903,7 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)
 	case e1000_pch_tgp:
 	case e1000_pch_adp:
 	case e1000_pch_mtp:
+	case e1000_pch_lnp:
 		mask |= BIT(18);
 		break;
 	default:
@@ -1569,6 +1570,7 @@ static void e1000_loopback_cleanup(struct e1000_adapter *adapter)
 	case e1000_pch_tgp:
 	case e1000_pch_adp:
 	case e1000_pch_mtp:
+	case e1000_pch_lnp:
 		fext_nvm11 = er32(FEXTNVM11);
 		fext_nvm11 &= ~E1000_FEXTNVM11_DISABLE_MULR_FIX;
 		ew32(FEXTNVM11, fext_nvm11);
diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h
index db79c4e6413e..36ff936918c9 100644
--- a/drivers/net/ethernet/intel/e1000e/hw.h
+++ b/drivers/net/ethernet/intel/e1000e/hw.h
@@ -106,6 +106,10 @@ struct e1000_hw;
 #define E1000_DEV_ID_PCH_MTP_I219_V18		0x550B
 #define E1000_DEV_ID_PCH_MTP_I219_LM19		0x550C
 #define E1000_DEV_ID_PCH_MTP_I219_V19		0x550D
+#define E1000_DEV_ID_PCH_LNP_I219_LM20		0x550E
+#define E1000_DEV_ID_PCH_LNP_I219_V20		0x550F
+#define E1000_DEV_ID_PCH_LNP_I219_LM21		0x5510
+#define E1000_DEV_ID_PCH_LNP_I219_V21		0x5511
 
 #define E1000_REVISION_4	4
 
@@ -132,6 +136,7 @@ enum e1000_mac_type {
 	e1000_pch_tgp,
 	e1000_pch_adp,
 	e1000_pch_mtp,
+	e1000_pch_lnp,
 };
 
 enum e1000_media_type {
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index cf7b3887da1d..b75196c6a29b 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -321,6 +321,7 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
 	case e1000_pch_tgp:
 	case e1000_pch_adp:
 	case e1000_pch_mtp:
+	case e1000_pch_lnp:
 		if (e1000_phy_is_accessible_pchlan(hw))
 			break;
 
@@ -466,6 +467,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
 		case e1000_pch_tgp:
 		case e1000_pch_adp:
 		case e1000_pch_mtp:
+		case e1000_pch_lnp:
 			/* In case the PHY needs to be in mdio slow mode,
 			 * set slow mode and try to get the PHY id again.
 			 */
@@ -711,6 +713,7 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
 	case e1000_pch_tgp:
 	case e1000_pch_adp:
 	case e1000_pch_mtp:
+	case e1000_pch_lnp:
 	case e1000_pchlan:
 		/* check management mode */
 		mac->ops.check_mng_mode = e1000_check_mng_mode_pchlan;
@@ -1663,6 +1666,7 @@ static s32 e1000_get_variants_ich8lan(struct e1000_adapter *adapter)
 	case e1000_pch_tgp:
 	case e1000_pch_adp:
 	case e1000_pch_mtp:
+	case e1000_pch_lnp:
 		rc = e1000_init_phy_params_pchlan(hw);
 		break;
 	default:
@@ -2118,6 +2122,7 @@ static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)
 	case e1000_pch_tgp:
 	case e1000_pch_adp:
 	case e1000_pch_mtp:
+	case e1000_pch_lnp:
 		sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG_ICH8M;
 		break;
 	default:
@@ -3162,6 +3167,7 @@ static s32 e1000_valid_nvm_bank_detect_ich8lan(struct e1000_hw *hw, u32 *bank)
 	case e1000_pch_tgp:
 	case e1000_pch_adp:
 	case e1000_pch_mtp:
+	case e1000_pch_lnp:
 		bank1_offset = nvm->flash_bank_size;
 		act_offset = E1000_ICH_NVM_SIG_WORD;
 
@@ -4101,6 +4107,7 @@ static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw)
 	case e1000_pch_tgp:
 	case e1000_pch_adp:
 	case e1000_pch_mtp:
+	case e1000_pch_lnp:
 		word = NVM_COMPAT;
 		valid_csum_mask = NVM_COMPAT_VALID_CSUM;
 		break;
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 79e8791119cd..59f22a75b96d 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -3550,6 +3550,7 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca)
 	case e1000_pch_tgp:
 	case e1000_pch_adp:
 	case e1000_pch_mtp:
+	case e1000_pch_lnp:
 		if (er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI) {
 			/* Stable 24MHz frequency */
 			incperiod = INCPERIOD_24MHZ;
@@ -4068,6 +4069,7 @@ void e1000e_reset(struct e1000_adapter *adapter)
 	case e1000_pch_tgp:
 	case e1000_pch_adp:
 	case e1000_pch_mtp:
+	case e1000_pch_lnp:
 		fc->refresh_time = 0xFFFF;
 		fc->pause_time = 0xFFFF;
 
@@ -7908,6 +7910,10 @@ static const struct pci_device_id e1000_pci_tbl[] = {
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V18), board_pch_cnp },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM19), board_pch_cnp },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V19), board_pch_cnp },
+	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM20), board_pch_cnp },
+	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V20), board_pch_cnp },
+	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM21), board_pch_cnp },
+	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V21), board_pch_cnp },
 
 	{ 0, 0, 0, 0, 0, 0, 0 }	/* terminate list */
 };
diff --git a/drivers/net/ethernet/intel/e1000e/ptp.c b/drivers/net/ethernet/intel/e1000e/ptp.c
index 9e79d672f4f1..eb5c014c02fb 100644
--- a/drivers/net/ethernet/intel/e1000e/ptp.c
+++ b/drivers/net/ethernet/intel/e1000e/ptp.c
@@ -298,6 +298,7 @@ void e1000e_ptp_init(struct e1000_adapter *adapter)
 	case e1000_pch_tgp:
 	case e1000_pch_adp:
 	case e1000_pch_mtp:
+	case e1000_pch_lnp:
 		if ((hw->mac.type < e1000_pch_lpt) ||
 		    (er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI)) {
 			adapter->ptp_clock_info.max_adj = 24000000 - 1;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 05/12] e1000e: Add support for the next LOM generation
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
                   ` (3 preceding siblings ...)
  2021-07-20 23:20 ` [PATCH net-next 04/12] e1000e: Add support for Lunar Lake Tony Nguyen
@ 2021-07-20 23:20 ` Tony Nguyen
  2021-07-20 23:20 ` [PATCH net-next 06/12] e1000e: Add space to the debug print Tony Nguyen
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:20 UTC (permalink / raw)
  To: davem, kuba
  Cc: Sasha Neftin, netdev, anthony.l.nguyen, vitaly.lifshits, Dvora Fuxbrumer

From: Sasha Neftin <sasha.neftin@intel.com>

Add devices IDs for the next LOM generations that will be
available on the next Intel Client platforms
This patch provides the initial support for these devices

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/e1000e/hw.h     | 4 ++++
 drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h
index 36ff936918c9..bcf680e83811 100644
--- a/drivers/net/ethernet/intel/e1000e/hw.h
+++ b/drivers/net/ethernet/intel/e1000e/hw.h
@@ -98,10 +98,14 @@ struct e1000_hw;
 #define E1000_DEV_ID_PCH_TGP_I219_V14		0x15FA
 #define E1000_DEV_ID_PCH_TGP_I219_LM15		0x15F4
 #define E1000_DEV_ID_PCH_TGP_I219_V15		0x15F5
+#define E1000_DEV_ID_PCH_RPL_I219_LM23		0x0DC5
+#define E1000_DEV_ID_PCH_RPL_I219_V23		0x0DC6
 #define E1000_DEV_ID_PCH_ADP_I219_LM16		0x1A1E
 #define E1000_DEV_ID_PCH_ADP_I219_V16		0x1A1F
 #define E1000_DEV_ID_PCH_ADP_I219_LM17		0x1A1C
 #define E1000_DEV_ID_PCH_ADP_I219_V17		0x1A1D
+#define E1000_DEV_ID_PCH_RPL_I219_LM22		0x0DC7
+#define E1000_DEV_ID_PCH_RPL_I219_V22		0x0DC8
 #define E1000_DEV_ID_PCH_MTP_I219_LM18		0x550A
 #define E1000_DEV_ID_PCH_MTP_I219_V18		0x550B
 #define E1000_DEV_ID_PCH_MTP_I219_LM19		0x550C
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 59f22a75b96d..152cacbc527e 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -7902,10 +7902,14 @@ static const struct pci_device_id e1000_pci_tbl[] = {
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V14), board_pch_cnp },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_LM15), board_pch_cnp },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V15), board_pch_cnp },
+	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM23), board_pch_cnp },
+	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V23), board_pch_cnp },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM16), board_pch_cnp },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V16), board_pch_cnp },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM17), board_pch_cnp },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V17), board_pch_cnp },
+	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM22), board_pch_cnp },
+	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V22), board_pch_cnp },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM18), board_pch_cnp },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V18), board_pch_cnp },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM19), board_pch_cnp },
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 06/12] e1000e: Add space to the debug print
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
                   ` (4 preceding siblings ...)
  2021-07-20 23:20 ` [PATCH net-next 05/12] e1000e: Add support for the next LOM generation Tony Nguyen
@ 2021-07-20 23:20 ` Tony Nguyen
  2021-07-20 23:20 ` [PATCH net-next 07/12] net/e1000e: Fix spelling mistake "The" -> "This" Tony Nguyen
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:20 UTC (permalink / raw)
  To: davem, kuba
  Cc: Sasha Neftin, netdev, anthony.l.nguyen, vitaly.lifshits, Dvora Fuxbrumer

From: Sasha Neftin <sasha.neftin@intel.com>

Minor fixes to allow debug prints more readable.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index b75196c6a29b..2f97c9f5611d 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -1269,9 +1269,11 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
 			usleep_range(10000, 11000);
 		}
 		if (firmware_bug)
-			e_warn("ULP_CONFIG_DONE took %dmsec.  This is a firmware bug\n", i * 10);
+			e_warn("ULP_CONFIG_DONE took %d msec. This is a firmware bug\n",
+			       i * 10);
 		else
-			e_dbg("ULP_CONFIG_DONE cleared after %dmsec\n", i * 10);
+			e_dbg("ULP_CONFIG_DONE cleared after %d msec\n",
+			      i * 10);
 
 		if (force) {
 			mac_reg = er32(H2ME);
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 07/12] net/e1000e: Fix spelling mistake "The" -> "This"
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
                   ` (5 preceding siblings ...)
  2021-07-20 23:20 ` [PATCH net-next 06/12] e1000e: Add space to the debug print Tony Nguyen
@ 2021-07-20 23:20 ` Tony Nguyen
  2021-07-20 23:20 ` [PATCH net-next 08/12] igc: Check if num of q_vectors is smaller than max before array access Tony Nguyen
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:20 UTC (permalink / raw)
  To: davem, kuba
  Cc: Tree Davies, netdev, anthony.l.nguyen, sasha.neftin, vitaly.lifshits

From: Tree Davies <tdavies@darkphysics.net>

There is a spelling mistake in the comment block.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 152cacbc527e..3c22b509fa79 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -7729,7 +7729,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
  * @pdev: PCI device information struct
  *
  * e1000_remove is called by the PCI subsystem to alert the driver
- * that it should release a PCI device.  The could be caused by a
+ * that it should release a PCI device.  This could be caused by a
  * Hot-Plug event, or because the driver is going to be removed from
  * memory.
  **/
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 08/12] igc: Check if num of q_vectors is smaller than max before array access
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
                   ` (6 preceding siblings ...)
  2021-07-20 23:20 ` [PATCH net-next 07/12] net/e1000e: Fix spelling mistake "The" -> "This" Tony Nguyen
@ 2021-07-20 23:20 ` Tony Nguyen
  2021-07-20 23:20 ` [PATCH net-next 09/12] igc: Remove _I_PHY_ID checking Tony Nguyen
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:20 UTC (permalink / raw)
  To: davem, kuba
  Cc: Sasha Neftin, netdev, anthony.l.nguyen, vitaly.lifshits,
	Aleksandr Loktionov, Dvora Fuxbrumer

From: Sasha Neftin <sasha.neftin@intel.com>

Ensure that the adapter->q_vector[MAX_Q_VECTORS] array isn't accessed
beyond its size. It was fixed by using a local variable num_q_vectors
as a limit for loop index, and ensure that num_q_vectors is not bigger
than MAX_Q_VECTORS.

Suggested-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 11385c380947..f7cf97916390 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -5125,6 +5125,7 @@ static irqreturn_t igc_msix_ring(int irq, void *data)
  */
 static int igc_request_msix(struct igc_adapter *adapter)
 {
+	unsigned int num_q_vectors = adapter->num_q_vectors;
 	int i = 0, err = 0, vector = 0, free_vector = 0;
 	struct net_device *netdev = adapter->netdev;
 
@@ -5133,7 +5134,13 @@ static int igc_request_msix(struct igc_adapter *adapter)
 	if (err)
 		goto err_out;
 
-	for (i = 0; i < adapter->num_q_vectors; i++) {
+	if (num_q_vectors > MAX_Q_VECTORS) {
+		num_q_vectors = MAX_Q_VECTORS;
+		dev_warn(&adapter->pdev->dev,
+			 "The number of queue vectors (%d) is higher than max allowed (%d)\n",
+			 adapter->num_q_vectors, MAX_Q_VECTORS);
+	}
+	for (i = 0; i < num_q_vectors; i++) {
 		struct igc_q_vector *q_vector = adapter->q_vector[i];
 
 		vector++;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 09/12] igc: Remove _I_PHY_ID checking
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
                   ` (7 preceding siblings ...)
  2021-07-20 23:20 ` [PATCH net-next 08/12] igc: Check if num of q_vectors is smaller than max before array access Tony Nguyen
@ 2021-07-20 23:20 ` Tony Nguyen
  2021-07-21 14:50   ` Andrew Lunn
  2021-07-20 23:20 ` [PATCH net-next 10/12] igc: Remove phy->type checking Tony Nguyen
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:20 UTC (permalink / raw)
  To: davem, kuba
  Cc: Sasha Neftin, netdev, anthony.l.nguyen, vitaly.lifshits, Dvora Fuxbrumer

From: Sasha Neftin <sasha.neftin@intel.com>

i225 devices have only one PHY vendor. There is no point checking
_I_PHY_ID during the link establishment and auto-negotiation process.
This patch comes to clean up these pointless checkings.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_base.c | 10 +---------
 drivers/net/ethernet/intel/igc/igc_main.c |  3 +--
 drivers/net/ethernet/intel/igc/igc_phy.c  |  6 ++----
 3 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_base.c b/drivers/net/ethernet/intel/igc/igc_base.c
index d0700d48ecf9..84f142f5e472 100644
--- a/drivers/net/ethernet/intel/igc/igc_base.c
+++ b/drivers/net/ethernet/intel/igc/igc_base.c
@@ -187,15 +187,7 @@ static s32 igc_init_phy_params_base(struct igc_hw *hw)
 
 	igc_check_for_copper_link(hw);
 
-	/* Verify phy id and set remaining function pointers */
-	switch (phy->id) {
-	case I225_I_PHY_ID:
-		phy->type	= igc_phy_i225;
-		break;
-	default:
-		ret_val = -IGC_ERR_PHY;
-		goto out;
-	}
+	phy->type = igc_phy_i225;
 
 out:
 	return ret_val;
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index f7cf97916390..a5278a8f491f 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -5231,8 +5231,7 @@ bool igc_has_link(struct igc_adapter *adapter)
 		break;
 	}
 
-	if (hw->mac.type == igc_i225 &&
-	    hw->phy.id == I225_I_PHY_ID) {
+	if (hw->mac.type == igc_i225) {
 		if (!netif_carrier_ok(adapter->netdev)) {
 			adapter->flags &= ~IGC_FLAG_NEED_LINK_UPDATE;
 		} else if (!(adapter->flags & IGC_FLAG_NEED_LINK_UPDATE)) {
diff --git a/drivers/net/ethernet/intel/igc/igc_phy.c b/drivers/net/ethernet/intel/igc/igc_phy.c
index 83aeb5e7076f..5cad31c3c7b0 100644
--- a/drivers/net/ethernet/intel/igc/igc_phy.c
+++ b/drivers/net/ethernet/intel/igc/igc_phy.c
@@ -249,8 +249,7 @@ static s32 igc_phy_setup_autoneg(struct igc_hw *hw)
 			return ret_val;
 	}
 
-	if ((phy->autoneg_mask & ADVERTISE_2500_FULL) &&
-	    hw->phy.id == I225_I_PHY_ID) {
+	if (phy->autoneg_mask & ADVERTISE_2500_FULL) {
 		/* Read the MULTI GBT AN Control Register - reg 7.32 */
 		ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK <<
 					    MMD_DEVADDR_SHIFT) |
@@ -390,8 +389,7 @@ static s32 igc_phy_setup_autoneg(struct igc_hw *hw)
 		ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL,
 					     mii_1000t_ctrl_reg);
 
-	if ((phy->autoneg_mask & ADVERTISE_2500_FULL) &&
-	    hw->phy.id == I225_I_PHY_ID)
+	if (phy->autoneg_mask & ADVERTISE_2500_FULL)
 		ret_val = phy->ops.write_reg(hw,
 					     (STANDARD_AN_REG_MASK <<
 					     MMD_DEVADDR_SHIFT) |
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 10/12] igc: Remove phy->type checking
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
                   ` (8 preceding siblings ...)
  2021-07-20 23:20 ` [PATCH net-next 09/12] igc: Remove _I_PHY_ID checking Tony Nguyen
@ 2021-07-20 23:20 ` Tony Nguyen
  2021-07-20 23:21 ` [PATCH net-next 11/12] igc: Set QBVCYCLET_S to 0 for TSN Basic Scheduling Tony Nguyen
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:20 UTC (permalink / raw)
  To: davem, kuba
  Cc: Sasha Neftin, netdev, anthony.l.nguyen, vitaly.lifshits, Dvora Fuxbrumer

From: Sasha Neftin <sasha.neftin@intel.com>

i225 devices have only one phy->type: copper. There is no point checking
phy->type during the igc_has_link method from the watchdog that
invoked every 2 seconds.
This patch comes to clean up these pointless checkings.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index a5278a8f491f..31e489ed3f8d 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -5219,17 +5219,10 @@ bool igc_has_link(struct igc_adapter *adapter)
 	 * false until the igc_check_for_link establishes link
 	 * for copper adapters ONLY
 	 */
-	switch (hw->phy.media_type) {
-	case igc_media_type_copper:
-		if (!hw->mac.get_link_status)
-			return true;
-		hw->mac.ops.check_for_link(hw);
-		link_active = !hw->mac.get_link_status;
-		break;
-	default:
-	case igc_media_type_unknown:
-		break;
-	}
+	if (!hw->mac.get_link_status)
+		return true;
+	hw->mac.ops.check_for_link(hw);
+	link_active = !hw->mac.get_link_status;
 
 	if (hw->mac.type == igc_i225) {
 		if (!netif_carrier_ok(adapter->netdev)) {
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 11/12] igc: Set QBVCYCLET_S to 0 for TSN Basic Scheduling
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
                   ` (9 preceding siblings ...)
  2021-07-20 23:20 ` [PATCH net-next 10/12] igc: Remove phy->type checking Tony Nguyen
@ 2021-07-20 23:21 ` Tony Nguyen
  2021-07-20 23:21 ` [PATCH net-next 12/12] igc: Increase timeout value for Speed 100/1000/2500 Tony Nguyen
  2021-07-21  0:00 ` [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 patchwork-bot+netdevbpf
  12 siblings, 0 replies; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:21 UTC (permalink / raw)
  To: davem, kuba
  Cc: Muhammad Husaini Zulkifli, netdev, anthony.l.nguyen,
	sasha.neftin, vitaly.lifshits, Dvora Fuxbrumer

From: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>

According to datasheet section 8.12.19, when there's no TSN offloading
Shadow_QbvCycle bit[29:0] must be set to zero for basic scheduling.

Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c
index 174103c4bea6..4dbbb8a32ce9 100644
--- a/drivers/net/ethernet/intel/igc/igc_tsn.c
+++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
@@ -52,7 +52,7 @@ static int igc_tsn_disable_offload(struct igc_adapter *adapter)
 		wr32(IGC_ENDQT(i), NSEC_PER_SEC);
 	}
 
-	wr32(IGC_QBVCYCLET_S, NSEC_PER_SEC);
+	wr32(IGC_QBVCYCLET_S, 0);
 	wr32(IGC_QBVCYCLET, NSEC_PER_SEC);
 
 	adapter->flags &= ~IGC_FLAG_TSN_QBV_ENABLED;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 12/12] igc: Increase timeout value for Speed 100/1000/2500
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
                   ` (10 preceding siblings ...)
  2021-07-20 23:21 ` [PATCH net-next 11/12] igc: Set QBVCYCLET_S to 0 for TSN Basic Scheduling Tony Nguyen
@ 2021-07-20 23:21 ` Tony Nguyen
  2021-07-21  0:00 ` [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 patchwork-bot+netdevbpf
  12 siblings, 0 replies; 18+ messages in thread
From: Tony Nguyen @ 2021-07-20 23:21 UTC (permalink / raw)
  To: davem, kuba
  Cc: Muhammad Husaini Zulkifli, netdev, anthony.l.nguyen,
	sasha.neftin, vitaly.lifshits, Dvora Fuxbrumer

From: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>

As the cycle time is set to maximum of 1s, the TX Hang timeout need to
be increase to avoid possible TX Hang.

There is no dedicated number specific in data sheet for the timeout factor.
Timeout factor was determined during the debugging to solve the "Tx Hang"
issues that happen in some cases mainly during ETF(Earliest TxTime First).

This can be test by using TSN Schedule Tx Tools udp_tai sample application.

Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Acked-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 31e489ed3f8d..5c95bf82eaf7 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -5312,7 +5312,9 @@ static void igc_watchdog_task(struct work_struct *work)
 				adapter->tx_timeout_factor = 14;
 				break;
 			case SPEED_100:
-				/* maybe add some timeout factor ? */
+			case SPEED_1000:
+			case SPEED_2500:
+				adapter->tx_timeout_factor = 7;
 				break;
 			}
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20
  2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
                   ` (11 preceding siblings ...)
  2021-07-20 23:21 ` [PATCH net-next 12/12] igc: Increase timeout value for Speed 100/1000/2500 Tony Nguyen
@ 2021-07-21  0:00 ` patchwork-bot+netdevbpf
  12 siblings, 0 replies; 18+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-21  0:00 UTC (permalink / raw)
  To: Tony Nguyen; +Cc: davem, kuba, netdev, sasha.neftin, vitaly.lifshits

Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Tue, 20 Jul 2021 16:20:49 -0700 you wrote:
> This series contains updates to e1000e and igc drivers.
> 
> Sasha adds initial S0ix support for devices with CSME and adds polling
> for exiting of DPG. He sets the PHY to low power idle when in S0ix. He
> also adds support for new device IDs for and adds a space to debug
> messaging to help with readability for e1000e.
> 
> [...]

Here is the summary with links:
  - [net-next,01/12] e1000e: Add handshake with the CSME to support S0ix
    https://git.kernel.org/netdev/net-next/c/3e55d231716e
  - [net-next,02/12] e1000e: Add polling mechanism to indicate CSME DPG exit
    https://git.kernel.org/netdev/net-next/c/ef407b86d3cc
  - [net-next,03/12] e1000e: Additional PHY power saving in S0ix
    https://git.kernel.org/netdev/net-next/c/3ad3e28cb203
  - [net-next,04/12] e1000e: Add support for Lunar Lake
    https://git.kernel.org/netdev/net-next/c/820b8ff653a1
  - [net-next,05/12] e1000e: Add support for the next LOM generation
    https://git.kernel.org/netdev/net-next/c/8e25c0a212de
  - [net-next,06/12] e1000e: Add space to the debug print
    https://git.kernel.org/netdev/net-next/c/ade4162e80f1
  - [net-next,07/12] net/e1000e: Fix spelling mistake "The" -> "This"
    https://git.kernel.org/netdev/net-next/c/e0bc64d31c98
  - [net-next,08/12] igc: Check if num of q_vectors is smaller than max before array access
    https://git.kernel.org/netdev/net-next/c/373e2829e7c2
  - [net-next,09/12] igc: Remove _I_PHY_ID checking
    https://git.kernel.org/netdev/net-next/c/7c496de538ee
  - [net-next,10/12] igc: Remove phy->type checking
    https://git.kernel.org/netdev/net-next/c/47bca7de6a4f
  - [net-next,11/12] igc: Set QBVCYCLET_S to 0 for TSN Basic Scheduling
    https://git.kernel.org/netdev/net-next/c/62f5bbfb2afd
  - [net-next,12/12] igc: Increase timeout value for Speed 100/1000/2500
    https://git.kernel.org/netdev/net-next/c/b27b8dc77b5e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next 09/12] igc: Remove _I_PHY_ID checking
  2021-07-20 23:20 ` [PATCH net-next 09/12] igc: Remove _I_PHY_ID checking Tony Nguyen
@ 2021-07-21 14:50   ` Andrew Lunn
  2021-07-21 18:02     ` Sasha Neftin
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew Lunn @ 2021-07-21 14:50 UTC (permalink / raw)
  To: Tony Nguyen
  Cc: davem, kuba, Sasha Neftin, netdev, vitaly.lifshits, Dvora Fuxbrumer

On Tue, Jul 20, 2021 at 04:20:58PM -0700, Tony Nguyen wrote:
> From: Sasha Neftin <sasha.neftin@intel.com>
> 
> i225 devices have only one PHY vendor. There is no point checking
> _I_PHY_ID during the link establishment and auto-negotiation process.
> This patch comes to clean up these pointless checkings.

I don't know this hardware....

Is the PHY integrated into the MAC? Or is it external?

For the ixgbe, the InPhi CS4227 is now owned by Marvell, and it is
very difficult to get any information from them. At some point, it
would be nice to have a second source, maybe a Microchip PHY. The bits
of code you are removing make it easier to see where changes would be
needed to add support for a second PHY. Why would you want to limit it
to just one vendor?

       Andrew

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next 09/12] igc: Remove _I_PHY_ID checking
  2021-07-21 14:50   ` Andrew Lunn
@ 2021-07-21 18:02     ` Sasha Neftin
  2021-07-21 19:53       ` Andrew Lunn
  0 siblings, 1 reply; 18+ messages in thread
From: Sasha Neftin @ 2021-07-21 18:02 UTC (permalink / raw)
  To: Andrew Lunn, Tony Nguyen
  Cc: davem, kuba, netdev, vitaly.lifshits, Dvora Fuxbrumer, Neftin, Sasha

On 7/21/2021 17:50, Andrew Lunn wrote:
> On Tue, Jul 20, 2021 at 04:20:58PM -0700, Tony Nguyen wrote:
>> From: Sasha Neftin <sasha.neftin@intel.com>
>>
>> i225 devices have only one PHY vendor. There is no point checking
>> _I_PHY_ID during the link establishment and auto-negotiation process.
>> This patch comes to clean up these pointless checkings.
> 
> I don't know this hardware....
> 
> Is the PHY integrated into the MAC? Or is it external?
i225 controller offers a fully-integrated Media Access Control
(MAC) and Physical Layer (PHY) port.
Both components (MAC and PHY) supports 2.5G
> 
> For the ixgbe, the InPhi CS4227 is now owned by Marvell, and it is
> very difficult to get any information from them. At some point, it
> would be nice to have a second source, maybe a Microchip PHY. The bits
> of code you are removing make it easier to see where changes would be
> needed to add support for a second PHY. Why would you want to limit it
> to just one vendor?
Not like that i210 devices. There is only one PHY ID/type for this 
product. Only one port. No fiber, no SFP - only copper. No option for a 
second PHY.
> 
>         Andrew
> 
Sasha Neftin

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next 09/12] igc: Remove _I_PHY_ID checking
  2021-07-21 18:02     ` Sasha Neftin
@ 2021-07-21 19:53       ` Andrew Lunn
  2021-07-22  5:22         ` Sasha Neftin
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew Lunn @ 2021-07-21 19:53 UTC (permalink / raw)
  To: Sasha Neftin
  Cc: Tony Nguyen, davem, kuba, netdev, vitaly.lifshits, Dvora Fuxbrumer

On Wed, Jul 21, 2021 at 09:02:13PM +0300, Sasha Neftin wrote:
> On 7/21/2021 17:50, Andrew Lunn wrote:
> > On Tue, Jul 20, 2021 at 04:20:58PM -0700, Tony Nguyen wrote:
> > > From: Sasha Neftin <sasha.neftin@intel.com>
> > > 
> > > i225 devices have only one PHY vendor. There is no point checking
> > > _I_PHY_ID during the link establishment and auto-negotiation process.
> > > This patch comes to clean up these pointless checkings.
> > 
> > I don't know this hardware....
> > 
> > Is the PHY integrated into the MAC? Or is it external?
> i225 controller offers a fully-integrated Media Access Control
> (MAC) and Physical Layer (PHY) port.
> Both components (MAC and PHY) supports 2.5G

Hi Sasha

Thanks for the info. Then this change make sense. But the commit
message could of been better. It is not really about there being one
PHY vendor, it is simply impossible for the PHY to be anything else,
so there is no need to check.

	Andrew

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next 09/12] igc: Remove _I_PHY_ID checking
  2021-07-21 19:53       ` Andrew Lunn
@ 2021-07-22  5:22         ` Sasha Neftin
  0 siblings, 0 replies; 18+ messages in thread
From: Sasha Neftin @ 2021-07-22  5:22 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Tony Nguyen, davem, kuba, netdev, vitaly.lifshits, Dvora Fuxbrumer

On 7/21/2021 22:53, Andrew Lunn wrote:
> On Wed, Jul 21, 2021 at 09:02:13PM +0300, Sasha Neftin wrote:
>> On 7/21/2021 17:50, Andrew Lunn wrote:
>>> On Tue, Jul 20, 2021 at 04:20:58PM -0700, Tony Nguyen wrote:
>>>> From: Sasha Neftin <sasha.neftin@intel.com>
>>>>
>>>> i225 devices have only one PHY vendor. There is no point checking
>>>> _I_PHY_ID during the link establishment and auto-negotiation process.
>>>> This patch comes to clean up these pointless checkings.
>>>
>>> I don't know this hardware....
>>>
>>> Is the PHY integrated into the MAC? Or is it external?
>> i225 controller offers a fully-integrated Media Access Control
>> (MAC) and Physical Layer (PHY) port.
>> Both components (MAC and PHY) supports 2.5G
> 
> Hi Sasha
> 
> Thanks for the info. Then this change make sense. But the commit
> message could of been better. It is not really about there being one
> PHY vendor, it is simply impossible for the PHY to be anything else,
> so there is no need to check.
We will clarify it in the commit message.
> 
> 	Andrew
> 
Sasha Neftin

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-07-22  5:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20 23:20 [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 Tony Nguyen
2021-07-20 23:20 ` [PATCH net-next 01/12] e1000e: Add handshake with the CSME to support S0ix Tony Nguyen
2021-07-20 23:20 ` [PATCH net-next 02/12] e1000e: Add polling mechanism to indicate CSME DPG exit Tony Nguyen
2021-07-20 23:20 ` [PATCH net-next 03/12] e1000e: Additional PHY power saving in S0ix Tony Nguyen
2021-07-20 23:20 ` [PATCH net-next 04/12] e1000e: Add support for Lunar Lake Tony Nguyen
2021-07-20 23:20 ` [PATCH net-next 05/12] e1000e: Add support for the next LOM generation Tony Nguyen
2021-07-20 23:20 ` [PATCH net-next 06/12] e1000e: Add space to the debug print Tony Nguyen
2021-07-20 23:20 ` [PATCH net-next 07/12] net/e1000e: Fix spelling mistake "The" -> "This" Tony Nguyen
2021-07-20 23:20 ` [PATCH net-next 08/12] igc: Check if num of q_vectors is smaller than max before array access Tony Nguyen
2021-07-20 23:20 ` [PATCH net-next 09/12] igc: Remove _I_PHY_ID checking Tony Nguyen
2021-07-21 14:50   ` Andrew Lunn
2021-07-21 18:02     ` Sasha Neftin
2021-07-21 19:53       ` Andrew Lunn
2021-07-22  5:22         ` Sasha Neftin
2021-07-20 23:20 ` [PATCH net-next 10/12] igc: Remove phy->type checking Tony Nguyen
2021-07-20 23:21 ` [PATCH net-next 11/12] igc: Set QBVCYCLET_S to 0 for TSN Basic Scheduling Tony Nguyen
2021-07-20 23:21 ` [PATCH net-next 12/12] igc: Increase timeout value for Speed 100/1000/2500 Tony Nguyen
2021-07-21  0:00 ` [PATCH net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2021-07-20 patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.