netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Wong Vee Khee <vee.khee.wong@linux.intel.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC net-next 1/2] net: phy: allow mdio bus to probe for c45 devices before c22
Date: Tue, 25 May 2021 09:31:17 +0100	[thread overview]
Message-ID: <20210525083117.GC30436@shell.armlinux.org.uk> (raw)
In-Reply-To: <20210525055839.22496-1-vee.khee.wong@linux.intel.com>

On Tue, May 25, 2021 at 01:58:39PM +0800, Wong Vee Khee wrote:
> Some MAC controllers that is able to pair with  external PHY devices
> such as the Synopsys MAC Controller (STMMAC) support both Clause-22 and
> Clause-45 access.
> 
> When paired with PHY devices that only accessible via Clause-45, such as
> the Marvell 88E2110, any attempts to access the PHY devices via
> Clause-22 will get a PHY ID of all zeroes.
> 
> To fix this, we introduce MDIOBUS_C45_C22 which the MAC controller will
> try with Clause-45 access before going to Clause-22.
> 
> Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
> ---
>  include/linux/phy.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 60d2b26026a2..9b0e2c76e19b 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -368,6 +368,7 @@ struct mii_bus {
>  		MDIOBUS_C22,
>  		MDIOBUS_C45,
>  		MDIOBUS_C22_C45,
> +		MDIOBUS_C45_C22,
>  	} probe_capabilities;
>  
>  	/** @shared_lock: protect access to the shared element */

The new definition doesn't seem to be used anywhere, so this patch
merely adds the definition. It doesn't do what it says in the subject
line. Any driver that sets the capabilities to MDIOBUS_C45_C22 will
end up not doing any probing of the PHY.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2021-05-25  8:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25  5:58 [RFC net-next 1/2] net: phy: allow mdio bus to probe for c45 devices before c22 Wong Vee Khee
2021-05-25  8:31 ` Russell King (Oracle) [this message]
2021-06-01 10:52   ` Wong Vee Khee

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=20210525083117.GC30436@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vee.khee.wong@linux.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 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).