diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-10-17 10:24:04 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@osdl.org> | 2006-10-17 10:24:04 -0700 |
commit | 709c6e7bb07411176ef9ef660242b1e59fc87a6f (patch) | |
tree | 429b3ac2178cc3a9c437d739253b9c31da230621 /drivers/net/sky2.c | |
parent | ebc646f681a6ad5a81989a6906832e82155df283 (diff) | |
download | kernel-crypto-709c6e7bb07411176ef9ef660242b1e59fc87a6f.tar.gz kernel-crypto-709c6e7bb07411176ef9ef660242b1e59fc87a6f.tar.xz kernel-crypto-709c6e7bb07411176ef9ef660242b1e59fc87a6f.zip |
sky2: fiber pause bits
The advertisement bits for flow control are located in
different location on fiber (1000baseX)
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 2747e2f74dc..88b12e85664 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -384,20 +384,31 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) adv |= PHY_M_AN_10_FD; if (sky2->advertising & ADVERTISED_10baseT_Half) adv |= PHY_M_AN_10_HD; + + /* desired flow control */ + if (sky2->tx_pause && sky2->rx_pause) /* both */ + adv |= PHY_M_AN_PC | PHY_M_AN_ASP; + else if (sky2->tx_pause) + adv |= PHY_M_AN_ASP; + else if (sky2->rx_pause) + adv |= PHY_M_AN_PC; + + } else { /* special defines for FIBER (88E1040S only) */ if (sky2->advertising & ADVERTISED_1000baseT_Full) adv |= PHY_M_AN_1000X_AFD; if (sky2->advertising & ADVERTISED_1000baseT_Half) adv |= PHY_M_AN_1000X_AHD; - } - /* Set Flow-control capabilities */ - if (sky2->tx_pause && sky2->rx_pause) - adv |= PHY_AN_PAUSE_CAP; /* symmetric */ - else if (sky2->rx_pause && !sky2->tx_pause) - adv |= PHY_AN_PAUSE_ASYM | PHY_AN_PAUSE_CAP; - else if (!sky2->rx_pause && sky2->tx_pause) - adv |= PHY_AN_PAUSE_ASYM; /* local */ + if (sky2->tx_pause && sky2->rx_pause) /* both */ + adv |= PHY_M_P_BOTH_MD_X; + else if (sky2->tx_pause) + adv |= PHY_M_P_ASYM_MD_X; + else if (sky2->rx_pause) + adv |= PHY_M_P_SYM_MD_X; + else + adv |= PHY_M_P_NO_PAUSE_X; + } /* Restart Auto-negotiation */ ctrl |= PHY_CT_ANE | PHY_CT_RE_CFG; |