All of lore.kernel.org
 help / color / mirror / Atom feed
From: Auke Kok <auke-jan.h.kok@intel.com>
To: hadi@cyberus.ca
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, jesse.brandeburg@intel.com,
	Robert.Olsson@data.slu.se, john.ronciak@intel.com,
	greearb@candelatech.com, jgarzik@pobox.com, olel@ans.pl
Subject: Re: [e1000]: flow control on by default - good idea really?
Date: Tue, 17 Oct 2006 14:02:39 -0700	[thread overview]
Message-ID: <453544EF.4000502@intel.com> (raw)
In-Reply-To: <1161090331.5555.10.camel@jzny2>

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

jamal wrote:
> On Mon, 2006-16-10 at 11:55 -0700, Auke Kok wrote:
>> jamal wrote:
> 
>>> I think when the e1000 says via ethtool "rx is on" - it means that it 
>>> is _advertising_ flow control as opposed to detecting partner has flow
>>> control capability.
>>> Auke, can you also check this as well?
 >>
>> Just found this in my todo box - a bit late :(
>>
>> yes, that appears to be the correct interpretation: we never read back the 
>> detected FC  state from the hardware.

For now, we should really report the FC status in e1000 at link up time. Jamal: this 
should help you out for now, I'll send something like this upstream later on.

Cheers,

Auke




[-- Attachment #2: e1000_display_fc_mode_on_link_up.patch --]
[-- Type: text/x-patch, Size: 1422 bytes --]


e1000: Display Flow Control setting used after link negotiation

No part of e1000 was reporting which Fc settings were effectively
negotiated with the link partner so that it would be impossible
to know if FC was actually used at all.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index ce0d35f..ff7f396 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2426,15 +2426,22 @@ e1000_watchdog(unsigned long data)
 
 	if (link) {
 		if (!netif_carrier_ok(netdev)) {
+			uint32_t ctrl;
 			boolean_t txb2b = 1;
 			e1000_get_speed_and_duplex(&adapter->hw,
 			                           &adapter->link_speed,
 			                           &adapter->link_duplex);
 
-			DPRINTK(LINK, INFO, "NIC Link is Up %d Mbps %s\n",
+			ctrl = E1000_READ_REG(&adapter->hw, CTRL);
+			DPRINTK(LINK, INFO, "NIC Link is Up %d Mbps %s, "
+			       "Flow Control: %s\n",
 			       adapter->link_speed,
 			       adapter->link_duplex == FULL_DUPLEX ?
-			       "Full Duplex" : "Half Duplex");
+			       "Full Duplex" : "Half Duplex",
+			       ((ctrl & E1000_CTRL_TFCE) && (ctrl &
+			       E1000_CTRL_RFCE)) ? "RX/TX" : ((ctrl &
+			       E1000_CTRL_RFCE) ? "RX" : ((ctrl &
+			       E1000_CTRL_TFCE) ? "TX" : "None" )));
 
 			/* tweak tx_queue_len according to speed/duplex
 			 * and adjust the timeout factor */

  parent reply	other threads:[~2006-10-17 21:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-04 17:11 [e1000]: flow control on by default - good idea really? jamal
2006-07-04 19:20 ` jamal
2006-07-05 16:23   ` Auke Kok
2006-07-05 20:37     ` Krzysztof Oledzki
2006-07-05 18:22   ` David Miller
2006-07-05 18:32     ` Auke Kok
2006-07-05 20:45       ` Krzysztof Oledzki
2006-07-05 21:13         ` Auke Kok
2006-07-06 13:03         ` jamal
2006-07-06 18:25           ` Auke Kok
2006-07-07  3:09             ` jamal
2006-07-07  6:59           ` David Miller
2006-07-07 12:28             ` jamal
2006-07-20 20:15               ` Bug in e1000 + semantics of flow control WAS(Re: " jamal
2006-08-03 12:29                 ` jamal
2006-10-16 18:55               ` Auke Kok
2006-10-17 13:05                 ` jamal
2006-10-17 17:18                   ` Auke Kok
2006-10-17 18:25                   ` Stephen Hemminger
2006-10-17 21:02                   ` Auke Kok [this message]
2006-10-18 13:35                     ` jamal
2006-10-18 14:57                       ` Auke Kok
2006-10-17 21:46                   ` David Miller
2006-07-05 16:57 ` Robert Olsson
2006-07-05 18:21 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2006-07-07  4:43 Michael Chan

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=453544EF.4000502@intel.com \
    --to=auke-jan.h.kok@intel.com \
    --cc=Robert.Olsson@data.slu.se \
    --cc=davem@davemloft.net \
    --cc=greearb@candelatech.com \
    --cc=hadi@cyberus.ca \
    --cc=jesse.brandeburg@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=john.ronciak@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=olel@ans.pl \
    /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 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.