diff options
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r-- | drivers/net/skge.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 2e26dced13a1..43f4c730be42 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -319,6 +319,7 @@ static int skge_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
319 | struct skge_port *skge = netdev_priv(dev); | 319 | struct skge_port *skge = netdev_priv(dev); |
320 | const struct skge_hw *hw = skge->hw; | 320 | const struct skge_hw *hw = skge->hw; |
321 | u32 supported = skge_supported_modes(hw); | 321 | u32 supported = skge_supported_modes(hw); |
322 | int err = 0; | ||
322 | 323 | ||
323 | if (ecmd->autoneg == AUTONEG_ENABLE) { | 324 | if (ecmd->autoneg == AUTONEG_ENABLE) { |
324 | ecmd->advertising = supported; | 325 | ecmd->advertising = supported; |
@@ -367,8 +368,14 @@ static int skge_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
367 | skge->autoneg = ecmd->autoneg; | 368 | skge->autoneg = ecmd->autoneg; |
368 | skge->advertising = ecmd->advertising; | 369 | skge->advertising = ecmd->advertising; |
369 | 370 | ||
370 | if (netif_running(dev)) | 371 | if (netif_running(dev)) { |
371 | skge_phy_reset(skge); | 372 | skge_down(dev); |
373 | err = skge_up(dev); | ||
374 | if (err) { | ||
375 | dev_close(dev); | ||
376 | return err; | ||
377 | } | ||
378 | } | ||
372 | 379 | ||
373 | return (0); | 380 | return (0); |
374 | } | 381 | } |
@@ -494,7 +501,7 @@ static int skge_set_ring_param(struct net_device *dev, | |||
494 | struct ethtool_ringparam *p) | 501 | struct ethtool_ringparam *p) |
495 | { | 502 | { |
496 | struct skge_port *skge = netdev_priv(dev); | 503 | struct skge_port *skge = netdev_priv(dev); |
497 | int err; | 504 | int err = 0; |
498 | 505 | ||
499 | if (p->rx_pending == 0 || p->rx_pending > MAX_RX_RING_SIZE || | 506 | if (p->rx_pending == 0 || p->rx_pending > MAX_RX_RING_SIZE || |
500 | p->tx_pending < TX_LOW_WATER || p->tx_pending > MAX_TX_RING_SIZE) | 507 | p->tx_pending < TX_LOW_WATER || p->tx_pending > MAX_TX_RING_SIZE) |
@@ -510,7 +517,7 @@ static int skge_set_ring_param(struct net_device *dev, | |||
510 | dev_close(dev); | 517 | dev_close(dev); |
511 | } | 518 | } |
512 | 519 | ||
513 | return 0; | 520 | return err; |
514 | } | 521 | } |
515 | 522 | ||
516 | static u32 skge_get_msglevel(struct net_device *netdev) | 523 | static u32 skge_get_msglevel(struct net_device *netdev) |
@@ -593,6 +600,7 @@ static int skge_set_pauseparam(struct net_device *dev, | |||
593 | { | 600 | { |
594 | struct skge_port *skge = netdev_priv(dev); | 601 | struct skge_port *skge = netdev_priv(dev); |
595 | struct ethtool_pauseparam old; | 602 | struct ethtool_pauseparam old; |
603 | int err = 0; | ||
596 | 604 | ||
597 | skge_get_pauseparam(dev, &old); | 605 | skge_get_pauseparam(dev, &old); |
598 | 606 | ||
@@ -609,8 +617,14 @@ static int skge_set_pauseparam(struct net_device *dev, | |||
609 | skge->flow_control = FLOW_MODE_NONE; | 617 | skge->flow_control = FLOW_MODE_NONE; |
610 | } | 618 | } |
611 | 619 | ||
612 | if (netif_running(dev)) | 620 | if (netif_running(dev)) { |
613 | skge_phy_reset(skge); | 621 | skge_down(dev); |
622 | err = skge_up(dev); | ||
623 | if (err) { | ||
624 | dev_close(dev); | ||
625 | return err; | ||
626 | } | ||
627 | } | ||
614 | 628 | ||
615 | return 0; | 629 | return 0; |
616 | } | 630 | } |