public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Berger <opendmb@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Wang, Xiaolei" <Xiaolei.Wang@windriver.com>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"bcm-kernel-feedback-list@broadcom.com" 
	<bcm-kernel-feedback-list@broadcom.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"richardcochran@gmail.com" <richardcochran@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: BCM54220: After the BCM54220 closes the auto-negotiation, the configuration forces the 1000M network port to be linked down all the time.
Date: Tue, 21 Feb 2023 13:51:55 -0800	[thread overview]
Message-ID: <af2a622f-033c-739a-858d-18c65f7afd17@gmail.com> (raw)
In-Reply-To: <33198e39-8c86-85db-76c2-c5ce18dee290@gmail.com>

On 2/21/2023 11:53 AM, Doug Berger wrote:
> On 2/21/2023 11:41 AM, Andrew Lunn wrote:
>> On Tue, Feb 21, 2023 at 10:44:44AM -0800, Doug Berger wrote:
>>> On 2/17/2023 12:06 AM, Wang, Xiaolei wrote:
>>>> hi
>>>>
>>>>       When I use the nxp-imx7 board, eth0 is connected to the PC, 
>>>> eth0 is turned off the auto-negotiation mode, and the configuration 
>>>> is forced to 10M, 100M, 1000M. When configured to force 1000M,
>>>>       The link status of phy status reg(0x1) is always 0, and the 
>>>> chip of phy is BCM54220, but I did not find the relevant datasheet 
>>>> on BCM official website, does anyone have any suggestions or the 
>>>> datasheet of BCM54220?
>>>>
>>>> thanks
>>>> xiaolei
>>>>
>>> It is my understanding that the 1000BASE-T PHY requires peers to take on
>>> asymmetric roles and that establishment of these roles requires 
>>> negotiation
>>> which occurs during auto-negotiation. Some PHYs may allow manual 
>>> programming
>>> of these roles, but it is not standardized and tools like ethtool do not
>>> support manual specification of such details.
>>
>> Are you talking about ethtool -s 
>> [master-slave|preferred-master|preferred-slave|forced-master|forced-slave]
>>
> I am, though I was not aware of their addition to ethtool and I avoided 
> referencing them by name out of an overabundance of political 
> correctness ;).
> 
> Thanks for bringing this to my attention.
> 
>> The broadcom PHYs call genphy_config_aneg() -> __genphy_config_aneg()
>> -> genphy_setup_master_slave() which should configure this, even when
>> auto-neg is off.
> Yes, this sounds good. Perhaps Xiaolei is not setting these properly 
> when forcing 1000.
> 
Hmmm. I just revisited 802.3-2018 40.5.2 MASTER-SLAVE configuration 
resolution and I see it contains this statement:
The MASTER-SLAVE relationship shall be determined
during Auto-Negotiation using Table 40–5 with the 1000BASE-T Technology 
Ability Next Page bit
values specified in Table 40–4 and information received from the link 
partner.

So it appears that the only normative behavior requires Auto-Negotiation 
to be enabled. It seems reasonable that an implementation might allow 
the forced-master and forced-slave configurations to be applied when 
Auto-Negotiation is not enabled, but this case is outside of the 
standard so an implementation could also fail to establish a link.

>>
>>      Andrew
> Thanks again!
>      Doug


      reply	other threads:[~2023-02-21 21:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <MW5PR11MB5764F9734ACFED2EF390DFF795A19@MW5PR11MB5764.namprd11.prod.outlook.com>
2023-02-17 17:13 ` BCM54220: After the BCM54220 closes the auto-negotiation, the configuration forces the 1000M network port to be linked down all the time Florian Fainelli
2023-02-21  8:04   ` wangxiaolei
2023-02-21 18:44 ` Doug Berger
2023-02-21 19:41   ` Andrew Lunn
2023-02-21 19:53     ` Doug Berger
2023-02-21 21:51       ` Doug Berger [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=af2a622f-033c-739a-858d-18c65f7afd17@gmail.com \
    --to=opendmb@gmail.com \
    --cc=Xiaolei.Wang@windriver.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.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=pabeni@redhat.com \
    --cc=richardcochran@gmail.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