diff options
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index ad61cfd2a9ba..e9cfb02bf551 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -6215,6 +6215,12 @@ bnx2_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
6215 | !(bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP)) | 6215 | !(bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP)) |
6216 | goto err_out_unlock; | 6216 | goto err_out_unlock; |
6217 | 6217 | ||
6218 | /* If device is down, we can store the settings only if the user | ||
6219 | * is setting the currently active port. | ||
6220 | */ | ||
6221 | if (!netif_running(dev) && cmd->port != bp->phy_port) | ||
6222 | goto err_out_unlock; | ||
6223 | |||
6218 | if (cmd->autoneg == AUTONEG_ENABLE) { | 6224 | if (cmd->autoneg == AUTONEG_ENABLE) { |
6219 | autoneg |= AUTONEG_SPEED; | 6225 | autoneg |= AUTONEG_SPEED; |
6220 | 6226 | ||
@@ -6272,7 +6278,12 @@ bnx2_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
6272 | bp->req_line_speed = req_line_speed; | 6278 | bp->req_line_speed = req_line_speed; |
6273 | bp->req_duplex = req_duplex; | 6279 | bp->req_duplex = req_duplex; |
6274 | 6280 | ||
6275 | err = bnx2_setup_phy(bp, cmd->port); | 6281 | err = 0; |
6282 | /* If device is down, the new settings will be picked up when it is | ||
6283 | * brought up. | ||
6284 | */ | ||
6285 | if (netif_running(dev)) | ||
6286 | err = bnx2_setup_phy(bp, cmd->port); | ||
6276 | 6287 | ||
6277 | err_out_unlock: | 6288 | err_out_unlock: |
6278 | spin_unlock_bh(&bp->phy_lock); | 6289 | spin_unlock_bh(&bp->phy_lock); |