Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39773
b: refs/heads/master
c: 709c6e7
h: refs/heads/master
i:
  39771: 6794406
v: v3
  • Loading branch information
Stephen Hemminger committed Oct 17, 2006
1 parent fa943ca commit dba8026
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ebc646f681a6ad5a81989a6906832e82155df283
refs/heads/master: 709c6e7bb07411176ef9ef660242b1e59fc87a6f
27 changes: 19 additions & 8 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dba8026

Please sign in to comment.