From: Vladimir Oltean <olteanv@gmail.com>
To: Tristram.Ha@microchip.com
Cc: linux@armlinux.org.uk, andrew@lunn.ch, davem@davemloft.net,
edumazet@google.com, hkallweit1@gmail.com, kuba@kernel.org,
netdev@vger.kernel.org, pabeni@redhat.com,
UNGLinuxDriver@microchip.com, Woojung.Huh@microchip.com
Subject: Re: [PATCH RFC net-next 0/4] net: xpcs: cleanups and partial support for KSZ9477
Date: Mon, 31 Mar 2025 17:31:13 +0300 [thread overview]
Message-ID: <20250331143113.r6t5we52wp77qqjr@skbuf> (raw)
In-Reply-To: <DM3PR11MB8736D45A311DA7C448825BABECDE2@DM3PR11MB8736.namprd11.prod.outlook.com> <DM3PR11MB8736D45A311DA7C448825BABECDE2@DM3PR11MB8736.namprd11.prod.outlook.com>
Hi Tristram,
On Tue, Mar 18, 2025 at 07:59:07PM +0000, Tristram.Ha@microchip.com wrote:
> Sorry for the long delay. After discussing with the Microchip design
> team we come up with this explanation for setting the
> DW_VR_MII_TX_CONFIG_PHY_SIDE_SGMII (bit 3) of DW_VR_MII_AN_CTRL (0x8001)
> register in 1000Base-X mode to make it work with AN on.
>
> KSZ9477 has the older version of 1000Base-X Synopsys IP which works in
> 1000Base-X mode without AN.
I was unaware of the existence of such Synopsys IP. In which relevant
way is it "older"? Does it specifically claim it supports 1000Base-X,
but only without AN? Or if not, is it an SGMII-only base IP, then? The
two are compatible when AN is disabled and the SGMII IP is configured
for 1Gbps, and can be mistaken for one another.
You're making it sound as if "1000Base-X" support was patched by the
Microchip integration over a base PCS IP which did not support it.
> When AN is on the port does not pass traffic because it does not
> detect a link.
Which port does not detect a link? The KSZ9477 port or its link partner?
> Setting DW_VR_MII_TX_CONFIG_PHY_SIDE_SGMII allows the link to be
> turned on by either setting DW_VR_MII_SGMII_LINK_STS (bit 4) or
> DW_VR_MII_DIG_CTRL1_PHY_MODE_CTRL (bit 0) in DW_VR_MII_DIG_CTRL1
> (0x8000) register. After that the port can pass traffic.
Can you comment on whether Microchip has given these bits some
integration-specific meaning, or whether their meaning from the base IP,
summarized by me in this table taken from the XPCS data book, has been
preserved unchanged?
https://lore.kernel.org/netdev/20250128152324.3p2ccnxoz5xta7ct@skbuf/
So far, the only noted fact is that they take effect also for
PCS_MODE=0b00 (1000Base-X), and not just for PCS_MODE=0b10 (SGMII),
as originally intended in the base IP. But we don't exactly know what
they do. Just that the Microchip IP wants them set to one.
If their meaning is otherwise the same, all data available to me points
to the conclusion that the "1000Base-X with autoneg on" mode in KSZ9477
is actually SGMII with a config word customized by software, and with
some conditions commented out from the base IP, to allow the code word
to be customizable even in PCS_MODE=0b00.
If the above conclusion is true, I think we need to pay more attention
at whether the transmitted config word is truly 1000Base-X compatible,
as Russell pointed out here:
https://lore.kernel.org/netdev/Z5iiXWkhm2OvbjOx@shell.armlinux.org.uk/#t
The discussion there got pretty involved and branched out into other
topics, but I couldn't find a response from you on that specific second
paragraph.
> This is still a specific KSZ9477 problem so it may be safer to put this
> code under "if (xpcs->info.pma == MICROCHIP_KSZ9477_PMD_ID)" check.
If the meaning of these fields was not kept 100% intact by Microchip
during their integration, including the context in which they are valid,
then I 100% agree. But I would still like an answer to the questions above.
next prev parent reply other threads:[~2025-03-31 14:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 13:27 [PATCH RFC net-next 0/4] net: xpcs: cleanups and partial support for KSZ9477 Russell King (Oracle)
2025-02-05 13:27 ` [PATCH RFC net-next 1/4] net: xpcs: add support for configuring width of 10/100M MII connection Russell King (Oracle)
2025-02-07 18:45 ` Tristram.Ha
2025-02-05 13:27 ` [PATCH RFC net-next 2/4] net: xpcs: add SGMII mode setting Russell King (Oracle)
2025-02-07 18:46 ` Tristram.Ha
2025-02-05 13:27 ` [PATCH RFC net-next 3/4] net: xpcs: add SGMII MAC manual update mode Russell King (Oracle)
2025-02-07 18:46 ` Tristram.Ha
2025-02-05 13:27 ` [PATCH RFC net-next 4/4] net: xpcs: allow 1000BASE-X to work with older XPCS IP Russell King (Oracle)
2025-02-07 18:47 ` Tristram.Ha
2025-02-10 11:05 ` Vladimir Oltean
2025-02-10 11:49 ` Russell King (Oracle)
2025-02-10 12:02 ` Vladimir Oltean
2025-02-08 12:01 ` [PATCH RFC net-next 0/4] net: xpcs: cleanups and partial support for KSZ9477 Russell King (Oracle)
2025-03-18 19:59 ` Tristram.Ha
2025-03-31 14:31 ` Vladimir Oltean [this message]
2025-04-12 0:18 ` Tristram.Ha
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=20250331143113.r6t5we52wp77qqjr@skbuf \
--to=olteanv@gmail.com \
--cc=Tristram.Ha@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--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