[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1303965163-8198-7-git-send-email-decot@google.com>
Date: Wed, 27 Apr 2011 21:32:42 -0700
From: David Decotigny <decot@...gle.com>
To: "David S. Miller" <davem@...emloft.net>,
Ben Hutchings <bhutchings@...arflare.com>,
mirq-linux@...e.qmqm.pl, Stanislaw Gruszka <sgruszka@...hat.com>,
Alexander Duyck <alexander.h.duyck@...el.com>,
Eilon Greenstein <eilong@...adcom.com>,
Grant Grundler <grundler@...isc-linux.org>,
e1000-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Cc: David Decotigny <decot@...gle.com>
Subject: [PATCHv4 6/7] tulip/de2104x: don't report different speeds depending on port type
Initial driver reported different speeds depending on the port being
used. This advertises the speed to be 10Mbps in any case, which is
what it actually is on the wire.
Signed-off-by: David Decotigny <decot@...gle.com>
---
drivers/net/tulip/de2104x.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index ab78e1d..46d5a1b 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -1518,18 +1518,17 @@ static int __de_get_settings(struct de_private *de, struct ethtool_cmd *ecmd)
switch (de->media_type) {
case DE_MEDIA_AUI:
ecmd->port = PORT_AUI;
- ethtool_cmd_speed_set(ecmd, 5);
break;
case DE_MEDIA_BNC:
ecmd->port = PORT_BNC;
- ethtool_cmd_speed_set(ecmd, 2);
break;
default:
ecmd->port = PORT_TP;
- ethtool_cmd_speed_set(ecmd, SPEED_10);
break;
}
+ ethtool_cmd_speed_set(ecmd, 10);
+
if (dr32(MacMode) & FullDuplex)
ecmd->duplex = DUPLEX_FULL;
else
@@ -1549,11 +1548,8 @@ static int __de_set_settings(struct de_private *de, struct ethtool_cmd *ecmd)
{
u32 new_media;
unsigned int media_lock;
- u32 speed = ethtool_cmd_speed(ecmd);
- if (speed != SPEED_10 && speed != 5 && speed != 2)
- return -EINVAL;
- if (de->de21040 && speed == 2)
+ if (ethtool_cmd_speed(ecmd) != 10)
return -EINVAL;
if (ecmd->duplex != DUPLEX_HALF && ecmd->duplex != DUPLEX_FULL)
return -EINVAL;
--
1.7.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists