Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184195
b: refs/heads/master
c: beb499a
h: refs/heads/master
i:
  184193: 3bae748
  184191: 755627a
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Feb 16, 2010
1 parent 07874b9 commit 9c491aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 26 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: 5726026bfffa13e9b1098d7bc177618cbbaa9388
refs/heads/master: beb499afe3c9c006bb2d66ceaff0f354d0405ff4
33 changes: 8 additions & 25 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -6751,32 +6751,15 @@ bnx2_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
if (cmd->autoneg == AUTONEG_ENABLE) {
autoneg |= AUTONEG_SPEED;

cmd->advertising &= ETHTOOL_ALL_COPPER_SPEED;

/* allow advertising 1 speed */
if ((cmd->advertising == ADVERTISED_10baseT_Half) ||
(cmd->advertising == ADVERTISED_10baseT_Full) ||
(cmd->advertising == ADVERTISED_100baseT_Half) ||
(cmd->advertising == ADVERTISED_100baseT_Full)) {

if (cmd->port == PORT_FIBRE)
goto err_out_unlock;

advertising = cmd->advertising;

} else if (cmd->advertising == ADVERTISED_2500baseX_Full) {
if (!(bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE) ||
(cmd->port == PORT_TP))
goto err_out_unlock;
} else if (cmd->advertising == ADVERTISED_1000baseT_Full)
advertising = cmd->advertising;
else if (cmd->advertising == ADVERTISED_1000baseT_Half)
goto err_out_unlock;
else {
if (cmd->port == PORT_FIBRE)
advertising = ETHTOOL_ALL_FIBRE_SPEED;
else
advertising = cmd->advertising;
if (cmd->port == PORT_TP) {
advertising &= ETHTOOL_ALL_COPPER_SPEED;
if (!advertising)
advertising = ETHTOOL_ALL_COPPER_SPEED;
} else {
advertising &= ETHTOOL_ALL_FIBRE_SPEED;
if (!advertising)
advertising = ETHTOOL_ALL_FIBRE_SPEED;
}
advertising |= ADVERTISED_Autoneg;
}
Expand Down

0 comments on commit 9c491aa

Please sign in to comment.