All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ixgbe: force to synchronize reporting "link on" and getting speed and duplex
@ 2015-12-23  6:46 ` zyjzyj2000
  0 siblings, 0 replies; 78+ messages in thread
From: zyjzyj2000 @ 2015-12-23  6:46 UTC (permalink / raw)
  To: jeffrey.t.kirsher, jesse.brandeburg, shannon.nelson,
	carolyn.wyborny, donald.c.skidmore, bruce.w.allan, john.ronciak,
	mitch.a.williams, intel-wired-lan, netdev, e1000-devel
  Cc: venkat.viswanathan, Boris.Shteinbock, Vincent.Bourg

From: Zhu Yanjun <zyjzyj2000@gmail.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 <zyjzyj2000@gmail.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index aed8d02..cb9d310 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -6479,7 +6479,21 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter)
 	       (flow_rx ? "RX" :
 	       (flow_tx ? "TX" : "None"))));
 
-	netif_carrier_on(netdev);
+	/*
+	 * 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.
+	 */
+	if ((hw->mac.type == ixgbe_mac_X540) &&
+	    (link_speed != IXGBE_LINK_SPEED_UNKNOWN)) {
+		netif_carrier_on(netdev);
+	} else {
+		netif_carrier_on(netdev);
+	}
+
 	ixgbe_check_vf_rate_limit(adapter);
 
 	/* enable transmits */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 78+ messages in thread

end of thread, other threads:[~2016-01-07  2:39 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-23  6:46 [PATCH 1/1] ixgbe: force to synchronize reporting "link on" and getting speed and duplex zyjzyj2000
2015-12-23  6:46 ` [Intel-wired-lan] " zyjzyj2000
2015-12-23 10:54 ` Jeff Kirsher
2015-12-23 10:54   ` [Intel-wired-lan] " Jeff Kirsher
2015-12-24  3:12   ` [V2 PATCH 1/1] ixgbe: force to synchronize reporting "link on" and zyjzyj2000
2015-12-24  3:12     ` [Intel-wired-lan] " zyjzyj2000
2015-12-24  3:12     ` [PATCH 1/1] ixgbe: force to synchronize reporting "link on" and getting speed zyjzyj2000
2015-12-24  3:12       ` [Intel-wired-lan] " zyjzyj2000
2015-12-24  5:10     ` [V2 PATCH 1/1] ixgbe: force to synchronize reporting "link on" and zhuyj
2015-12-24  5:10       ` [Intel-wired-lan] " zhuyj
2015-12-24  6:17       ` Tantilov, Emil S
2015-12-24  6:17         ` Tantilov, Emil S
2015-12-29  2:32     ` [PATCH V3] ixgbe: force to synchronize link_up and speed as a slave zyjzyj2000
2015-12-29  2:32       ` [Intel-wired-lan] " zyjzyj2000
2015-12-29  2:32       ` [PATCH 1/2] ixgbe: force to synchronize reporting "link on" and getting speed zyjzyj2000
2015-12-29  2:32         ` [Intel-wired-lan] " zyjzyj2000
2015-12-29  2:32       ` [PATCH 2/2] ixgbe: restrict synchronization of link_up and speed zyjzyj2000
2015-12-29  2:32         ` [Intel-wired-lan] " zyjzyj2000
2015-12-29 16:18         ` Tantilov, Emil S
2015-12-29 16:18           ` Tantilov, Emil S
2015-12-29 19:17           ` Rustad, Mark D
2015-12-29 19:17             ` Rustad, Mark D
2015-12-30  3:06             ` zhuyj
2015-12-30  3:06               ` zhuyj
2015-12-30  9:16             ` [PATCH V4] ixgbe: synchronize the link_speed and link_up of a slave interface zyjzyj2000
2015-12-30  9:16               ` [Intel-wired-lan] " zyjzyj2000
2015-12-30  9:16               ` [PATCH 1/3] ixgbe: force to synchronize reporting "link on" and getting speed zyjzyj2000
2015-12-30  9:16                 ` [Intel-wired-lan] " zyjzyj2000
2015-12-30  9:16               ` [PATCH 2/3] ixgbe: restrict synchronization of link_up and speed zyjzyj2000
2015-12-30  9:16                 ` [Intel-wired-lan] " zyjzyj2000
2015-12-30  9:16               ` [PATCH 3/3] ixgbe: synchronize the link_speed and link_up of a slave interface zyjzyj2000
2015-12-30  9:16                 ` [Intel-wired-lan] " zyjzyj2000
2015-12-30 19:02                 ` Rustad, Mark D
2015-12-30 19:02                   ` [Intel-wired-lan] " Rustad, Mark D
2015-12-31  5:04                   ` [PATCH V5] ixgbe: synchronize link_up and link_speed of a slave zyjzyj2000
2015-12-31  5:04                     ` [Intel-wired-lan] " zyjzyj2000
2015-12-31  5:04                     ` [PATCH 1/1] ixgbe: synchronize link_up and link_speed of a slave interface zyjzyj2000
2015-12-31  5:04                       ` [Intel-wired-lan] " zyjzyj2000
2015-12-31  5:37                       ` Jeff Kirsher
2015-12-31  5:37                         ` [Intel-wired-lan] " Jeff Kirsher
2015-12-31  7:11                         ` [PATCH V6] ixgbe: synchronize link_up and link_speed of a slave zyjzyj2000
2015-12-31  7:11                           ` [Intel-wired-lan] " zyjzyj2000
2015-12-31  7:11                           ` [PATCH V6 1/1] ixgbe: synchronize link_up and link_speed of a slave interface zyjzyj2000
2015-12-31  7:11                             ` [Intel-wired-lan] " zyjzyj2000
2015-12-31  5:17                     ` [PATCH V5] ixgbe: synchronize link_up and link_speed of a slave Jeff Kirsher
2015-12-31  5:17                       ` [Intel-wired-lan] " Jeff Kirsher
2015-12-31  5:24                       ` zhuyj
2015-12-31  5:24                         ` [Intel-wired-lan] " zhuyj
2015-12-30  2:49           ` [Intel-wired-lan] [PATCH 2/2] ixgbe: restrict synchronization of link_up and speed zhuyj
2015-12-30  2:49             ` zhuyj
2015-12-30  6:55             ` Tantilov, Emil S
2015-12-30  6:55               ` Tantilov, Emil S
2015-12-30  8:20               ` zhuyj
2015-12-30  8:20                 ` zhuyj
2015-12-30 16:37                 ` Tantilov, Emil S
2015-12-30 16:37                   ` Tantilov, Emil S
2016-01-06  5:41                   ` zhuyj
2016-01-06  5:41                     ` zhuyj
2016-01-06 15:30                     ` Tantilov, Emil S
2016-01-06 15:30                       ` Tantilov, Emil S
2016-01-07  2:08                       ` zhuyj
2016-01-07  2:08                         ` zhuyj
2016-01-07  2:38                       ` zhuyj
2016-01-07  2:38                         ` zhuyj
2015-12-23 12:17 ` [PATCH 1/1] ixgbe: force to synchronize reporting "link on" and getting speed and duplex Sergei Shtylyov
2015-12-23 12:17   ` [Intel-wired-lan] " Sergei Shtylyov
2015-12-23 15:59 ` Tantilov, Emil S
2015-12-23 15:59   ` Tantilov, Emil S
2015-12-23 18:09   ` [E1000-devel] " Stephen Hemminger
2015-12-23 18:09     ` [Intel-wired-lan] [E1000-devel] " Stephen Hemminger
2015-12-24  2:27   ` [Intel-wired-lan] " zhuyj
2015-12-24  2:27     ` zhuyj
2015-12-24  5:58     ` Tantilov, Emil S
2015-12-24  5:58       ` Tantilov, Emil S
2015-12-24  6:24       ` zhuyj
2015-12-24  6:24         ` zhuyj
2015-12-24 14:52         ` Tantilov, Emil S
2015-12-24 14:52           ` Tantilov, Emil S

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.