Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103514
b: refs/heads/master
c: d6b1448
h: refs/heads/master
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jul 15, 2008
1 parent 84d9a6c commit 0189630
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 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: 925068dcdc746236264d1877d3d5df656e87882a
refs/heads/master: d6b14486953d0e8d1c57db29bf6104cea198b884
13 changes: 12 additions & 1 deletion trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -6215,6 +6215,12 @@ bnx2_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
!(bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP))
goto err_out_unlock;

/* If device is down, we can store the settings only if the user
* is setting the currently active port.
*/
if (!netif_running(dev) && cmd->port != bp->phy_port)
goto err_out_unlock;

if (cmd->autoneg == AUTONEG_ENABLE) {
autoneg |= AUTONEG_SPEED;

Expand Down Expand Up @@ -6272,7 +6278,12 @@ bnx2_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
bp->req_line_speed = req_line_speed;
bp->req_duplex = req_duplex;

err = bnx2_setup_phy(bp, cmd->port);
err = 0;
/* If device is down, the new settings will be picked up when it is
* brought up.
*/
if (netif_running(dev))
err = bnx2_setup_phy(bp, cmd->port);

err_out_unlock:
spin_unlock_bh(&bp->phy_lock);
Expand Down

0 comments on commit 0189630

Please sign in to comment.