* [PATCH 1/2] e1000e: add workaround for possible stalled packet
@ 2019-07-08 4:55 Kai-Heng Feng
2019-07-08 4:55 ` [PATCH 2/2] e1000e: disable force K1-off feature Kai-Heng Feng
2019-07-19 1:47 ` [Intel-wired-lan] [PATCH 1/2] e1000e: add workaround for possible stalled packet Brown, Aaron F
0 siblings, 2 replies; 4+ messages in thread
From: Kai-Heng Feng @ 2019-07-08 4:55 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: sasha.neftin, intel-wired-lan, netdev, linux-kernel, Kai-Heng Feng
Forwardport from http://mails.dpdk.org/archives/dev/2016-November/050657.html
This works around a possible stalled packet issue, which may occur due to
clock recovery from the PCH being too slow, when the LAN is transitioning
from K1 at 1G link speed.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204057
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
drivers/net/ethernet/intel/e1000e/ich8lan.c | 10 ++++++++++
drivers/net/ethernet/intel/e1000e/ich8lan.h | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 395b05701480..56f88a4e538c 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -1429,6 +1429,16 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
else
phy_reg |= 0xFA;
e1e_wphy_locked(hw, I217_PLL_CLOCK_GATE_REG, phy_reg);
+
+ if (speed == SPEED_1000) {
+ hw->phy.ops.read_reg_locked(hw, HV_PM_CTRL,
+ &phy_reg);
+
+ phy_reg |= HV_PM_CTRL_K1_CLK_REQ;
+
+ hw->phy.ops.write_reg_locked(hw, HV_PM_CTRL,
+ phy_reg);
+ }
}
hw->phy.ops.release(hw);
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.h b/drivers/net/ethernet/intel/e1000e/ich8lan.h
index eb09c755fa17..1502895eb45d 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.h
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.h
@@ -210,7 +210,7 @@
/* PHY Power Management Control */
#define HV_PM_CTRL PHY_REG(770, 17)
-#define HV_PM_CTRL_PLL_STOP_IN_K1_GIGA 0x100
+#define HV_PM_CTRL_K1_CLK_REQ 0x200
#define HV_PM_CTRL_K1_ENABLE 0x4000
#define I217_PLL_CLOCK_GATE_REG PHY_REG(772, 28)
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] e1000e: disable force K1-off feature
2019-07-08 4:55 [PATCH 1/2] e1000e: add workaround for possible stalled packet Kai-Heng Feng
@ 2019-07-08 4:55 ` Kai-Heng Feng
2019-07-19 1:47 ` [Intel-wired-lan] " Brown, Aaron F
2019-07-19 1:47 ` [Intel-wired-lan] [PATCH 1/2] e1000e: add workaround for possible stalled packet Brown, Aaron F
1 sibling, 1 reply; 4+ messages in thread
From: Kai-Heng Feng @ 2019-07-08 4:55 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: sasha.neftin, intel-wired-lan, netdev, linux-kernel, Kai-Heng Feng
Forwardport from http://mails.dpdk.org/archives/dev/2016-November/050658.html
MAC-PHY desync may occur causing misdetection of link up event.
Disabling K1-off feature can work around the problem.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204057
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
drivers/net/ethernet/intel/e1000e/hw.h | 1 +
drivers/net/ethernet/intel/e1000e/ich8lan.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h
index eff75bd8a8f0..e3c71fd093ee 100644
--- a/drivers/net/ethernet/intel/e1000e/hw.h
+++ b/drivers/net/ethernet/intel/e1000e/hw.h
@@ -662,6 +662,7 @@ struct e1000_dev_spec_ich8lan {
bool kmrn_lock_loss_workaround_enabled;
struct e1000_shadow_ram shadow_ram[E1000_ICH8_SHADOW_RAM_WORDS];
bool nvm_k1_enabled;
+ bool disable_k1_off;
bool eee_disable;
u16 eee_lp_ability;
enum e1000_ulp_state ulp_state;
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 56f88a4e538c..c1e0e03dc5cb 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -1538,6 +1538,9 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
fextnvm6 &= ~E1000_FEXTNVM6_K1_OFF_ENABLE;
}
+ if (hw->dev_spec.ich8lan.disable_k1_off == true)
+ fextnvm6 &= ~E1000_FEXTNVM6_K1_OFF_ENABLE;
+
ew32(FEXTNVM6, fextnvm6);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Intel-wired-lan] [PATCH 1/2] e1000e: add workaround for possible stalled packet
2019-07-08 4:55 [PATCH 1/2] e1000e: add workaround for possible stalled packet Kai-Heng Feng
2019-07-08 4:55 ` [PATCH 2/2] e1000e: disable force K1-off feature Kai-Heng Feng
@ 2019-07-19 1:47 ` Brown, Aaron F
1 sibling, 0 replies; 4+ messages in thread
From: Brown, Aaron F @ 2019-07-19 1:47 UTC (permalink / raw)
To: Kirsher, Jeffrey T, Kai-Heng Feng; +Cc: netdev, intel-wired-lan, linux-kernel
On Mon, 2019-07-08 at 12:55 +0800, Kai-Heng Feng wrote:
> Forwardport from http://mails.dpdk.org/archives/dev/2016-November/050657.html
>
> This works around a possible stalled packet issue, which may occur due to
> clock recovery from the PCH being too slow, when the LAN is transitioning
> from K1 at 1G link speed.
>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204057
>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> drivers/net/ethernet/intel/e1000e/ich8lan.c | 10 ++++++++++
> drivers/net/ethernet/intel/e1000e/ich8lan.h | 2 +-
> 2 files changed, 11 insertions(+), 1 deletion(-)
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Intel-wired-lan] [PATCH 2/2] e1000e: disable force K1-off feature
2019-07-08 4:55 ` [PATCH 2/2] e1000e: disable force K1-off feature Kai-Heng Feng
@ 2019-07-19 1:47 ` Brown, Aaron F
0 siblings, 0 replies; 4+ messages in thread
From: Brown, Aaron F @ 2019-07-19 1:47 UTC (permalink / raw)
To: Kirsher, Jeffrey T, Kai-Heng Feng; +Cc: netdev, intel-wired-lan, linux-kernel
On Mon, 2019-07-08 at 12:55 +0800, Kai-Heng Feng wrote:
> Forwardport from http://mails.dpdk.org/archives/dev/2016-November/050658.html
>
> MAC-PHY desync may occur causing misdetection of link up event.
> Disabling K1-off feature can work around the problem.
>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204057
>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> drivers/net/ethernet/intel/e1000e/hw.h | 1 +
> drivers/net/ethernet/intel/e1000e/ich8lan.c | 3 +++
> 2 files changed, 4 insertions(+)
>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-19 1:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 4:55 [PATCH 1/2] e1000e: add workaround for possible stalled packet Kai-Heng Feng
2019-07-08 4:55 ` [PATCH 2/2] e1000e: disable force K1-off feature Kai-Heng Feng
2019-07-19 1:47 ` [Intel-wired-lan] " Brown, Aaron F
2019-07-19 1:47 ` [Intel-wired-lan] [PATCH 1/2] e1000e: add workaround for possible stalled packet Brown, Aaron F
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).