All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias Waldekranz <tobias@waldekranz.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: davem@davemloft.net, kuba@kernel.org, andrew@lunn.ch,
	f.fainelli@gmail.com, olteanv@gmail.com, netdev@vger.kernel.org,
	chris.packham@alliedtelesis.co.nz, pabeni@redhat.com,
	marek.behun@nic.cz
Subject: Re: [PATCH v2 net 3/4] net: dsa: mv88e6xxx: Never force link on in-band managed MACs
Date: Thu, 02 Jan 2025 14:06:32 +0100	[thread overview]
Message-ID: <87zfk974br.fsf@waldekranz.com> (raw)
In-Reply-To: <Z3ZrH9yqtvu2-W7f@shell.armlinux.org.uk>

On tor, jan 02, 2025 at 10:31, "Russell King (Oracle)" <linux@armlinux.org.uk> wrote:
> On Thu, Dec 19, 2024 at 01:30:42PM +0100, Tobias Waldekranz wrote:
>> NOTE: This issue was addressed in the referenced commit, but a
>> conservative approach was chosen, where only 6095, 6097 and 6185 got
>> the fix.
>> 
>> Before the referenced commit, in the following setup, when the PHY
>> detected loss of link on the MDI, mv88e6xxx would force the MAC
>> down. If the MDI-side link was then re-established later on, there was
>> no longer any MII link over which the PHY could communicate that
>> information back to the MAC.
>> 
>>         .-SGMII/USXGMII
>>         |
>> .-----. v .-----.   .--------------.
>> | MAC +---+ PHY +---+ MDI (Cu/SFP) |
>> '-----'   '-----'   '--------------'
>> 
>> Since this a generic problem on all MACs connected to a SERDES - which
>> is the only time when in-band-status is used - move all chips to a
>> common mv88e6xxx_port_sync_link() implementation which avoids forcing
>> links on _all_ in-band managed ports.
>> 
>> Fixes: 4efe76629036 ("net: dsa: mv88e6xxx: Don't force link when using in-band-status")
>> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
>
> I'm feeling uneasy about this change.
>
> The history of the patch you refer to is - original v1:
>
> https://lore.kernel.org/r/20201013021858.20530-2-chris.packham@alliedtelesis.co.nz
>
> When v3 was submitted, it was unchanged:
>
> https://lore.kernel.org/r/20201020034558.19438-2-chris.packham@alliedtelesis.co.nz
>
> Both of these applied the in-band-status thing to all Marvell DSA
> switches, but as Marek states here:
>
> https://lore.kernel.org/r/20201020165115.3ecfd601@nic.cz

Thanks for that context!

> doing so breaks last least one Marvell DSA switch (88E6390). Hence why
> this approach is taken, rather than not forcing the link status on all
> DSA switches.
>
> Your patch appears to be reverting us back to what was effectively in
> Chris' v1 patch from back then, so I don't think we can accept this
> change. Sorry.

Before I abandon this broader fix, maybe you can help me understand
something:

If a user explicitly selects `managed = "in-band-status"`, why would we
ever interpret that as "let's force the MAC's settings according to what
the PHY says"? Is that not what `managed = "auto"` is for?

Could Marek's issue not stem from the fact that his DT stated that the
MAC would pick up the link information in-band, when in fact it was
unable to do so?

Looking at the functional spec for the 6390, it only seems to support
in-band-status when SGMII is used. So would it not be more accurate to
require `managed = "auto"` on boards with 6390 SERDES lanes connected to
an SFP cage, if hot-swap support between SGMII/1000BASE-X/2500BASE-X
transceivers is needed?

I.e. users requiring maximum flexibility can still have it, while
someone with a fixed connection to an SGMII PHY can still get the
benefit of using in-band signaling.

  reply	other threads:[~2025-01-02 13:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-19 12:30 [PATCH v2 net 0/4] net: dsa: mv88e6xxx: Amethyst (6393X) fixes Tobias Waldekranz
2024-12-19 12:30 ` [PATCH v2 net 1/4] net: dsa: mv88e6xxx: Improve I/O related error logging Tobias Waldekranz
2024-12-19 13:41   ` Andrew Lunn
2024-12-19 14:32   ` Vladimir Oltean
2024-12-19 12:30 ` [PATCH v2 net 2/4] net: dsa: mv88e6xxx: Give chips more time to activate their PPUs Tobias Waldekranz
2024-12-19 13:41   ` Andrew Lunn
2024-12-19 12:30 ` [PATCH v2 net 3/4] net: dsa: mv88e6xxx: Never force link on in-band managed MACs Tobias Waldekranz
2024-12-19 13:43   ` Andrew Lunn
2025-01-02 10:31   ` Russell King (Oracle)
2025-01-02 13:06     ` Tobias Waldekranz [this message]
2025-01-02 17:08       ` Russell King (Oracle)
2025-01-04 21:37         ` Tobias Waldekranz
2025-01-04 22:09           ` Russell King (Oracle)
2025-01-04 23:16             ` Tobias Waldekranz
2025-01-05 10:41               ` Russell King (Oracle)
2025-01-05 23:30                 ` Tobias Waldekranz
2025-01-06  8:20                   ` Russell King (Oracle)
2025-01-06 14:39                     ` Tobias Waldekranz
2024-12-19 12:30 ` [PATCH v2 net 4/4] net: dsa: mv88e6xxx: Limit rsvd2cpu policy to user ports on 6393X Tobias Waldekranz
2024-12-19 13:44   ` Andrew Lunn
2024-12-19 14:05   ` Vladimir Oltean
2024-12-19 14:14     ` Vladimir Oltean
2024-12-19 14:34     ` Tobias Waldekranz
2024-12-19 14:42       ` Vladimir Oltean
2024-12-19 14:52         ` Vladimir Oltean
2024-12-19 15:02           ` Tobias Waldekranz
2024-12-19 14:29   ` Vladimir Oltean

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=87zfk974br.fsf@waldekranz.com \
    --to=tobias@waldekranz.com \
    --cc=andrew@lunn.ch \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marek.behun@nic.cz \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.