Bug 11358 - net: forcedeth call restore mac addr in nv_shutdown path
Summary: net: forcedeth call restore mac addr in nv_shutdown path
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jeff Garzik
URL:
Keywords:
Depends on:
Blocks: 7216 Regressions-2.6.26
  Show dependency tree
 
Reported: 2008-08-17 05:43 UTC by Rafael J. Wysocki
Modified: 2008-09-20 08:36 UTC (History)
0 users

See Also:
Kernel Version: commit f735a2a1a4f2a0f5cd823ce323e82675990469e2
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description Rafael J. Wysocki 2008-08-17 05:43:19 UTC
Subject    : [PATCH] net: forcedeth call restore mac addr in nv_shutdown path -v2
Submitter  : Yinghai Lu <yhlu.kernel@gmail.com>
Date       : 2008-08-17 3:30
References : http://marc.info/?l=linux-kernel&m=121894389018584&w=4
Handled-By : Yinghai Lu <yhlu.kernel@gmail.com>
Patch      : http://marc.info/?l=linux-kernel&m=121894389018584&w=4

This entry is being used for tracking a regression from 2.6.26.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 Rafael J. Wysocki 2008-08-17 05:45:22 UTC
Caused by:

commit f735a2a1a4f2a0f5cd823ce323e82675990469e2
Author: Tobias Diedrich <ranma+kernel@tdiedrich.de>
Date:   Sun May 18 15:02:37 2008 +0200

    [netdrvr] forcedeth: setup wake-on-lan before shutting down

    Signed-off-by: Tobias Diedrich <ranma+kernel@tdiedrich.de>
    Signed-off-by: Jeff Garzik <jeff@garzik.org>
