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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux