From: Prasanna Vengateshan <prasanna.vengateshan@microchip.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: <andrew@lunn.ch>, <netdev@vger.kernel.org>, <robh+dt@kernel.org>,
<UNGLinuxDriver@microchip.com>, <Woojung.Huh@microchip.com>,
<hkallweit1@gmail.com>, <linux@armlinux.org.uk>,
<davem@davemloft.net>, <kuba@kernel.org>,
<linux-kernel@vger.kernel.org>, <vivien.didelot@gmail.com>,
<f.fainelli@gmail.com>, <devicetree@vger.kernel.org>
Subject: Re: [PATCH v4 net-next 05/10] net: dsa: microchip: add DSA support for microchip lan937x
Date: Fri, 8 Oct 2021 23:47:23 +0530 [thread overview]
Message-ID: <0c4264ca6f859b6ce53e59f1565563f8dc29a2c6.camel@microchip.com> (raw)
In-Reply-To: <20211007200005.3ze43py7ma4omn7r@skbuf>
On Thu, 2021-10-07 at 23:00 +0300, Vladimir Oltean wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
>
> On Thu, Oct 07, 2021 at 08:41:55PM +0530, Prasanna Vengateshan wrote:
> > +static int lan937x_mdio_register(struct dsa_switch *ds)
> >
> > +
> > + ret = of_mdiobus_register(ds->slave_mii_bus, mdio_np);
>
> Please use devm_of_mdiobus_register if you're going to use
> devm_mdiobus_alloc, or no devres at all.
> https://patchwork.kernel.org/project/netdevbpf/patch/20210920214209.1733768-3-vladimir.oltean@nxp.com/
Sure, Will change it to devm_of_mdiobus_register.
> >
> > +
> > + /* Check if the device tree have specific interface
> > + * setting otherwise read & assign from XMII register
> > + * for host port interface
> > + */
> > + interface = lan937x_get_interface(dev, i);
>
> What does the CPU port have so special that you override it here?
> Again some compatibility with out-of-tree DT bindings?
> >
>
Device strapping method cannot be used since the phy-mode is expected
to be present in the DT. So above assignment have to be removed along
with lan937x_get_interface function.
> > +
> > + /* maximum delay is 4ns */
> > + if (val > 4000)
> > + val = 4000;
>
> These bindings are new. Given that you also document their min and max
> values, why don't you just error out on out-of-range values instead of
> silently doing what you think is going to be fine?
Sure, i think the driver can also notify rx/tx internal delay applied
message using dev_info.
next prev parent reply other threads:[~2021-10-08 18:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 15:11 [PATCH v4 net-next 00/10] net: dsa: microchip: DSA driver support for LAN937x switch Prasanna Vengateshan
2021-10-07 15:11 ` [PATCH v4 net-next 01/10] dt-bindings: net: dsa: dt bindings for microchip lan937x Prasanna Vengateshan
2021-10-07 21:41 ` Andrew Lunn
2021-10-18 18:00 ` Rob Herring
2021-10-07 15:11 ` [PATCH v4 net-next 02/10] net: dsa: move mib->cnt_ptr reset code to ksz_common.c Prasanna Vengateshan
2021-10-07 15:11 ` [PATCH v4 net-next 03/10] net: phy: Add support for LAN937x T1 phy driver Prasanna Vengateshan
2021-10-07 15:11 ` [PATCH v4 net-next 04/10] net: dsa: tag_ksz: add tag handling for Microchip LAN937x Prasanna Vengateshan
2021-10-07 19:46 ` Vladimir Oltean
2021-10-07 15:11 ` [PATCH v4 net-next 05/10] net: dsa: microchip: add DSA support for microchip lan937x Prasanna Vengateshan
2021-10-07 20:00 ` Vladimir Oltean
2021-10-08 18:17 ` Prasanna Vengateshan [this message]
2021-10-07 21:58 ` Andrew Lunn
2021-10-07 15:11 ` [PATCH v4 net-next 06/10] net: dsa: microchip: add support for phylink management Prasanna Vengateshan
2021-10-07 15:11 ` [PATCH v4 net-next 07/10] net: dsa: microchip: add support for ethtool port counters Prasanna Vengateshan
2021-10-07 15:11 ` [PATCH v4 net-next 08/10] net: dsa: microchip: add support for port mirror operations Prasanna Vengateshan
2021-10-07 20:32 ` Vladimir Oltean
2021-10-07 15:11 ` [PATCH v4 net-next 09/10] net: dsa: microchip: add support for fdb and mdb management Prasanna Vengateshan
2021-10-07 20:29 ` Vladimir Oltean
2021-10-07 15:12 ` [PATCH v4 net-next 10/10] net: dsa: microchip: add support for vlan operations Prasanna Vengateshan
2021-10-07 20:17 ` Vladimir Oltean
2021-10-11 17:43 ` Prasanna Vengateshan
2021-10-14 14:19 ` 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=0c4264ca6f859b6ce53e59f1565563f8dc29a2c6.camel@microchip.com \
--to=prasanna.vengateshan@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--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=olteanv@gmail.com \
--cc=robh+dt@kernel.org \
--cc=vivien.didelot@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
all inboxes | Powered by JetHome®