From: "Ruinskiy, Dima" <dima.ruinskiy@intel.com>
To: "Lifshits, Vitaly" <vitaly.lifshits@intel.com>,
"intel-wired-lan@osuosl.org" <intel-wired-lan@osuosl.org>
Cc: "Neftin, Sasha" <sasha.neftin@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v1 1/1] e1000e: change usleep_range to udelay in PHY mdic access
Date: Wed, 24 Apr 2024 09:50:19 +0300 [thread overview]
Message-ID: <c48225ba-e059-401a-2591-bd2cf55a014d@intel.com> (raw)
In-Reply-To: <20240417190320.3159360-1-vitaly.lifshits@intel.com>
On 17/04/2024 22:03, Lifshits, Vitaly wrote:
> This is a partial revert of commit 6dbdd4de0362 ("e1000e: Workaround
> for sporadic MDI error on Meteor Lake systems"). The referenced commit
> introduced an issue on vPro systems, where disconnecting and reconnecting
> the LAN cable might result in a kernel panic.
>
> This was root caused to the usage of usleep_range in an atomic content
> while trying to access the PHY. Change back the usleep_range calls to
> udelay.
>
> Fixes: 6dbdd4de0362 ("e1000e: Workaround for sporadic MDI error on Meteor Lake systems")
> Co-developed-by: Sasha Neftin <sasha.neftin@intel.com>
> Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
> Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
> ---
> drivers/net/ethernet/intel/e1000e/phy.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c
> index 93544f1cc2a5..f7ae0e0aa4a4 100644
> --- a/drivers/net/ethernet/intel/e1000e/phy.c
> +++ b/drivers/net/ethernet/intel/e1000e/phy.c
> @@ -157,7 +157,7 @@ s32 e1000e_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data)
> * the lower time out
> */
> for (i = 0; i < (E1000_GEN_POLL_TIMEOUT * 3); i++) {
> - usleep_range(50, 60);
> + udelay(50);
> mdic = er32(MDIC);
> if (mdic & E1000_MDIC_READY)
> break;
> @@ -181,7 +181,7 @@ s32 e1000e_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data)
> * reading duplicate data in the next MDIC transaction.
> */
> if (hw->mac.type == e1000_pch2lan)
> - usleep_range(100, 150);
> + udelay(100);
>
> if (success) {
> *data = (u16)mdic;
> @@ -237,7 +237,7 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data)
> * the lower time out
> */
> for (i = 0; i < (E1000_GEN_POLL_TIMEOUT * 3); i++) {
> - usleep_range(50, 60);
> + udelay(50);
> mdic = er32(MDIC);
> if (mdic & E1000_MDIC_READY)
> break;
> @@ -261,7 +261,7 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data)
> * reading duplicate data in the next MDIC transaction.
> */
> if (hw->mac.type == e1000_pch2lan)
> - usleep_range(100, 150);
> + udelay(100);
>
> if (success)
> return 0;
> --
> 2.34.1
>
Tested-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
next prev parent reply other threads:[~2024-04-24 6:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 19:03 [Intel-wired-lan] [PATCH iwl-net v1 1/1] e1000e: change usleep_range to udelay in PHY mdic access Vitaly Lifshits
2024-04-24 6:50 ` Ruinskiy, Dima [this message]
2024-04-24 8:30 ` Paul Menzel
2024-04-26 6:25 ` Linux regression tracking (Thorsten Leemhuis)
2024-04-26 6:25 ` Linux regression tracking (Thorsten Leemhuis)
2024-04-30 7:45 ` Jiri Slaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c48225ba-e059-401a-2591-bd2cf55a014d@intel.com \
--to=dima.ruinskiy@intel.com \
--cc=intel-wired-lan@osuosl.org \
--cc=sasha.neftin@intel.com \
--cc=vitaly.lifshits@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.