netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Matyukevich <geomatsi@gmail.com>
To: netdev@vger.kernel.org
Cc: Li Yang <leoli@freescale.com>,
	Anton Vorontsov <avorontsov@ru.mvista.com>,
	Sergey Matyukevich <geomatsi@gmail.com>
Subject: [PATCH 1/2] [PATCH] ucc_geth driver: add ioctl
Date: Mon,  7 Jun 2010 22:38:13 +0400	[thread overview]
Message-ID: <1275935894-30483-1-git-send-email-geomatsi@gmail.com> (raw)

ioctl operation (ndo_do_ioctl) is added to make mii-tools work

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
 drivers/net/ucc_geth.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 4a34833..538148a 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3702,6 +3702,19 @@ static phy_interface_t to_phy_interface(const char *phy_connection_type)
 	return PHY_INTERFACE_MODE_MII;
 }
 
+static int ucc_geth_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+{
+	struct ucc_geth_private *ugeth = netdev_priv(dev);
+
+	if (!netif_running(dev))
+		return -EINVAL;
+
+	if (!ugeth->phydev)
+		return -ENODEV;
+
+	return phy_mii_ioctl(ugeth->phydev, if_mii(rq), cmd);
+}
+
 static const struct net_device_ops ucc_geth_netdev_ops = {
 	.ndo_open		= ucc_geth_open,
 	.ndo_stop		= ucc_geth_close,
@@ -3711,6 +3724,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = {
 	.ndo_change_mtu		= eth_change_mtu,
 	.ndo_set_multicast_list	= ucc_geth_set_multi,
 	.ndo_tx_timeout		= ucc_geth_timeout,
+	.ndo_do_ioctl		= ucc_geth_ioctl,
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller	= ucc_netpoll,
 #endif
-- 
1.6.2.5


             reply	other threads:[~2010-06-07 18:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07 18:38 Sergey Matyukevich [this message]
2010-06-07 18:38 ` [PATCH 2/2] [PATCH] ucc_geth: fix for RX skb buffers recycling Sergey Matyukevich
2010-06-10  1:02   ` David Miller
2010-06-14 16:35     ` [PATCH v2] " Sergey Matyukevich
2010-06-17  1:17       ` David Miller
2010-06-12 22:26 ` [PATCH 1/2] [PATCH] ucc_geth driver: add ioctl David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1275935894-30483-1-git-send-email-geomatsi@gmail.com \
    --to=geomatsi@gmail.com \
    --cc=avorontsov@ru.mvista.com \
    --cc=leoli@freescale.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).