Subject: Re: [PATCH net-next 3/3] net: axienet: Pass ioctls to the phy.

From: Andrew Lunn <[email-masked]>
Date: Tue, 17 Dec 2019 11:59:45 +0100

> +static int axienet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
> +{
> +	if (!netif_running(dev))
> +		return -EINVAL;
> +
> +	switch (cmd) {
> +	case SIOCGMIIPHY:
> +	case SIOCGMIIREG:
> +	case SIOCSMIIREG:
> +	case SIOCSHWTSTAMP:
> +	case SIOCGHWTSTAMP:
> +		return phy_mii_ioctl(dev->phydev, rq, cmd);
> +	default:
> +		return -EOPNOTSUPP;
> +	}
> +}

Hi Richard

You don't need to be conditional. phy_mii_ioctl() and
phylink_mii_ioctl() will return -EOPNOTSUPP for anything it does not
support.

	Andrew