netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: "Garzik, Jeff" <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org, akpm@osdl.org, "Brandeburg,
	Jesse" <jesse.brandeburg@intel.com>,
	"Kok, Auke" <auke-jan.h.kok@intel.com>,
	"Kok, Auke" <auke@foo-projects.org>,
	"Ronciak, John" <john.ronciak@intel.com>
Subject: [PATCH 08/26] e1000: Deprecate mii-tool SIOCMIIREG ioctl
Date: Tue, 29 Aug 2006 09:44:32 -0700	[thread overview]
Message-ID: <20060829164432.6872.69323.stgit@gitlost.site> (raw)
In-Reply-To: <20060829164153.6872.1713.stgit@gitlost.site>


Deprecate mii-tool SIOCMIIREG ioctl. This ioctl is broken in e1000 and
ethtool has this functionality in working order.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---

 drivers/net/e1000/e1000_main.c |   69 ----------------------------------------
 1 files changed, 0 insertions(+), 69 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index c128f62..70d0acd 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4263,9 +4263,6 @@ e1000_mii_ioctl(struct net_device *netde
 {
 	struct e1000_adapter *adapter = netdev_priv(netdev);
 	struct mii_ioctl_data *data = if_mii(ifr);
-	int retval;
-	uint16_t mii_reg;
-	uint16_t spddplx;
 	unsigned long flags;
 
 	if (adapter->hw.media_type != e1000_media_type_copper)
@@ -4287,72 +4284,6 @@ e1000_mii_ioctl(struct net_device *netde
 		spin_unlock_irqrestore(&adapter->stats_lock, flags);
 		break;
 	case SIOCSMIIREG:
-		if (!capable(CAP_NET_ADMIN))
-			return -EPERM;
-		if (data->reg_num & ~(0x1F))
-			return -EFAULT;
-		mii_reg = data->val_in;
-		spin_lock_irqsave(&adapter->stats_lock, flags);
-		if (e1000_write_phy_reg(&adapter->hw, data->reg_num,
-					mii_reg)) {
-			spin_unlock_irqrestore(&adapter->stats_lock, flags);
-			return -EIO;
-		}
-		if (adapter->hw.media_type == e1000_media_type_copper) {
-			switch (data->reg_num) {
-			case PHY_CTRL:
-				if (mii_reg & MII_CR_POWER_DOWN)
-					break;
-				if (mii_reg & MII_CR_AUTO_NEG_EN) {
-					adapter->hw.autoneg = 1;
-					adapter->hw.autoneg_advertised = 0x2F;
-				} else {
-					if (mii_reg & 0x40)
-						spddplx = SPEED_1000;
-					else if (mii_reg & 0x2000)
-						spddplx = SPEED_100;
-					else
-						spddplx = SPEED_10;
-					spddplx += (mii_reg & 0x100)
-						   ? DUPLEX_FULL :
-						   DUPLEX_HALF;
-					retval = e1000_set_spd_dplx(adapter,
-								    spddplx);
-					if (retval) {
-						spin_unlock_irqrestore(
-							&adapter->stats_lock,
-							flags);
-						return retval;
-					}
-				}
-				if (netif_running(adapter->netdev))
-					e1000_reinit_locked(adapter);
-				else
-					e1000_reset(adapter);
-				break;
-			case M88E1000_PHY_SPEC_CTRL:
-			case M88E1000_EXT_PHY_SPEC_CTRL:
-				if (e1000_phy_reset(&adapter->hw)) {
-					spin_unlock_irqrestore(
-						&adapter->stats_lock, flags);
-					return -EIO;
-				}
-				break;
-			}
-		} else {
-			switch (data->reg_num) {
-			case PHY_CTRL:
-				if (mii_reg & MII_CR_POWER_DOWN)
-					break;
-				if (netif_running(adapter->netdev))
-					e1000_reinit_locked(adapter);
-				else
-					e1000_reset(adapter);
-				break;
-			}
-		}
-		spin_unlock_irqrestore(&adapter->stats_lock, flags);
-		break;
 	default:
 		return -EOPNOTSUPP;
 	}



---
Auke Kok <auke-jan.h.kok@intel.com>

  parent reply	other threads:[~2006-08-29 16:36 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29 16:41 [PATCH 00/26] e100, e1000, ixgb updates Kok, Auke
2006-08-29 16:44 ` [PATCH 02/26] e1000: IRQ resources cleanup Kok, Auke
2006-08-29 16:44 ` [PATCH 03/26] e1000: e1000_probe " Kok, Auke
2006-08-29 16:44 ` [PATCH 04/26] e1000: ring buffers " Kok, Auke
2006-08-29 16:44 ` [PATCH 05/26] e1000: error out if we cannot enable PCI device on resume Kok, Auke
2006-08-29 16:44 ` [PATCH 06/26] e1000: remove unused part_num reading code Kok, Auke
2006-08-29 16:44 ` [PATCH 07/26] e1000: Use module param array code Kok, Auke
2006-08-29 20:50   ` Jeff Garzik
2006-08-29 16:44 ` Kok, Auke [this message]
2006-08-29 20:49   ` [PATCH 08/26] e1000: Deprecate mii-tool SIOCMIIREG ioctl Jeff Garzik
2006-08-29 16:44 ` [PATCH 09/26] e1000: unify WoL capability detection code Kok, Auke
2006-08-29 20:51   ` Jeff Garzik
2006-08-29 21:54     ` Auke Kok
2006-08-29 16:44 ` [PATCH 10/26] e1000: Add PCI ID 0x10a4 for our new 4-port PCI-Express device Kok, Auke
2006-08-29 16:44 ` [PATCH 11/26] e1000: clean up skb allocation code, patch submitted by Christoph Kok, Auke
2006-08-29 20:52   ` Jeff Garzik
2006-08-29 22:15     ` Auke Kok
2006-08-29 16:44 ` [PATCH 12/26] e1000: Increment driver version to 7.2.7-k2 Kok, Auke
2006-08-29 16:44 ` [PATCH 13/26] e100: Convert e100 to use netdev_alloc_skb() Kok, Auke
2006-08-29 16:44 ` [PATCH 14/26] e100: fix error recovery Kok, Auke
2006-08-29 20:55   ` Jeff Garzik
2006-08-29 16:44 ` [PATCH 15/26] e100: reduce time under spinlock Kok, Auke
2006-08-29 20:55   ` Jeff Garzik
2006-08-29 22:10     ` Auke Kok
2006-08-29 16:44 ` [PATCH 16/26] e100: remove skb->dev assignment Kok, Auke
2006-08-29 16:44 ` [PATCH 17/26] e100: increment version to 3.5.16-k2 Kok, Auke
2006-08-29 16:44 ` [PATCH 18/26] ixgb: Convert dev_alloc_skb to netdev_alloc_skb Kok, Auke
2006-08-29 16:44 ` [PATCH 19/26] ixgb: convert dev->priv to netdev_priv(dev) Kok, Auke
2006-08-29 16:44 ` [PATCH 20/26] ixgb: Set a constant blink rate for ixgb adapter identify (1sec on, 1sec off) Kok, Auke
2006-08-29 16:45 ` [PATCH 21/26] ixgb: recalculate after how many descriptors to wake the queue Kok, Auke
2006-08-29 21:00   ` Jeff Garzik
2006-08-29 16:45 ` [PATCH 22/26] ixgb: Cache-align all TX components of the adapter struct Kok, Auke
2006-08-29 17:33   ` Eric Dumazet
2006-08-29 20:59     ` Jeff Garzik
2006-08-29 21:01       ` Auke Kok
2006-08-29 22:20       ` Auke Kok
2006-08-29 16:45 ` [PATCH 23/26] ixgb: Add buffer_info and test like e1000 has Kok, Auke
2006-08-29 16:45 ` [PATCH 24/26] ixgb: Add PCI Error recovery callbacks Kok, Auke
2006-08-29 16:45 ` [PATCH 25/26] ixgb: remove skb->dev assignment Kok, Auke
2006-08-29 16:45 ` [PATCH 26/26] ixgb: Increment version to 1.0.112-k2 Kok, Auke
2006-08-29 21:01   ` Jeff Garzik
     [not found] ` <20060829164415.6872.84250.stgit@gitlost.site>
2006-08-29 16:52   ` [PATCH 01/26] e1000: Whitespace cleanup, cosmetic changes Auke Kok
2006-08-31 21:26 ` [PATCH 00/26] e100, e1000, ixgb updates Auke Kok
2006-08-31 21:48   ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2006-08-30  4:21 [PATCH 08/26] e1000: Deprecate mii-tool SIOCMIIREG ioctl Brandeburg, Jesse
2006-08-31 21:17 ` Auke Kok

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=20060829164432.6872.69323.stgit@gitlost.site \
    --to=auke-jan.h.kok@intel.com \
    --cc=akpm@osdl.org \
    --cc=auke@foo-projects.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=john.ronciak@intel.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).