[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1451466995-19015-2-git-send-email-zyjzyj2000@gmail.com>
Date: Wed, 30 Dec 2015 17:16:33 +0800
From: <zyjzyj2000@...il.com>
To: <jeffrey.t.kirsher@...el.com>, <jesse.brandeburg@...el.com>,
<shannon.nelson@...el.com>, <carolyn.wyborny@...el.com>,
<donald.c.skidmore@...el.com>, <bruce.w.allan@...el.com>,
<john.ronciak@...el.com>, <mitch.a.williams@...el.com>,
<intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>,
<e1000-devel@...ts.sourceforge.net>, <mark.d.rustad@...el.com>
CC: <venkat.viswanathan@...driver.com>,
<Boris.Shteinbock@...driver.com>, <Vincent.Bourg@...driver.com>
Subject: [PATCH 1/3] ixgbe: force to synchronize reporting "link on" and getting speed
From: Zhu Yanjun <yanjun.zhu@...driver.com>
In X540 NIC, there is a time span between reporting "link on" and
getting the speed and duplex. To a bonding driver in 802.3ad mode,
this time span will make it not work well if the time span is big
enough. The big time span will make bonding driver change the state of
the slave device to up while the speed and duplex of the slave device
can not be gotten. Later the bonding driver will not have change to
get the speed and duplex of the slave device. The speed and duplex of
the slave device are important to a bonding driver in 802.3ad mode.
To 82599_SFP NIC and other kinds of NICs, this problem does
not exist. As such, it is necessary for X540 to report"link on" when
the link speed is not IXGBE_LINK_SPEED_UNKNOWN.
Signed-off-by: Zhu Yanjun <yanjun.zhu@...driver.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index aed8d02..ace21b9 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -6426,6 +6426,21 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter)
if (netif_carrier_ok(netdev))
return;
+ /* In X540 NIC, there is a time span between reporting "link on"
+ * and getting the speed and duplex. To a bonding driver in 802.3ad
+ * mode, this time span will make it not work well if the time span
+ * is big enough. To 82599_SFP NIC and other kinds of NICs, this
+ * problem does not exist. As such, it is better for X540 to report
+ * "link on" when the link speed is not IXGBE_LINK_SPEED_UNKNOWN.
+ * To other NICs, the link_up and link_speed are gotten at the same
+ * time. To X540 NIC, there is a time span between link_up and
+ * link_speed. As such, only continue if link_up and link_speed are
+ * ready to X540 NIC.
+ */
+ if (hw->mac.type == ixgbe_mac_X540)
+ if (link_speed == IXGBE_LINK_SPEED_UNKNOWN)
+ return;
+
adapter->flags2 &= ~IXGBE_FLAG2_SEARCH_FOR_SFP;
switch (hw->mac.type) {
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists