[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YXuvD2PJukHqytHe@shell.armlinux.org.uk>
Date: Fri, 29 Oct 2021 09:21:35 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Prasanna Vengateshan <prasanna.vengateshan@...rochip.com>
Cc: andrew@...n.ch, netdev@...r.kernel.org, olteanv@...il.com,
robh+dt@...nel.org, UNGLinuxDriver@...rochip.com,
Woojung.Huh@...rochip.com, hkallweit1@...il.com,
davem@...emloft.net, kuba@...nel.org, linux-kernel@...r.kernel.org,
vivien.didelot@...il.com, f.fainelli@...il.com,
devicetree@...r.kernel.org
Subject: Re: [PATCH v6 net-next 06/10] net: dsa: microchip: add support for
phylink management
Hi,
Sorry for missing this.
The use of bitmap_foo() seems to have not been commented on, which
are now unnecessary as linkmode_foo() helpers were added in
b31cdffa2329 ("net: phy: Move linkmode helpers to somewhere public").
On Fri, Oct 29, 2021 at 10:52:52AM +0530, Prasanna Vengateshan wrote:
> +static void lan937x_phylink_validate(struct dsa_switch *ds, int port,
> + unsigned long *supported,
> + struct phylink_link_state *state)
> +{
> + struct ksz_device *dev = ds->priv;
> + __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
> +
> + /* Check for unsupported interfaces */
> + if (!phy_interface_mode_is_rgmii(state->interface) &&
> + state->interface != PHY_INTERFACE_MODE_RMII &&
> + state->interface != PHY_INTERFACE_MODE_MII &&
> + state->interface != PHY_INTERFACE_MODE_NA &&
> + state->interface != PHY_INTERFACE_MODE_INTERNAL) {
> + bitmap_zero(supported, __ETHTOOL_LINK_MODE_MASK_NBITS);
linkmode_zero(supported);
...
> +
> + bitmap_and(supported, supported, mask, __ETHTOOL_LINK_MODE_MASK_NBITS);
> + bitmap_and(state->advertising, state->advertising, mask,
> + __ETHTOOL_LINK_MODE_MASK_NBITS);
linkmode_and(supported, supported, mask);
linkmode_and(state->advertising, state->advertising, mask);
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists