From: <Jerry.Ray@microchip.com>
To: <olteanv@gmail.com>
Cc: <andrew@lunn.ch>, <f.fainelli@gmail.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<linux@armlinux.org.uk>, <jbe@pengutronix.de>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH net-next v6 5/6] dsa: lan9303: Port 0 is xMII port
Date: Mon, 16 Jan 2023 18:05:37 +0000 [thread overview]
Message-ID: <MWHPR11MB16933112707D97121C67E5C5EFC19@MWHPR11MB1693.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230114205351.czy2fkfrulrl4w6k@skbuf>
> > In preparing to move the adjust_link logic into the phylink_mac_link_up
> > api, change the macro used to check for the cpu port. In
> > phylink_mac_link_up, the phydev pointer passed in for the CPU port is
> > NULL, so we can't keep using phy_is_pseudo_fixed_link(phydev).
> >
> > Signed-off-by: Jerry Ray <jerry.ray@microchip.com>
> > ---
> > v5->v6:
> > Using port 0 to identify the xMII port on the LAN9303.
> > ---
> > drivers/net/dsa/lan9303-core.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
> > index 792ce6a26a6a..7be4c491e5d9 100644
> > --- a/drivers/net/dsa/lan9303-core.c
> > +++ b/drivers/net/dsa/lan9303-core.c
> > @@ -1063,7 +1063,11 @@ static void lan9303_adjust_link(struct dsa_switch *ds, int port,
> > {
> > int ctl;
> >
> > - if (!phy_is_pseudo_fixed_link(phydev))
> > + /* On this device, we are only interested in doing something here if
> > + * this is an xMII port. All other ports are 10/100 phys using MDIO
> > + * to control there link settings.
> > + */
> > + if (port != 0)
>
> Maybe a macro LAN9303_XMII_PORT would be good, if it was also
> consistently used in lan9303_setup()?
>
Agreed. As I add more devices that have different capabilities, this will
change. I was hesitant to add this logic now as it is uncalled for until
multiple device types are supported by the driver.
> > return;
> >
> > ctl = lan9303_phy_read(ds, port, MII_BMCR);
> > --
> > 2.17.1
> >
next prev parent reply other threads:[~2023-01-16 18:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 21:18 [PATCH net-next v6 0/6] dsa: lan9303: Move to PHYLINK Jerry Ray
2023-01-09 21:18 ` [PATCH net-next v6 1/6] dsa: lan9303: align dsa_switch_ops members Jerry Ray
2023-01-11 22:04 ` Vladimir Oltean
2023-01-11 22:07 ` Florian Fainelli
2023-01-09 21:18 ` [PATCH net-next v6 2/6] dsa: lan9303: move Turbo Mode bit init Jerry Ray
2023-01-14 20:49 ` Vladimir Oltean
2023-01-16 18:03 ` Jerry.Ray
2023-01-16 18:06 ` Jerry.Ray
2023-01-09 21:18 ` [PATCH net-next v6 3/6] dsa: lan9303: Add exception logic for read failure Jerry Ray
2023-01-09 21:18 ` [PATCH net-next v6 4/6] dsa: lan9303: write reg only if necessary Jerry Ray
2023-01-09 21:18 ` [PATCH net-next v6 5/6] dsa: lan9303: Port 0 is xMII port Jerry Ray
2023-01-14 20:53 ` Vladimir Oltean
2023-01-16 18:05 ` Jerry.Ray [this message]
2023-01-09 21:18 ` [PATCH net-next v6 6/6] dsa: lan9303: Migrate to PHYLINK Jerry Ray
2023-01-12 5:22 ` Arun.Ramadoss
2023-01-16 17:33 ` Jerry.Ray
2023-01-12 11:48 ` Russell King (Oracle)
2023-01-16 17:22 ` Jerry.Ray
2023-01-16 18:03 ` Russell King (Oracle)
2023-01-16 22:48 ` Jerry.Ray
2023-01-17 18:19 ` Russell King (Oracle)
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=MWHPR11MB16933112707D97121C67E5C5EFC19@MWHPR11MB1693.namprd11.prod.outlook.com \
--to=jerry.ray@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=jbe@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--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 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).