Netdev List
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: s.munaut@intopix.com
Cc: netdev@vger.kernel.org
Subject: Re: Hardware flow control on RTL8169
Date: Mon, 8 May 2006 21:46:25 +0200	[thread overview]
Message-ID: <20060508194625.GA15174@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <1147099047.445f57a7874d4@ssl0.ovh.net>

s.munaut@intopix.com <s.munaut@intopix.com> :
[...]
> I'm using a kurobox (www.kurobox.com) with a 2.6.15 kernel and I'd like to use
> hardware flow control with it. However it seems the driver doesn't support it,
> is that correct ?
> 
> At least I see the device continue sending even when the other device is
> sending PAUSE frames with 0xffff pausetime continuously.
> 
> I've tried adding RTL_W16(TBI_ANAR, 0x00a0); to the hw_start function but
> that doesn't seem to have any effect ...
> 
> Any clue ?

- use netdev@vger.kernel.org instead of netdev@oss.sgi.com
- don't trim the Cc: (just a remainder...);
- try the hack below with and without the first hunk. Use 'ethtool -s ethX'
  to see what the device reports. It may not settle immediately.

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 0ad3310..bc702be 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -769,6 +769,8 @@ static int rtl8169_set_speed_xmii(struct
 			auto_nego &= ~(PHY_Cap_10_Half | PHY_Cap_100_Half);
 	}
 
+	auto_nego |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
+
 	tp->phy_auto_nego_reg = auto_nego;
 	tp->phy_1000_ctrl_reg = giga_ctrl;
 
@@ -960,6 +962,11 @@ static void rtl8169_gset_xmii(struct net
 	else if (status & _10bps)
 		cmd->speed = SPEED_10;
 
+	if (status & TxFlowCtrl)
+		cmd->advertising |= ADVERTISED_Asym_Pause;
+	if (status & RxFlowCtrl)
+		cmd->advertising |= ADVERTISED_Pause;
+
 	cmd->duplex = ((status & _1000bpsF) || (status & FullDup)) ?
 		      DUPLEX_FULL : DUPLEX_HALF;
 }

       reply	other threads:[~2006-05-08 19:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1147099047.445f57a7874d4@ssl0.ovh.net>
2006-05-08 19:46 ` Francois Romieu [this message]
2006-05-10 13:13   ` Hardware flow control on RTL8169 s.munaut

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=20060508194625.GA15174@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=netdev@vger.kernel.org \
    --cc=s.munaut@intopix.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