From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Matthew Vick <matthew.vick@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 10/12] igb: Enable auto-crossover during forced operation on 82580 and above.
Date: Fri, 26 Oct 2012 17:08:36 -0700 [thread overview]
Message-ID: <1351296518-31174-11-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1351296518-31174-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Matthew Vick <matthew.vick@intel.com>
Newer devices supported by igb can support auto-crossover detection in
forced operation modes. Enable this in the driver, rather than clobbering
this functionality in forced operation.
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igb/e1000_mac.c | 4 ++++
drivers/net/ethernet/intel/igb/e1000_phy.c | 29 +++++++++++++++++------------
2 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/e1000_mac.c b/drivers/net/ethernet/intel/igb/e1000_mac.c
index 819c145..7acddfe 100644
--- a/drivers/net/ethernet/intel/igb/e1000_mac.c
+++ b/drivers/net/ethernet/intel/igb/e1000_mac.c
@@ -1391,6 +1391,10 @@ s32 igb_validate_mdi_setting(struct e1000_hw *hw)
{
s32 ret_val = 0;
+ /* All MDI settings are supported on 82580 and newer. */
+ if (hw->mac.type >= e1000_82580)
+ goto out;
+
if (!hw->mac.autoneg && (hw->phy.mdix == 0 || hw->phy.mdix == 3)) {
hw_dbg("Invalid MDI setting detected\n");
hw->phy.mdix = 1;
diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c
index c62a4c3..fe76004 100644
--- a/drivers/net/ethernet/intel/igb/e1000_phy.c
+++ b/drivers/net/ethernet/intel/igb/e1000_phy.c
@@ -1207,20 +1207,25 @@ s32 igb_phy_force_speed_duplex_m88(struct e1000_hw *hw)
u16 phy_data;
bool link;
- /*
- * Clear Auto-Crossover to force MDI manually. M88E1000 requires MDI
- * forced whenever speed and duplex are forced.
- */
- ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
- if (ret_val)
- goto out;
+ /* I210 and I211 devices support Auto-Crossover in forced operation. */
+ if (phy->type != e1000_phy_i210) {
+ /*
+ * Clear Auto-Crossover to force MDI manually. M88E1000
+ * requires MDI forced whenever speed and duplex are forced.
+ */
+ ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL,
+ &phy_data);
+ if (ret_val)
+ goto out;
- phy_data &= ~M88E1000_PSCR_AUTO_X_MODE;
- ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
- if (ret_val)
- goto out;
+ phy_data &= ~M88E1000_PSCR_AUTO_X_MODE;
+ ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL,
+ phy_data);
+ if (ret_val)
+ goto out;
- hw_dbg("M88E1000 PSCR: %X\n", phy_data);
+ hw_dbg("M88E1000 PSCR: %X\n", phy_data);
+ }
ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
if (ret_val)
--
1.7.11.7
next prev parent reply other threads:[~2012-10-27 0:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-27 0:08 [net-next v2 00/12][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2012-10-27 0:08 ` [net-next 01/12] ixgbe: Add support for pipeline reset Jeff Kirsher
2012-10-27 0:08 ` [net-next 02/12] ixgbe: Fix return value from macvlan filter function Jeff Kirsher
2012-10-27 18:36 ` Konstantin Stepanyuk
2012-10-29 16:27 ` Rose, Gregory V
2012-10-27 0:08 ` [net-next 03/12] net, ixgbe: handle link local multicast addresses in SR-IOV mode Jeff Kirsher
2012-10-27 0:08 ` [net-next 04/12] ixgbe: clean up the condition for turning on/off the laser Jeff Kirsher
2012-10-27 0:08 ` [net-next 05/12] ixgbe: Return success or failure on VF MAC filter set Jeff Kirsher
2012-10-27 0:08 ` [net-next 06/12] ixgbe: Do not decrement budget in ixgbe_clean_rx_irq Jeff Kirsher
2012-10-27 0:08 ` [net-next 07/12] ixgbe: add/update descriptor maps in comments Jeff Kirsher
2012-10-27 0:08 ` [net-next 08/12] ixgbevf: Do not forward LLDP type frames Jeff Kirsher
2012-10-27 0:08 ` [net-next 09/12] igbvf: Check for error on dma_map_single call Jeff Kirsher
2012-10-27 0:08 ` Jeff Kirsher [this message]
2012-10-27 0:08 ` [net-next 11/12] igb: Update firmware version info for ethtool output Jeff Kirsher
2012-10-27 0:08 ` [net-next 12/12] igb: Fix sparse warning in igb_ptp_rx_pktstamp Jeff Kirsher
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=1351296518-31174-11-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=matthew.vick@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).