aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/r8169.c
diff options
context:
space:
mode:
authorIvan Vecera <ivecera@redhat.com>2009-11-30 02:12:52 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-30 02:12:52 -0500
commitcc098dc705895f6b0109b7e8e026ac2b8ae1c0a1 (patch)
tree5fa899594290d93f7b0a9d72d1ab94e88b84ef70 /drivers/net/r8169.c
parentbbf31bf18d34caa87dd01f08bf713635593697f2 (diff)
r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown
The newer chipsets (all PCI-E) are known that they need full power cycle (AC or battery removal) to reset MAC address to a hardwired one. Previous patch to address this problem loads the original MAC address from EEPROM. But it brought other problem for which it is necessary to introduce a new module parameter. However, it might suffice to restore the initial MAC address before shutdown/reboot/kexec and when removing the module. Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r--drivers/net/r8169.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index b9221bdc7184..0fe2fc90f207 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3235,6 +3235,10 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev)
3235 flush_scheduled_work(); 3235 flush_scheduled_work();
3236 3236
3237 unregister_netdev(dev); 3237 unregister_netdev(dev);
3238
3239 /* restore original MAC address */
3240 rtl_rar_set(tp, dev->perm_addr);
3241
3238 rtl_disable_msi(pdev, tp); 3242 rtl_disable_msi(pdev, tp);
3239 rtl8169_release_board(pdev, dev, tp->mmio_addr); 3243 rtl8169_release_board(pdev, dev, tp->mmio_addr);
3240 pci_set_drvdata(pdev, NULL); 3244 pci_set_drvdata(pdev, NULL);
@@ -4881,6 +4885,9 @@ static void rtl_shutdown(struct pci_dev *pdev)
4881 4885
4882 rtl8169_net_suspend(dev); 4886 rtl8169_net_suspend(dev);
4883 4887
4888 /* restore original MAC address */
4889 rtl_rar_set(tp, dev->perm_addr);
4890
4884 spin_lock_irq(&tp->lock); 4891 spin_lock_irq(&tp->lock);
4885 4892
4886 rtl8169_asic_down(ioaddr); 4893 rtl8169_asic_down(ioaddr);