Thread (15 messages) 15 messages, 4 authors, 2021-10-29

Re: [PATCH v6 net-next 06/10] net: dsa: microchip: add support for phylink management

flat view

From: "Russell King (Oracle)" <linux@armlinux.org.uk>
Date: 2021-10-29 08:21:44
Also in: lkml, netdev

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:
quoted hunk ↗ jump to hunk
+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);

...
quoted hunk ↗ jump to hunk
+
+	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!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help