public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, opendmb@gmail.com,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net: phy: Warn about incorrect mdio_bus_phy_resume() state
Date: Thu, 22 Sep 2022 08:29:34 -0700	[thread overview]
Message-ID: <26ef199c-cf45-57b5-70cc-9ee42879d96e@gmail.com> (raw)
In-Reply-To: <20220922053113.250dc095@kernel.org>



On 9/22/2022 5:31 AM, Jakub Kicinski wrote:
> On Mon,  1 Aug 2022 16:34:03 -0700 Florian Fainelli wrote:
>> Calling mdio_bus_phy_resume() with neither the PHY state machine set to
>> PHY_HALTED nor phydev->mac_managed_pm set to true is a good indication
>> that we can produce a race condition looking like this:
>>
>> CPU0						CPU1
>> bcmgenet_resume
>>   -> phy_resume
>>     -> phy_init_hw
>>   -> phy_start
>>     -> phy_resume
>>                                                  phy_start_aneg()
>> mdio_bus_phy_resume
>>   -> phy_resume
>>      -> phy_write(..., BMCR_RESET)
>>       -> usleep()                                  -> phy_read()
>>
>> with the phy_resume() function triggering a PHY behavior that might have
>> to be worked around with (see bf8bfc4336f7 ("net: phy: broadcom: Fix
>> brcm_fet_config_init()") for instance) that ultimately leads to an error
>> reading from the PHY.
> 
> Hi Florian! There were some follow ups on this one, were all the known
> reports covered at this point or there are still platforms to tweak?

This is the only active thread that I am aware of, and Lukas and I are 
in agreement as to what to do next:

https://lore.kernel.org/all/20220918191333.GA2107@wunner.de/

expect him to submit a follow on the warning condition to deal with the 
smsc95xx USB driver.

Thanks!
-- 
Florian

      reply	other threads:[~2022-09-22 15:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220812111948eucas1p2bf97e7f4558eb024f419346367a87b45@eucas1p2.samsung.com>
2022-08-01 23:34 ` [PATCH net] net: phy: Warn about incorrect mdio_bus_phy_resume() state Florian Fainelli
2022-08-04  2:40   ` patchwork-bot+netdevbpf
2022-08-12 11:19   ` Marek Szyprowski
2022-08-12 16:32     ` Florian Fainelli
2022-08-16 11:18       ` Marek Szyprowski
2022-08-16 13:20       ` Geert Uytterhoeven
2022-08-17  2:28         ` Florian Fainelli
2022-08-17  9:18           ` Geert Uytterhoeven
2022-08-17 11:32             ` Marek Szyprowski
2022-09-19 14:51         ` Geert Uytterhoeven
2022-09-22 12:31   ` Jakub Kicinski
2022-09-22 15:29     ` Florian Fainelli [this message]

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=26ef199c-cf45-57b5-70cc-9ee42879d96e@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=opendmb@gmail.com \
    --cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox