* [PATCH] r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown
@ 2009-11-24 18:26 Ivan Vecera
2009-11-29 8:21 ` David Miller
2009-11-30 7:13 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Ivan Vecera @ 2009-11-24 18:26 UTC (permalink / raw)
To: netdev; +Cc: romieu
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>
---
drivers/net/r8169.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index b9221bd..0fe2fc9 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)
flush_scheduled_work();
unregister_netdev(dev);
+
+ /* restore original MAC address */
+ rtl_rar_set(tp, dev->perm_addr);
+
rtl_disable_msi(pdev, tp);
rtl8169_release_board(pdev, dev, tp->mmio_addr);
pci_set_drvdata(pdev, NULL);
@@ -4881,6 +4885,9 @@ static void rtl_shutdown(struct pci_dev *pdev)
rtl8169_net_suspend(dev);
+ /* restore original MAC address */
+ rtl_rar_set(tp, dev->perm_addr);
+
spin_lock_irq(&tp->lock);
rtl8169_asic_down(ioaddr);
--
1.6.4.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown
2009-11-24 18:26 [PATCH] r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown Ivan Vecera
@ 2009-11-29 8:21 ` David Miller
2009-11-29 14:39 ` François romieu
2009-11-30 7:13 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2009-11-29 8:21 UTC (permalink / raw)
To: ivecera; +Cc: netdev, romieu
From: Ivan Vecera <ivecera@redhat.com>
Date: Tue, 24 Nov 2009 19:26:06 +0100
> 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>
Francois, any comments?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown
2009-11-29 8:21 ` David Miller
@ 2009-11-29 14:39 ` François romieu
2009-11-30 7:13 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: François romieu @ 2009-11-29 14:39 UTC (permalink / raw)
To: David Miller; +Cc: ivecera, netdev
The Sun, Nov 29, 2009 at 12:21:57AM -0800, David Miller wrote :
[...]
> Francois, any comments?
It is low risk and manageable. Go for it.
The setup of my new internet connection is proving slower than expected.
I am not terribly helpful yet.
--
Ueimor
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown
2009-11-24 18:26 [PATCH] r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown Ivan Vecera
2009-11-29 8:21 ` David Miller
@ 2009-11-30 7:13 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2009-11-30 7:13 UTC (permalink / raw)
To: ivecera; +Cc: netdev, romieu
From: Ivan Vecera <ivecera@redhat.com>
Date: Tue, 24 Nov 2009 19:26:06 +0100
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown
2009-11-29 14:39 ` François romieu
@ 2009-11-30 7:13 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2009-11-30 7:13 UTC (permalink / raw)
To: romieu; +Cc: ivecera, netdev
From: Fran^[$(D+.^[(Bois romieu <romieu@zoreil.com>
Date: Sun, 29 Nov 2009 15:39:02 +0100
> The Sun, Nov 29, 2009 at 12:21:57AM -0800, David Miller wrote :
> [...]
>> Francois, any comments?
>
> It is low risk and manageable. Go for it.
Ok, thanks for the review.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-11-30 7:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-24 18:26 [PATCH] r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown Ivan Vecera
2009-11-29 8:21 ` David Miller
2009-11-29 14:39 ` François romieu
2009-11-30 7:13 ` David Miller
2009-11-30 7:13 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.