netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Kirjanov <dkirjanov@hera.kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 2/3] ns83820: Add copper device settings
Date: Fri,  3 Sep 2010 20:05:40 +0000	[thread overview]
Message-ID: <1283544341-18532-3-git-send-email-dkirjanov@hera.kernel.org> (raw)
In-Reply-To: <1283544341-18532-1-git-send-email-dkirjanov@hera.kernel.org>

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
---
 drivers/net/ns83820.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 3347125..712422a 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -1270,13 +1270,21 @@ static int ns83820_get_settings(struct net_device *ndev,
 
 	cmd->supported = SUPPORTED_Autoneg;
 
-	/* we have optical interface */
 	if (dev->CFG_cache & CFG_TBI_EN) {
+		/* we have optical interface */
 		cmd->supported |= SUPPORTED_1000baseT_Half |
 					SUPPORTED_1000baseT_Full |
 					SUPPORTED_FIBRE;
 		cmd->port       = PORT_FIBRE;
-	} /* TODO: else copper related  support */
+	} else {
+		/* we have copper */
+		cmd->supported |= SUPPORTED_10baseT_Half |
+			SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Half |
+			SUPPORTED_100baseT_Full | SUPPORTED_1000baseT_Half |
+			SUPPORTED_1000baseT_Full |
+			SUPPORTED_MII;
+		cmd->port = PORT_MII;
+	}
 
 	cmd->duplex = fullduplex ? DUPLEX_FULL : DUPLEX_HALF;
 	switch (cfg / CFG_SPDSTS0 & 3) {
-- 
1.6.4.4


  parent reply	other threads:[~2010-09-03 20:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-03 20:05 [PATCH net-next] ns83820: Minor ethtool stuff and some cleanups Denis Kirjanov
2010-09-03 20:05 ` [PATCH net-next 1/3] ns83820: Remove unused have_optical variable Denis Kirjanov
2010-09-03 20:05 ` Denis Kirjanov [this message]
2010-09-03 20:05 ` [PATCH net-next 3/3] ns83820: Use predefined autoneg constants Denis Kirjanov
2010-09-07  1:15 ` [PATCH net-next] ns83820: Minor ethtool stuff and some cleanups 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=1283544341-18532-3-git-send-email-dkirjanov@hera.kernel.org \
    --to=dkirjanov@hera.kernel.org \
    --cc=davem@davemloft.net \
    --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).