Comment 2 Rafael J. Wysocki 2008-08-31 04:35:45 UTC
On Sunday, 31 of August 2008, Tobias Diedrich wrote:
> Rafael J. Wysocki wrote:
> > Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=11358
> > Subject             : net: forcedeth call restore mac addr in nv_shutdown
> path
> > Submitter   : Yinghai Lu <yhlu.kernel@gmail.com>
> > Date                : 2008-08-17 3:30 (14 days old)
> > References  : http://marc.info/?l=linux-kernel&m=121894389018584&w=4
> > Handled-By  : Yinghai Lu <yhlu.kernel@gmail.com>
> > Patch               :
> http://marc.info/?l=linux-kernel&m=121894389018584&w=4
> 
> I got around to try kexec and found that on 2.6.27-rc5, without
> Yinghai Lu's patch, when I kexec while forecdeth is loaded I get the
> following when the new kernel tries to load the module (on my Asus
> M2N-SLI Deluxe):
> 
> |Aug 31 10:10:42 melchior kernel: [   10.578053] forcedeth: Reverse
> Engineered nForce ethernet driver. Version 0.61.
> |Aug 31 10:10:42 melchior kernel: [   10.578256] forcedeth 0000:00:08.0: BAR
> 0: error updating (0xfe02a000 != 0x000000)
> |Aug 31 10:10:42 melchior kernel: [   10.580901] forcedeth 0000:00:08.0:
> enabling device (0000 -> 0003)
> |Aug 31 10:10:42 melchior kernel: [   10.581405] ACPI: PCI Interrupt Link
> [APCH] enabled at IRQ 22
> |Aug 31 10:10:42 melchior kernel: [   10.581509] forcedeth 0000:00:08.0: PCI
> INT A -> Link[APCH] -> GSI 22 (level, low) -> IRQ 22
> |Aug 31 10:10:42 melchior kernel: [   10.581699] forcedeth 0000:00:08.0:
> setting latency timer to 64
> |Aug 31 10:10:42 melchior kernel: [   10.581748] forcedeth 0000:00:08.0:
> Invalid Mac address detected: ff:ff:ff:ff:ff:ff
> |Aug 31 10:10:42 melchior kernel: [   10.581936] forcedeth 0000:00:08.0:
> Please complain to your hardware vendor. Switching to a random MAC.
> |Aug 31 10:10:42 melchior kernel: [   15.981960] forcedeth 0000:00:08.0:
> open: Could not find a valid PHY.
> |Aug 31 10:10:42 melchior kernel: [   15.982131] forcedeth 0000:00:08.0: PCI
> INT A disabled
> |Aug 31 10:10:42 melchior kernel: [   15.982283] forcedeth: probe of
> 0000:00:08.0 failed with error -12
> |Aug 31 10:10:42 melchior kernel: [   16.017545] forcedeth 0000:00:09.0: BAR
> 0: error updating (0xfe027000 != 0x000000)
> |Aug 31 10:10:42 melchior kernel: [   16.017766] forcedeth 0000:00:09.0:
> enabling device (0000 -> 0003)
> |Aug 31 10:10:42 melchior kernel: [   16.018720] ACPI: PCI Interrupt Link
> [AMC1] enabled at IRQ 21
> |Aug 31 10:10:42 melchior kernel: [   16.018839] forcedeth 0000:00:09.0: PCI
> INT A -> Link[AMC1] -> GSI 21 (level, low) -> IRQ 21
> |Aug 31 10:10:42 melchior kernel: [   16.019050] forcedeth 0000:00:09.0:
> setting latency timer to 64
> |Aug 31 10:10:42 melchior kernel: [   16.019129] forcedeth 0000:00:09.0:
> Invalid Mac address detected: ff:ff:ff:ff:ff:ff
> |Aug 31 10:10:42 melchior kernel: [   16.019339] forcedeth 0000:00:09.0:
> Please complain to your hardware vendor. Switching to a random MAC.
> |Aug 31 10:10:42 melchior kernel: [   21.399400] forcedeth 0000:00:09.0:
> open: Could not find a valid PHY.
> |Aug 31 10:10:42 melchior kernel: [   21.399572] forcedeth 0000:00:09.0: PCI
> INT A disabled
> |Aug 31 10:10:42 melchior kernel: [   21.399723] forcedeth: probe of
> 0000:00:09.0 failed with error -12
> 
> If I rmmod forcedeth before kexec, it loads fine later.
> This is with MSI enabled:
> |           CPU0       
> |  0:         99   IO-APIC-edge      timer
> |  1:          2   IO-APIC-edge      i8042
> |  7:          1   IO-APIC-edge    
> |  8:          1   IO-APIC-edge      rtc
> |  9:          0   IO-APIC-fasteoi   acpi
> | 12:          3   IO-APIC-edge      i8042
> | 14:         53   IO-APIC-edge      pata_amd
> | 15:          0   IO-APIC-edge      pata_amd
> | 16:      76975   IO-APIC-fasteoi   ahci, radeon@pci:0000:02:00.0
> | 18:          0   IO-APIC-fasteoi   EMU10K1
> | 20:          6   IO-APIC-fasteoi   ehci_hcd:usb1
> | 21:         54   IO-APIC-fasteoi   sata_nv
> | 22:          0   IO-APIC-fasteoi   sata_nv
> | 23:      11230   IO-APIC-fasteoi   sata_nv, ohci_hcd:usb2
> |284:      81038   PCI-MSI-edge      eth1
> |285:      74728   PCI-MSI-edge      eth0
> |NMI:          0   Non-maskable interrupts
> |LOC:      29209   Local timer interrupts
> |TRM:          0   Thermal event interrupts
> |THR:          0   Threshold APIC interrupts
> |SPU:          0   Spurious interrupts
> |ERR:          1
> 
> Maybe also calling nv_restore_phy() and/or pci_release_regions() in
> the shutdown hook would help.
> 
> TODO:
> Try with the patch, maybe try nv_restore_phy, test if WOL is
> affected by the patch.
Comment 3 Stephen Hemminger 2008-09-16 12:12:09 UTC
Already fixed by?

    forcedeth: fix kexec regression
    
    Fix regression tracked as http://bugzilla.kernel.org/show_bug.cgi?id=11361
    and caused by commit f735a2a1a4f2a0f5cd823ce323e82675990469e2 ("[netdrvr]
    forcedeth: setup wake-on-lan before shutting down") that makes network
    adapters integrated into the NVidia MCP55 chipsets fail to work in kexeced
    kernels.  The problem appears to be that if the adapter is put into D3_hot
    during ->shutdown(), it cannot be brought back into D0 after kexec (ref.
    http://marc.info/?l=linux-kernel&m=121900062814967&w=4).  Therefore, only
    put forcedeth into D3 during ->shutdown() if the system is to be powered
    off.
    
Comment 4 Jeff Garzik 2008-09-16 12:21:12 UTC
Ping?
Comment 5 Rafael J. Wysocki 2008-09-16 22:12:42 UTC
No, this is another one.  The patch from http://marc.info/?l=linux-kernel&m=121894389018584&w=4 is needed to fix it in addition to the "forcedeth: fix kexec regression" patch.

Note You need to log in before you can comment on or make changes to this bug.