From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Ben Hutchings <bhutchings@solarflare.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 1/6] ethtool.h: MDI setting support
Date: Fri, 20 Jul 2012 14:43:46 -0700 [thread overview]
Message-ID: <1342820631-19738-2-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1342820631-19738-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
This change modifies the core ethtool struct to allow a driver to
support setting of MDI/MDI-X state for twisted pair wiring. This
change uses a previously reserved u8 and should not change any
binary compatibility of ethtool.
Also as per Ben Hutchings' suggestion, the capabilities are
stored in a separate byte so the driver can report if it supports
changing settings.
see thread: http://kerneltrap.org/mailarchive/linux-netdev/2010/11/17/6289820/thread
see ethtool patches titled:
ethtool: allow setting MDI-X state
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
include/linux/ethtool.h | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 21eff41..fcb4f8e 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -45,8 +45,10 @@ struct ethtool_cmd {
* bits) in Mbps. Please use
* ethtool_cmd_speed()/_set() to
* access it */
- __u8 eth_tp_mdix;
- __u8 reserved2;
+ __u8 eth_tp_mdix; /* twisted pair MDI-X status */
+ __u8 eth_tp_mdix_ctrl; /* twisted pair MDI-X control, when set,
+ * link should be renegotiated if necessary
+ */
__u32 lp_advertising; /* Features the link partner advertises */
__u32 reserved[2];
};
@@ -1229,10 +1231,13 @@ struct ethtool_ops {
#define AUTONEG_DISABLE 0x00
#define AUTONEG_ENABLE 0x01
-/* Mode MDI or MDI-X */
-#define ETH_TP_MDI_INVALID 0x00
-#define ETH_TP_MDI 0x01
-#define ETH_TP_MDI_X 0x02
+/* MDI or MDI-X status/control - if MDI/MDI_X/AUTO is set then
+ * the driver is required to renegotiate link
+ */
+#define ETH_TP_MDI_INVALID 0x00 /* status: unknown; control: unsupported */
+#define ETH_TP_MDI 0x01 /* status: MDI; control: force MDI */
+#define ETH_TP_MDI_X 0x02 /* status: MDI-X; control: force MDI-X */
+#define ETH_TP_MDI_AUTO 0x03 /* control: auto-select */
/* Wake-On-Lan options. */
#define WAKE_PHY (1 << 0)
--
1.7.10.4
next prev parent reply other threads:[~2012-07-20 21:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-20 21:43 [net-next 0/6][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2012-07-20 21:43 ` Jeff Kirsher [this message]
2012-07-20 21:43 ` [net-next 2/6] e1000e: implement 82577/579 MDI setting support Jeff Kirsher
2012-07-20 21:43 ` [net-next 3/6] igb: implement 580 " Jeff Kirsher
2012-07-20 21:43 ` [net-next 4/6] e1000: configure and read MDI settings Jeff Kirsher
2012-07-20 23:27 ` Ben Hutchings
2012-07-21 1:17 ` Brandeburg, Jesse
2012-07-21 15:37 ` Ben Hutchings
2012-07-21 17:37 ` Jeff Kirsher
2012-07-20 21:43 ` [net-next 5/6] e1000e: implement MDI/MDI-X control Jeff Kirsher
2012-07-20 21:43 ` [net-next 6/6] igb: update to allow reading/setting MDI state Jeff Kirsher
2012-07-21 17:37 ` [net-next 0/6][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
-- strict thread matches above, loose matches on Subject: below --
2012-08-21 8:37 Jeff Kirsher
2012-08-21 8:37 ` [net-next 1/6] ethtool.h: MDI setting support Jeff Kirsher
2012-08-21 15:12 ` Ben Hutchings
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=1342820631-19738-2-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
/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).