* [RESEND] ll_temac: Add support for phy_mii_ioctl
@ 2011-11-08 9:47 Ricardo Ribalda Delgado
2011-11-08 20:16 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Ribalda Delgado @ 2011-11-08 9:47 UTC (permalink / raw)
To: davem, ian.campbell, eric.dumazet, jeffrey.t.kirsher, jpirko,
netdev, linux-kernel
Cc: Ricardo Ribalda Delgado
This patch enables the ioctl support for the driver. So userspace
programs like mii-tool can work.
Resend in merge window
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
drivers/net/ethernet/xilinx/ll_temac_main.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 4d1658e..b26e5ee 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -915,12 +915,26 @@ temac_poll_controller(struct net_device *ndev)
}
#endif
+static int temac_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
+{
+ struct temac_local *lp = netdev_priv(ndev);
+
+ if (!netif_running(ndev))
+ return -EINVAL;
+
+ if (!lp->phy_dev)
+ return -EINVAL;
+
+ return phy_mii_ioctl(lp->phy_dev, rq, cmd);
+}
+
static const struct net_device_ops temac_netdev_ops = {
.ndo_open = temac_open,
.ndo_stop = temac_stop,
.ndo_start_xmit = temac_start_xmit,
.ndo_set_mac_address = netdev_set_mac_address,
.ndo_validate_addr = eth_validate_addr,
+ .ndo_do_ioctl = temac_ioctl,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = temac_poll_controller,
#endif
--
1.7.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RESEND] ll_temac: Add support for phy_mii_ioctl
2011-11-08 9:47 [RESEND] ll_temac: Add support for phy_mii_ioctl Ricardo Ribalda Delgado
@ 2011-11-08 20:16 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-11-08 20:16 UTC (permalink / raw)
To: ricardo.ribalda
Cc: ian.campbell, eric.dumazet, jeffrey.t.kirsher, jpirko, netdev,
linux-kernel
From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Date: Tue, 8 Nov 2011 10:47:45 +0100
> This patch enables the ioctl support for the driver. So userspace
> programs like mii-tool can work.
>
> Resend in merge window
>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-08 20:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-08 9:47 [RESEND] ll_temac: Add support for phy_mii_ioctl Ricardo Ribalda Delgado
2011-11-08 20:16 ` 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).