Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Joseph Telaak" <joseph@telaak.dev>
Cc: intel-wired-lan@lists.osuosl.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH iwl-next 3/4] e1000: attach a CE4100 PHY through phylink
Date: Wed, 02 Dec 2026 07:21:52 +0000	[thread overview]
Message-ID: <sashiko-outbox-245055@kernel.org> (raw)
In-Reply-To: <20261201-e1000-phylink-v1-3-21e6f1c816a0@telaak.dev>

Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] e1000: ad-hoc spinlock via __E1000_RESETTING flag in
  e1000_reinit_locked() [1]
--

commit da0da53a09c5ef0583118763d6a533519b6d4ad7
Author: Joseph Telaak <joseph@telaak.dev>

e1000: attach a CE4100 PHY through phylink

This commit registers the CE4100 MAC's MDIO bus when the device's OF node
has a phy-handle property and connects the PHY through phylink on open.

> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
> index 2343252b89fa6..60ccfce3c8895 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c

[ ... ]

> @@ -1625,8 +1712,10 @@ int e1000_close(struct net_device *netdev)
>  	set_bit(__E1000_DOWN, &adapter->flags);
>  	clear_bit(__E1000_RESETTING, &adapter->flags);
>  
> -	if (adapter->phylink)
> +	if (adapter->phylink) {
>  		phylink_stop(adapter->phylink);
> +		phylink_disconnect_phy(adapter->phylink);
> +	}
>  
>  	e1000_down(adapter);
>  	e1000_power_down_phy(adapter);

[Severity: High]
This problem wasn't introduced by this patch, but e1000_close() and
e1000_reinit_locked() serialize concurrent reset and administrative paths
using an open-coded lock on __E1000_RESETTING in adapter->flags [1]:

drivers/net/ethernet/intel/e1000/e1000_main.c:e1000_reinit_locked() {
	while (test_and_set_bit(__E1000_RESETTING, &adapter->flags))
		msleep(1);
    ...
	clear_bit(__E1000_RESETTING, &adapter->flags);
}

Spinning with test_and_set_bit() and sleep calls bypasses lockdep and
scheduler tracking, which can hide lock ordering inversions and cause
priority inversion when multiple tasks contend for adapter resets. Could
this use a mutex instead?

[1] https://sashiko.dev/#/bug/linux-6ec4586c-3f46-44f1-86b8-f8ee2578cebf

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261201-e1000-phylink-v1-0-21e6f1c816a0@telaak.dev?part=3

  parent reply	other threads:[~2026-12-02  7:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  7:21 [PATCH iwl-next 0/4] e1000: phylink for the Intel CE4100 GbE Joseph Telaak
2026-12-01  7:21 ` [PATCH iwl-next 1/4] dt-bindings: net: add " Joseph Telaak
2026-12-01 13:16   ` Andrew Lunn
2026-12-01 21:27     ` Joseph Telaak
2026-12-02  7:21   ` sashiko-bot
2026-12-01  7:21 ` [PATCH iwl-next 2/4] e1000: use phylink for a CE4100 fixed link Joseph Telaak
2026-12-01  8:58   ` Maxime Chevallier
2026-12-01  9:20     ` Joseph Telaak
2026-12-02  7:21   ` sashiko-bot
2026-12-02  8:03     ` Joseph Telaak
2026-12-01  7:21 ` [PATCH iwl-next 3/4] e1000: attach a CE4100 PHY through phylink Joseph Telaak
2026-12-01  9:02   ` Maxime Chevallier
2026-12-01  9:32     ` Joseph Telaak
2026-12-01 22:16       ` Andrew Lunn
2026-12-02  7:21   ` sashiko-bot [this message]
2026-12-01  7:21 ` [PATCH iwl-next 4/4] e1000: disable EEE on a CE4100 PHY under phylink Joseph Telaak
2026-12-01  9:04   ` Maxime Chevallier
2026-12-01  9:24     ` Joseph Telaak
2026-12-01  9:42       ` Maxime Chevallier

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=sashiko-outbox-245055@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=joseph@telaak.dev \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox