diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index a30734061700..0ccfb63d3ac1 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -5732,9 +5732,23 @@ static int tg3_set_mac_addr(struct net_device *dev, void *p) | |||
5732 | if (!netif_running(dev)) | 5732 | if (!netif_running(dev)) |
5733 | return 0; | 5733 | return 0; |
5734 | 5734 | ||
5735 | spin_lock_bh(&tp->lock); | 5735 | if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) { |
5736 | __tg3_set_mac_addr(tp); | 5736 | /* Reset chip so that ASF can re-init any MAC addresses it |
5737 | spin_unlock_bh(&tp->lock); | 5737 | * needs. |
5738 | */ | ||
5739 | tg3_netif_stop(tp); | ||
5740 | tg3_full_lock(tp, 1); | ||
5741 | |||
5742 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); | ||
5743 | tg3_init_hw(tp); | ||
5744 | |||
5745 | tg3_netif_start(tp); | ||
5746 | tg3_full_unlock(tp); | ||
5747 | } else { | ||
5748 | spin_lock_bh(&tp->lock); | ||
5749 | __tg3_set_mac_addr(tp); | ||
5750 | spin_unlock_bh(&tp->lock); | ||
5751 | } | ||
5738 | 5752 | ||
5739 | return 0; | 5753 | return 0; |
5740 | } | 5754 | } |