Re: [PATCH net-next v5 05/13] net: pcs: add Renesas MII converter driver

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

 



Hi,

On Thu, May 19, 2022 at 05:30:59PM +0200, Clément Léger wrote:
> Add a PCS driver for the MII converter that is present on the Renesas
> RZ/N1 SoC. This MII converter is reponsible for converting MII to
> RMII/RGMII or act as a MII pass-trough. Exposing it as a PCS allows to
> reuse it in both the switch driver and the stmmac driver. Currently,
> this driver only allows the PCS to be used by the dual Cortex-A7
> subsystem since the register locking system is not used.
> 
> Signed-off-by: Clément Léger <clement.leger@xxxxxxxxxxx>

Looks much better now, thanks. Only one thing I've spotted is:

> +static int miic_validate(struct phylink_pcs *pcs, unsigned long *supported,
> +			 const struct phylink_link_state *state)
> +{
> +	if (state->interface == PHY_INTERFACE_MODE_RGMII ||
> +	    state->interface == PHY_INTERFACE_MODE_RGMII_ID ||
> +	    state->interface == PHY_INTERFACE_MODE_RGMII_TXID ||
> +	    state->interface == PHY_INTERFACE_MODE_RGMII_RXID ||

The above could use:

	if (phy_interface_mode_is_rgmii(state->interface) ||

Also, as a request to unbind this driver would be disasterous to users,
I think you should set ".suppress_bind_attrs = true" to prevent the
sysfs bind/unbind facility being available. This doesn't completely
solve the problem.

Thanks.

-- 
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]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux