From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org,
UNGLinuxDriver@microchip.com, p.zabel@pengutronix.de,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 3/6] net: lan966x: add port module support
Date: Wed, 24 Nov 2021 16:04:33 +0000 [thread overview]
Message-ID: <YZ5ikamCVeyGFw3x@shell.armlinux.org.uk> (raw)
In-Reply-To: <20211124154323.44liimrwzthsh547@soft-dev3-1.localhost>
On Wed, Nov 24, 2021 at 04:43:23PM +0100, Horatiu Vultur wrote:
> > > Actually, port->config.phy_mode will not get zeroed. Because right after
> > > the memset it follows: 'config = port->config'.
> >
> > Ah, missed that, thanks. However, why should portmode and phy_mode be
> > different?
>
> Because the serdes knows only few modes(QSGMII, SGMII, GMII) and this
> information will come from DT. So I would like to have one variable that
> will configure the serdes ('phy_mode') and one will configure the MAC
> ('portmode').
I don't follow why you need this to be different.
Isn't the point of interfaces such as phy_set_mode_ext() such that we
can achieve independence of the details of what is behind that
interface - so, as it takes a PHY interface mode, if we're operating
in 1000BASE-X, we pass that to phy_set_mode_ext(). It is then the
responsibility of the Serdes PHY driver to decide that means "sgmii"
mode for the Serdes?
For example, the Marvell CP110 comphy driver does this:
if (submode == PHY_INTERFACE_MODE_1000BASEX)
submode = PHY_INTERFACE_MODE_SGMII;
because the serdes phy settings for PHY_INTERFACE_MODE_1000BASEX are
no different from PHY_INTERFACE_MODE_SGMII - and that detail is hidden
from the network driver.
The next question this brings up is... you're setting all the different
interface modes in phylink_config.supported_interfaces, which basically
means you're giving permission for phylink to switch between any of
those modes. So, what if the serdes is in QSGMII mode but phylink
requests SGMII mode. Doesn't your driver architecture mean that if
you're in QSGMII mode you can't use SGMII or GMII mode?
Is there some kind of restriction that you need to split this, or is
this purely down to the way this driver has been written?
I don't see any other driver in the kernel making this kind of split.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2021-11-24 16:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-24 8:39 [PATCH net-next v3 0/6] net: lan966x: Add lan966x switch driver Horatiu Vultur
2021-11-24 8:39 ` [PATCH net-next v3 1/6] dt-bindings: net: lan966x: Add lan966x-switch bindings Horatiu Vultur
2021-11-24 8:39 ` [PATCH net-next v3 2/6] net: lan966x: add the basic lan966x driver Horatiu Vultur
2021-11-24 8:39 ` [PATCH net-next v3 3/6] net: lan966x: add port module support Horatiu Vultur
2021-11-24 10:20 ` Russell King (Oracle)
2021-11-24 14:58 ` Horatiu Vultur
2021-11-24 15:03 ` Russell King (Oracle)
2021-11-24 15:43 ` Horatiu Vultur
2021-11-24 16:04 ` Russell King (Oracle) [this message]
2021-11-25 11:16 ` Horatiu Vultur
2021-11-24 8:39 ` [PATCH net-next v3 4/6] net: lan966x: add mactable support Horatiu Vultur
2021-11-24 8:39 ` [PATCH net-next v3 5/6] net: lan966x: add ethtool configuration and statistics Horatiu Vultur
2021-11-24 8:39 ` [PATCH net-next v3 6/6] net: lan966x: Update MAINTAINERS to include lan966x driver Horatiu Vultur
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=YZ5ikamCVeyGFw3x@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=horatiu.vultur@microchip.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
/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).