public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Cc: nicolas.ferre@microchip.com, claudiu.beznea@microchip.com,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, hkallweit1@gmail.com, linux@armlinux.org.uk,
	gregkh@linuxfoundation.org, rafael@kernel.org,
	saravanak@google.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, git@amd.com
Subject: Re: [PATCH net-next v2] net: macb: In shared MDIO usecase make MDIO producer ethernet node to probe first
Date: Fri, 1 Jul 2022 11:13:40 +0200	[thread overview]
Message-ID: <Yr66xEMB/ORr0Xcp@lunn.ch> (raw)
In-Reply-To: <1656618906-29881-1-git-send-email-radhey.shyam.pandey@amd.com>

On Fri, Jul 01, 2022 at 01:25:06AM +0530, Radhey Shyam Pandey wrote:
> In shared MDIO suspend/resume usecase for ex. with MDIO producer
> (0xff0c0000) eth1 and MDIO consumer(0xff0b0000) eth0 there is a
> constraint that ethernet interface(ff0c0000) MDIO bus producer
> has to be resumed before the consumer ethernet interface(ff0b0000).
> 
> However above constraint is not met when GEM0(ff0b0000) is resumed first.
> There is phy_error on GEM0 and interface becomes non-functional on resume.
> 
> suspend:
> [ 46.477795] macb ff0c0000.ethernet eth1: Link is Down
> [ 46.483058] macb ff0c0000.ethernet: gem-ptp-timer ptp clock unregistered.
> [ 46.490097] macb ff0b0000.ethernet eth0: Link is Down
> [ 46.495298] macb ff0b0000.ethernet: gem-ptp-timer ptp clock unregistered.
> 
> resume:
> [ 46.633840] macb ff0b0000.ethernet eth0: configuring for phy/sgmii link mode
> macb_mdio_read -> pm_runtime_get_sync(GEM1) it return -EACCES error.
> 
> The suspend/resume is dependent on probe order so to fix this dependency
> ensure that MDIO producer ethernet node is always probed first followed
> by MDIO consumer ethernet node.
> 
> During MDIO registration find out if MDIO bus is shared and check if MDIO
> producer platform node(traverse by 'phy-handle' property) is bound. If not
> bound then defer the MDIO consumer ethernet node probe. Doing it ensures
> that in suspend/resume MDIO producer is resumed followed by MDIO consumer
> ethernet node.

I don't think there is anything specific to MACB here. There are
Freescale boards which have an MDIO bus shared by two interfaces etc.

Please try to solve this in a generic way, not specific to one MAC and
MDIO combination.

     Andrew

  reply	other threads:[~2022-07-01  9:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 19:55 [PATCH net-next v2] net: macb: In shared MDIO usecase make MDIO producer ethernet node to probe first Radhey Shyam Pandey
2022-07-01  9:13 ` Andrew Lunn [this message]
2022-07-05 18:49   ` Pandey, Radhey Shyam
2022-07-05 18:57     ` Saravana Kannan
2022-07-05 19:48       ` Andrew Lunn
2022-07-15 19:06         ` Saravana Kannan
2022-07-15 19:00       ` Pandey, Radhey Shyam
2022-07-15 19:08         ` Saravana Kannan
2022-07-27 18:52           ` Pandey, Radhey Shyam
2022-07-05 18:57     ` Andrew Lunn

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=Yr66xEMB/ORr0Xcp@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=claudiu.beznea@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=git@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --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=nicolas.ferre@microchip.com \
    --cc=pabeni@redhat.com \
    --cc=radhey.shyam.pandey@amd.com \
    --cc=rafael@kernel.org \
    --cc=saravanak@google.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