netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dpaa2-eth: add support for mii ioctls
@ 2020-02-27 12:00 Russell King
  2020-02-27 15:23 ` Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Russell King @ 2020-02-27 12:00 UTC (permalink / raw)
  To: Ioana Ciornei; +Cc: David S. Miller, netdev

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
index 40290fea9e36..f1ab6bb5db5d 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -1704,10 +1704,15 @@ static int dpaa2_eth_ts_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 
 static int dpaa2_eth_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
+	struct dpaa2_eth_priv *priv = netdev_priv(dev);
+
 	if (cmd == SIOCSHWTSTAMP)
 		return dpaa2_eth_ts_ioctl(dev, rq, cmd);
 
-	return -EINVAL;
+	if (priv->mac)
+		return phylink_mii_ioctl(priv->mac->phylink, rq, cmd);
+
+	return -EOPNOTSUPP;
 }
 
 static bool xdp_mtu_valid(struct dpaa2_eth_priv *priv, int mtu)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] dpaa2-eth: add support for mii ioctls
  2020-02-27 12:00 [PATCH] dpaa2-eth: add support for mii ioctls Russell King
@ 2020-02-27 15:23 ` Andrew Lunn
  2020-02-27 16:03 ` Ioana Ciornei
  2020-02-27 19:27 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2020-02-27 15:23 UTC (permalink / raw)
  To: Russell King; +Cc: Ioana Ciornei, David S. Miller, netdev

On Thu, Feb 27, 2020 at 12:00:21PM +0000, Russell King wrote:
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] dpaa2-eth: add support for mii ioctls
  2020-02-27 12:00 [PATCH] dpaa2-eth: add support for mii ioctls Russell King
  2020-02-27 15:23 ` Andrew Lunn
@ 2020-02-27 16:03 ` Ioana Ciornei
  2020-02-27 19:27 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Ioana Ciornei @ 2020-02-27 16:03 UTC (permalink / raw)
  To: Russell King; +Cc: David S. Miller, netdev

> Subject: [PATCH] dpaa2-eth: add support for mii ioctls
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Acked-by: Ioana Ciornei <ioana.ciornei@nxp.com>

> ---
>  drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> index 40290fea9e36..f1ab6bb5db5d 100644
> --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> @@ -1704,10 +1704,15 @@ static int dpaa2_eth_ts_ioctl(struct net_device
> *dev, struct ifreq *rq, int cmd)
> 
>  static int dpaa2_eth_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)  {
> +	struct dpaa2_eth_priv *priv = netdev_priv(dev);
> +
>  	if (cmd == SIOCSHWTSTAMP)
>  		return dpaa2_eth_ts_ioctl(dev, rq, cmd);
> 
> -	return -EINVAL;
> +	if (priv->mac)
> +		return phylink_mii_ioctl(priv->mac->phylink, rq, cmd);
> +
> +	return -EOPNOTSUPP;
>  }
> 
>  static bool xdp_mtu_valid(struct dpaa2_eth_priv *priv, int mtu)
> --
> 2.20.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dpaa2-eth: add support for mii ioctls
  2020-02-27 12:00 [PATCH] dpaa2-eth: add support for mii ioctls Russell King
  2020-02-27 15:23 ` Andrew Lunn
  2020-02-27 16:03 ` Ioana Ciornei
@ 2020-02-27 19:27 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-02-27 19:27 UTC (permalink / raw)
  To: rmk+kernel; +Cc: ioana.ciornei, netdev

From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Thu, 27 Feb 2020 12:00:21 +0000

> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-27 19:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 12:00 [PATCH] dpaa2-eth: add support for mii ioctls Russell King
2020-02-27 15:23 ` Andrew Lunn
2020-02-27 16:03 ` Ioana Ciornei
2020-02-27 19:27 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).