[Bug #11358] net: forcedeth call restore mac addr in nv_shutdown path

[Bug #11358] net: forcedeth call restore mac addr in nv_shutdown path

Post by Tobias Die » Mon, 01 Sep 2008 18:20:06


afael J. Wysocki wrote:

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-ed
 
 
 

[Bug #11358] net: forcedeth call restore mac addr in nv_shutdown path

Post by Tobias Die » Mon, 01 Sep 2008 22:10:09

obias Diedrich wrote:
[...]

I just tried with the patch and both options above in the shutdown
path and the kexec'd kernel still had the same problems as above.

Interestingly the message comes from drivers/pci/setup-res.c, where
it updates the BAR register and reads it back to make sure it was
updated and somehow reads back zeroes?

I wonder what's going on there, that should never happen AFAIK...
Maybe the pci device was not properly reenabled, but OTOH when I
just rmmod before kexec it seems to work and nv_remove also calls
pci_disable_device()...

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.27-rc5
# Sat Aug 30 09:46:25 2008
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
# CONFIG_GENERIC_LOCKBREAK is not set
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_FAST_CMPXCHG_LOCAL=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
# CONFIG_GENERIC_GPIO is not set
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ZONE_DMA32=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_AUDIT_ARCH=y
CONFIG_ARCH_SUPPORTS_AOUT=y
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_X86_TRAMPOLINE=y
# CONFIG_KTIME_SCALAR is not set
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_POSIX_MQUEUE is not set
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
# CONFIG_CGROUPS is not set
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
# CONFIG_GROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_RELAY is not set
# CONFIG_NAMESPACES is not set
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_EMBEDDED=y
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
# CONFIG_PCSPKR_PLATFORM is not set
# CONFIG_COMPAT_BRK is not set
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
# CONFIG_PROFILING is not set
# CONFIG_MARKERS is not s