Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278800
b: refs/heads/master
c: f88788f
h: refs/heads/master
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Dec 15, 2011
1 parent 1eef5d3 commit 9c5a7f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 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: 55086ad95d740577def0b4e6ecc2c0ae9b0d6dec
refs/heads/master: f88788f0da6326cbcaa837e12c8c074027891f07
22 changes: 3 additions & 19 deletions trunk/drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1671,22 +1671,6 @@ static void tg3_link_report(struct tg3 *tp)
}
}

static u16 tg3_advert_flowctrl_1000T(u8 flow_ctrl)
{
u16 miireg;

if ((flow_ctrl & FLOW_CTRL_TX) && (flow_ctrl & FLOW_CTRL_RX))
miireg = ADVERTISE_PAUSE_CAP;
else if (flow_ctrl & FLOW_CTRL_TX)
miireg = ADVERTISE_PAUSE_ASYM;
else if (flow_ctrl & FLOW_CTRL_RX)
miireg = ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
else
miireg = 0;

return miireg;
}

static u16 tg3_advert_flowctrl_1000X(u8 flow_ctrl)
{
u16 miireg;
Expand Down Expand Up @@ -1787,7 +1771,7 @@ static void tg3_adjust_link(struct net_device *dev)
if (phydev->duplex == DUPLEX_HALF)
mac_mode |= MAC_MODE_HALF_DUPLEX;
else {
lcl_adv = tg3_advert_flowctrl_1000T(
lcl_adv = mii_advertise_flowctrl(
tp->link_config.flowctrl);

if (phydev->pause)
Expand Down Expand Up @@ -3589,7 +3573,7 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl)

new_adv = ADVERTISE_CSMA;
new_adv |= ethtool_adv_to_mii_adv_t(advertise) & ADVERTISE_ALL;
new_adv |= tg3_advert_flowctrl_1000T(flowctrl);
new_adv |= mii_advertise_flowctrl(flowctrl);

err = tg3_writephy(tp, MII_ADVERTISE, new_adv);
if (err)
Expand Down Expand Up @@ -3777,7 +3761,7 @@ static bool tg3_phy_copper_an_config_ok(struct tg3 *tp, u32 *lcladv)

advmsk = ADVERTISE_ALL;
if (tp->link_config.active_duplex == DUPLEX_FULL) {
tgtadv |= tg3_advert_flowctrl_1000T(tp->link_config.flowctrl);
tgtadv |= mii_advertise_flowctrl(tp->link_config.flowctrl);
advmsk |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
}

Expand Down

0 comments on commit 9c5a7f4

Please sign in to comment.