aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-10-17 13:24:04 -0400
committerStephen Hemminger <shemminger@osdl.org>2006-10-17 13:24:04 -0400
commit709c6e7bb07411176ef9ef660242b1e59fc87a6f (patch)
tree429b3ac2178cc3a9c437d739253b9c31da230621 /drivers/net/sky2.c
parentebc646f681a6ad5a81989a6906832e82155df283 (diff)
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.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 2747e2f74dcb..88b12e856649 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)
384 adv |= PHY_M_AN_10_FD; 384 adv |= PHY_M_AN_10_FD;
385 if (sky2->advertising & ADVERTISED_10baseT_Half) 385 if (sky2->advertising & ADVERTISED_10baseT_Half)
386 adv |= PHY_M_AN_10_HD; 386 adv |= PHY_M_AN_10_HD;
387
388 /* desired flow control */
389 if (sky2->tx_pause && sky2->rx_pause) /* both */
390 adv |= PHY_M_AN_PC | PHY_M_AN_ASP;
391 else if (sky2->tx_pause)
392 adv |= PHY_M_AN_ASP;
393 else if (sky2->rx_pause)
394 adv |= PHY_M_AN_PC;
395
396
387 } else { /* special defines for FIBER (88E1040S only) */ 397 } else { /* special defines for FIBER (88E1040S only) */
388 if (sky2->advertising & ADVERTISED_1000baseT_Full) 398 if (sky2->advertising & ADVERTISED_1000baseT_Full)
389 adv |= PHY_M_AN_1000X_AFD; 399 adv |= PHY_M_AN_1000X_AFD;
390 if (sky2->advertising & ADVERTISED_1000baseT_Half) 400 if (sky2->advertising & ADVERTISED_1000baseT_Half)
391 adv |= PHY_M_AN_1000X_AHD; 401 adv |= PHY_M_AN_1000X_AHD;
392 }
393 402
394 /* Set Flow-control capabilities */ 403 if (sky2->tx_pause && sky2->rx_pause) /* both */
395 if (sky2->tx_pause && sky2->rx_pause) 404 adv |= PHY_M_P_BOTH_MD_X;
396 adv |= PHY_AN_PAUSE_CAP; /* symmetric */ 405 else if (sky2->tx_pause)
397 else if (sky2->rx_pause && !sky2->tx_pause) 406 adv |= PHY_M_P_ASYM_MD_X;
398 adv |= PHY_AN_PAUSE_ASYM | PHY_AN_PAUSE_CAP; 407 else if (sky2->rx_pause)
399 else if (!sky2->rx_pause && sky2->tx_pause) 408 adv |= PHY_M_P_SYM_MD_X;
400 adv |= PHY_AN_PAUSE_ASYM; /* local */ 409 else
410 adv |= PHY_M_P_NO_PAUSE_X;
411 }
401 412
402 /* Restart Auto-negotiation */ 413 /* Restart Auto-negotiation */
403 ctrl |= PHY_CT_ANE | PHY_CT_RE_CFG; 414 ctrl |= PHY_CT_ANE | PHY_CT_RE_CFG;