aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2006-05-14 12:42:14 +0200
committerFrancois Romieu <romieu@electric-eye.fr.zoreil.com>2006-07-26 23:23:13 +0200
commit623a1593c84afb86b2f496a56fb4ec37f82b5c78 (patch)
treea2b1334700c59aaa078aaec74d928ab58590be50 /drivers/net
parent9dccf61112e6755f4e6f154c1794bab3c509bc71 (diff)
downloadkernel_samsung_crespo-623a1593c84afb86b2f496a56fb4ec37f82b5c78.zip
kernel_samsung_crespo-623a1593c84afb86b2f496a56fb4ec37f82b5c78.tar.gz
kernel_samsung_crespo-623a1593c84afb86b2f496a56fb4ec37f82b5c78.tar.bz2
r8169: hardware flow control
The datasheet suggests that the device handles the hardware flow control almost automagically. User report a different story, so let's try to twiddle the mii registers. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/r8169.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index ea4f9f7..3424b3c 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -771,6 +771,8 @@ static int rtl8169_set_speed_xmii(struct net_device *dev,
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;
@@ -962,6 +964,11 @@ static void rtl8169_gset_xmii(struct net_device *dev, struct ethtool_cmd *cmd)
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;
}