Skip to contentSkip to conversation

Hardware flow control on RTL8169

DISCUSSION Francois Romieu 2 participants 2 messages May 8, 2006 – May 10, 2006 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

[email protected] <[email protected]> :
[...]

Quoted 11 lines

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 [email protected] instead of [email protected]
- 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.

drivers/net/r8169.c +7 -0
index 0ad3310..bc702be 100644
@@ -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;
 }
#2 lore raw

Hi Francois,

Selon Francois Romieu <[email protected]>:

Quoted 11 lines

[email protected] <[email protected]> :
[...]

Quoted 1 line

I'm using a kurobox (www.kurobox.com) with a 2.6.15 kernel and I'd like to

use

Quoted 1 line

hardware flow control with it. However it seems the driver doesn't support

it,

Quoted 5 lines

is that correct ?

At least I see the device continue sending even when the other device is sending PAUSE frames with 0xffff pausetime continuously.

Quoted 6 lines
Quoted 4 lines

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 [email protected] instead of [email protected]

Sorry about that ... I don't know what version of MAINTAINER I looked at to come up with that address ...

Quoted 5 lines

- 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 snipped...]

Thanks, I'll try that.

Regards,

Sylvain