* Re: Bcm43xx oops after suspend to disk [not found] <45B92488.6090908@lwfinger.net> @ 2007-01-25 21:46 ` Larry Finger 2007-01-25 23:30 ` roucaries bastien 0 siblings, 1 reply; 12+ messages in thread From: Larry Finger @ 2007-01-25 21:46 UTC (permalink / raw) To: LKML roucaries bastien wrote: > My bcm43xx oops after suspend to disk on a 2.6.20rc5 kernel (preempt+smp). > > --------------- > Jan 25 19:47:39 portablebastien kernel: caller is oops_begin+0xb/0x80 > Jan 25 19:47:39 portablebastien kernel: > Jan 25 19:47:39 portablebastien kernel: Call Trace: > Jan 25 19:47:39 portablebastien kernel: [<ffffffff8033f1eb>] > debug_smp_processor_id+0xab/0xc0 > Jan 25 19:47:39 portablebastien kernel: [<ffffffff8026d52b>] > oops_begin+0xb/0x80 > Jan 25 19:47:39 portablebastien kernel: [<ffffffff8020aee4>] > do_page_fault+0x6e4/0x890 > Jan 25 19:47:39 portablebastien kernel: [<ffffffff8022f383>] > __wake_up+0x43/0x70 > Jan 25 19:47:39 portablebastien kernel: [<ffffffff80269416>] > _spin_unlock_irqrestore+0x16/0x40 > Do you have the log stuff that precedes this part? In particular, was there a assertion that failed? Thanks, Larry ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bcm43xx oops after suspend to disk 2007-01-25 21:46 ` Bcm43xx oops after suspend to disk Larry Finger @ 2007-01-25 23:30 ` roucaries bastien 2007-01-26 15:55 ` Larry Finger 0 siblings, 1 reply; 12+ messages in thread From: roucaries bastien @ 2007-01-25 23:30 UTC (permalink / raw) To: Larry Finger; +Cc: LKML > Do you have the log stuff that precedes this part? In particular, was there a assertion that failed? > It is oops on resume and no asseertion failled this boot. However I have usually a lot of bcm43xx: ASSERTION FAILED (radio_attenuation < 10) at: drivers/net/wireless/bcm43xx/bcm43xx_phy.c:1496:bcm43xx_find_lopair() Moreover after the first oops I have a second oops (Surelly a consequence of the first). ----------------------------------------------------- Jan 25 18:17:06 portablebastien kernel: bcm43xx: PHY connected Jan 25 18:17:06 portablebastien kernel: bcm43xx: Microcode rev 0x118, pl 0x17 (2004-05-06 21:34:00) Jan 25 18:17:06 portablebastien kernel: bcm43xx: Radio turned on Jan 25 18:17:06 portablebastien kernel: bcm43xx: Chip initialized Jan 25 18:17:06 portablebastien kernel: bcm43xx: 32-bit DMA initialized Jan 25 18:17:06 portablebastien kernel: bcm43xx: Keys cleared Jan 25 18:17:06 portablebastien kernel: bcm43xx: Selected 802.11 core (phytype 2) Jan 25 18:17:06 portablebastien kernel: ADDRCONF(NETDEV_UP): eth2: link is not ready Jan 25 18:17:08 portablebastien dhcpd: Internet Systems Consortium DHCP Server V3.0.4 Jan 25 18:17:08 portablebastien dhcpd: Copyright 2004-2006 Internet Systems Consortium. Jan 25 18:17:08 portablebastien dhcpd: All rights reserved. Jan 25 18:17:08 portablebastien dhcpd: For info, please visit http://www.isc.org/sw/dhcp/ Jan 25 18:17:08 portablebastien dhcpd: Internet Systems Consortium DHCP Server V3.0.4 Jan 25 18:17:08 portablebastien dhcpd: Copyright 2004-2006 Internet Systems Consortium. Jan 25 18:17:08 portablebastien dhcpd: All rights reserved. Jan 25 18:17:08 portablebastien dhcpd: For info, please visit http://www.isc.org/sw/dhcp/ Jan 25 18:17:08 portablebastien dhcpd: Wrote 0 deleted host decls to leases file. Jan 25 18:17:08 portablebastien dhcpd: Wrote 0 new dynamic host decls to leases file. Jan 25 18:17:08 portablebastien dhcpd: Wrote 1 leases to leases file. Jan 25 18:20:06 portablebastien kernel: NET: Registered protocol family 4 Jan 25 18:20:06 portablebastien kernel: NET: Registered protocol family 5 Jan 25 18:36:53 portablebastien -- MARK -- Jan 25 18:56:53 portablebastien -- MARK -- Jan 25 19:05:41 portablebastien kernel: Disabling non-boot CPUs ... Jan 25 19:05:41 portablebastien kernel: Cannot set affinity for irq 0 Jan 25 19:05:41 portablebastien kernel: CPU 1 is now offline Jan 25 19:05:41 portablebastien kernel: SMP alternatives: switching to UP code Jan 25 19:46:45 portablebastien kernel: CPU1 is down Jan 25 19:46:45 portablebastien kernel: Stopping tasks ... done. Jan 25 19:46:45 portablebastien kernel: Shrinking memory... ^H-^Hdone (0 pages freed) Jan 25 19:46:45 portablebastien kernel: Freed 0 kbytes in 0.02 seconds (0.00 MB/s) Jan 25 19:46:45 portablebastien kernel: Suspending console(s) Jan 25 19:46:45 portablebastien kernel: bcm43xx: Suspending... Jan 25 19:46:45 portablebastien kernel: bcm43xx: Radio turned off Jan 25 19:46:45 portablebastien kernel: bcm43xx: DMA-32 0x0200 (RX) max used slots: 1/64 Jan 25 19:46:45 portablebastien kernel: bcm43xx: DMA-32 0x02A0 (TX) max used slots: 0/512 Jan 25 19:46:45 portablebastien kernel: bcm43xx: DMA-32 0x0280 (TX) max used slots: 0/512 Jan 25 19:46:45 portablebastien kernel: bcm43xx: DMA-32 0x0260 (TX) max used slots: 0/512 Jan 25 19:46:45 portablebastien kernel: bcm43xx: DMA-32 0x0240 (TX) max used slots: 0/512 Jan 25 19:46:45 portablebastien kernel: bcm43xx: DMA-32 0x0220 (TX) max used slots: 0/512 Jan 25 19:46:45 portablebastien kernel: bcm43xx: DMA-32 0x0200 (TX) max used slots: 0/512 Jan 25 19:46:45 portablebastien kernel: ACPI: PCI interrupt for device 0000:03:03.0 disabled Jan 25 19:46:45 portablebastien kernel: bcm43xx: Device suspended. Jan 25 19:46:45 portablebastien kernel: ACPI: PCI interrupt for device 0000:03:01.2 disabled Jan 25 19:46:45 portablebastien kernel: ohci1394 does not fully support suspend and resume yet Jan 25 19:46:45 portablebastien kernel: ACPI: PCI interrupt for device 0000:00:10.1 disabled Jan 25 19:46:45 portablebastien kernel: ACPI: PCI interrupt for device 0000:00:0b.1 disabled Jan 25 19:46:45 portablebastien kernel: ACPI: PCI interrupt for device 0000:00:0b.0 disabled Jan 25 19:46:45 portablebastien kernel: swsusp: critical section: Jan 25 19:46:45 portablebastien kernel: swsusp: Need to copy 114482 pages Jan 25 19:46:45 portablebastien kernel: PCI: Enabling device 0000:00:0b.0 (0000 -> 0002) Jan 25 19:46:45 portablebastien kernel: ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [LUB0] -> GSI 23 (level, low) -> IRQ 23 Jan 25 19:46:45 portablebastien kernel: ACPI: PCI Interrupt 0000:00:0b.1[B] -> Link [LUB2] -> GSI 22 (level, low) -> IRQ 22 Jan 25 19:46:45 portablebastien kernel: usb usb2: root hub lost power or was reset Jan 25 19:46:45 portablebastien kernel: ehci_hcd 0000:00:0b.1: debug port 1 Jan 25 19:46:45 portablebastien kernel: ACPI: PCI Interrupt 0000:00:10.1[B] -> Link [LAZA] -> GSI 21 (level, low) -> IRQ 21 Jan 25 19:46:45 portablebastien kernel: ohci1394: fw-host0: OHCI-1394 165.165 (PCI): IRQ=[17] MMIO=[df7ff000-df7ff7ff] Max Packet=[65536] IR/IT contexts=[4/4] Jan 25 19:46:45 portablebastien kernel: ACPI: PCI Interrupt 0000:03:01.2[C] -> Link [LNKD] -> GSI 16 (level, low) -> IRQ 16 Jan 25 19:46:45 portablebastien kernel: bcm43xx: Resuming... Jan 25 19:46:45 portablebastien kernel: ACPI: PCI Interrupt 0000:03:03.0[A] -> Link [LNKB] -> GSI 19 (level, low) -> IRQ 19 Jan 25 19:46:45 portablebastien kernel: bcm43xx: PHY connected Jan 25 19:46:45 portablebastien kernel: usb usb1: root hub lost power or was reset Jan 25 19:46:45 portablebastien kernel: ata1: EH complete Jan 25 19:46:45 portablebastien kernel: ata2: EH complete Jan 25 19:46:45 portablebastien kernel: Restarting tasks ... <6>usb 1-2: USB disconnect, address 4 Jan 25 19:46:45 portablebastien kernel: done. Jan 25 19:46:45 portablebastien kernel: Enabling non-boot CPUs ... Jan 25 19:46:46 portablebastien kernel: SMP alternatives: switching to SMP code Jan 25 19:46:46 portablebastien kernel: Booting processor 1/2 APIC 0x1 Jan 25 19:46:46 portablebastien kernel: Initializing CPU#1 Jan 25 19:46:46 portablebastien kernel: Calibrating delay using timer specific routine.. 3219.62 BogoMIPS (lpj=6439259) Jan 25 19:46:46 portablebastien kernel: CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line) Jan 25 19:46:46 portablebastien kernel: CPU: L2 Cache: 512K (64 bytes/line) Jan 25 19:46:46 portablebastien kernel: CPU 1/1 -> Node 0 Jan 25 19:46:46 portablebastien kernel: CPU: Physical Processor ID: 0 Jan 25 19:46:46 portablebastien kernel: CPU: Processor Core ID: 1 Jan 25 19:46:46 portablebastien kernel: AMD Turion(tm) 64 X2 Mobile Technology TL-52 stepping 02 Jan 25 19:46:46 portablebastien kernel: CPU 1: Syncing TSC to CPU 0. Jan 25 19:46:46 portablebastien kernel: CPU 1: synchronized TSC with CPU 0 (last diff 0 cycles, maxerr 482 cycles) Jan 25 19:46:46 portablebastien kernel: CPU1 is up Jan 25 19:46:46 portablebastien kernel: usb 1-7: USB disconnect, address 5 Jan 25 19:46:46 portablebastien kernel: usb 2-4: USB disconnect, address 3 Jan 25 19:46:46 portablebastien kernel: usb 2-5: USB disconnect, address 4 Jan 25 19:46:47 portablebastien kernel: usb 2-5: new high speed USB device using ehci_hcd and address 6 Jan 25 19:46:47 portablebastien kernel: usb 2-5: configuration #1 chosen from 1 choice Jan 25 19:46:47 portablebastien kernel: usb 1-7: new full speed USB device using ohci_hcd and address 6 Jan 25 19:46:48 portablebastien kernel: usb 1-7: configuration #1 chosen from 1 choice Jan 25 19:47:39 portablebastien kernel: caller is oops_begin+0xb/0x80 ---------------- THE PREVIOUS MAIL OOPS ---------------- Jan 25 19:47:39 portablebastien kernel: Jan 25 19:47:39 portablebastien kernel: PGD 67306067 PUD 67309067 PMD 0 Jan 25 19:47:39 portablebastien kernel: CPU 0 Jan 25 19:47:39 portablebastien kernel: Modules linked in: appletalk ipx p8023 ppdev parport_pc lp parport button ac battery ipv6 tun ext3 jbd mbcache dm_snapshot dm _mirror dm_mod eeprom lm90 kvm_amd kvm fuse sbp2 loop joydev pcmcia snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd yenta_socket bcm43xx rsrc_nonstatic sdhci hci_usb pcmcia_core k8temp pcspkr soundcore i2c_nforce2 firmware_class mmc_core bluetooth psmouse serio_raw snd_page_alloc ieee80211softmac ieee 80211 ieee80211_crypt sg i2c_core sr_mod cdrom tsdev eth1394 evdev reiserfs sd_mod generic amd74xx ide_core ata_generic usbhid pata_amd ehci_hcd ohci1394 ieee1394 sa ta_nv libata scsi_mod r8169 ohci_hcd thermal processor fan Jan 25 19:47:39 portablebastien kernel: Pid: 4427, comm: rmmod Not tainted 2.6.20-rc5toto #4 Jan 25 19:47:39 portablebastien kernel: RIP: 0010:[<ffffffff803adb1c>] [<ffffffff803adb1c>] hwrng_unregister+0x1c/0xf0 Jan 25 19:47:39 portablebastien kernel: RSP: 0018:ffff810067399d88 EFLAGS: 00010246 Jan 25 19:47:39 portablebastien kernel: RAX: 0000000000200200 RBX: ffff81007d985898 RCX: ffff81007d9858c8 Jan 25 19:47:39 portablebastien kernel: RDX: 0000000000100100 RSI: 0000000000000013 RDI: ffffffff8052f2c0 Jan 25 19:47:39 portablebastien kernel: RBP: 0000000000000000 R08: ffffffff805c9800 R09: 0000000000000080 Jan 25 19:47:39 portablebastien kernel: R10: 0000000000000001 R11: ffffffff8027ce30 R12: ffff81007d985218 Jan 25 19:47:39 portablebastien kernel: R13: ffffffff88277ba0 R14: ffffffff88277ba8 R15: 0000000000000880 Jan 25 19:47:39 portablebastien kernel: FS: 00002b34bf0eb6d0(0000) GS:ffffffff8054b000(0000) knlGS:0000000000000000 Jan 25 19:47:39 portablebastien kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b Jan 25 19:47:39 portablebastien kernel: CR2: 0000000000100108 CR3: 000000006df78000 CR4: 00000000000006e0 Jan 25 19:47:39 portablebastien kernel: Process rmmod (pid: 4427, threadinfo ffff810067398000, task ffff8100672570c0) Jan 25 19:47:39 portablebastien kernel: Stack: ffff81007d9851e0 ffffffff8824f991 ffff81007d9851e0 ffff81007d9851e0 Jan 25 19:47:39 portablebastien kernel: ffff81007d9851e0 ffffffff88252739 ffff81007d984000 ffffffff803ef268 Jan 25 19:47:39 portablebastien kernel: ffff81007d984000 ffffffff803ef319 ffff81007d984000 ffff81007d984000 Jan 25 19:47:39 portablebastien kernel: Call Trace: Jan 25 19:47:39 portablebastien kernel: [<ffffffff8824f991>] :bcm43xx:bcm43xx_free_board+0x21/0x70 Jan 25 19:47:39 portablebastien kernel: [<ffffffff88252739>] :bcm43xx:bcm43xx_net_stop+0x49/0x60 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803ef268>] dev_close+0x58/0x80 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803ef319>] unregister_netdevice+0x89/0x250 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803ef4f1>] unregister_netdev+0x11/0x20 Jan 25 19:47:39 portablebastien kernel: [<ffffffff882529dc>] :bcm43xx:bcm43xx_remove_one+0x2c/0x50 Jan 25 19:47:39 portablebastien kernel: [<ffffffff80348b0c>] pci_device_remove+0x2c/0x60 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803bb4b1>] __device_release_driver+0x91/0xc0 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803bbaa8>] driver_detach+0xa8/0xf0 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803baf91>] bus_remove_driver+0x81/0xb0 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803bbb2d>] driver_unregister+0xd/0x20 Jan 25 19:47:39 portablebastien kernel: [<ffffffff80348dfe>] pci_unregister_driver+0x1e/0x90 Jan 25 19:47:39 portablebastien kernel: [<ffffffff88269540>] :bcm43xx:bcm43xx_exit+0x10/0x19 Jan 25 19:47:39 portablebastien kernel: [<ffffffff802aabda>] sys_delete_module+0x1da/0x230 Jan 25 19:47:39 portablebastien kernel: [<ffffffff8026211e>] system_call+0x7e/0x83 Jan 25 19:47:39 portablebastien kernel: Jan 25 19:47:39 portablebastien kernel: Jan 25 19:47:39 portablebastien kernel: Code: 48 89 42 08 48 89 10 48 c7 41 08 00 02 20 00 48 c7 43 30 00 Jan 25 19:47:39 portablebastien kernel: RSP <ffff810067399d88> Thank you for your time > Thanks, > > Larry > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bcm43xx oops after suspend to disk 2007-01-25 23:30 ` roucaries bastien @ 2007-01-26 15:55 ` Larry Finger 2007-01-29 11:58 ` Pavel Machek 0 siblings, 1 reply; 12+ messages in thread From: Larry Finger @ 2007-01-26 15:55 UTC (permalink / raw) To: roucaries bastien; +Cc: LKML, bcm43xx devel roucaries bastien wrote: >> Do you have the log stuff that precedes this part? In particular, was >> there a assertion that failed? >> > It is oops on resume and no asseertion failled this boot. However I > have usually a lot of > bcm43xx: ASSERTION FAILED (radio_attenuation < 10) at: > drivers/net/wireless/bcm43xx/bcm43xx_phy.c:1496:bcm43xx_find_lopair() Those are well known and do not affect this problem. > Moreover after the first oops I have a second oops (Surelly a > consequence of the first). I think that is right. Unfortunately, I cannot test for this problem on my system as it doesn't suspend at all. Does this oops happen every time, or is it intermittent? I'm looking at the code to find places to insert debugging statements. At present, I don't understand how it gets to the shutdown code while resuming! Larry ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bcm43xx oops after suspend to disk 2007-01-26 15:55 ` Larry Finger @ 2007-01-29 11:58 ` Pavel Machek 2007-01-29 12:55 ` roucaries bastien 0 siblings, 1 reply; 12+ messages in thread From: Pavel Machek @ 2007-01-29 11:58 UTC (permalink / raw) To: Larry Finger; +Cc: roucaries bastien, LKML, bcm43xx devel Hi! > >> Do you have the log stuff that precedes this part? In particular, was > >> there a assertion that failed? > >> > > It is oops on resume and no asseertion failled this boot. However I > > have usually a lot of > > bcm43xx: ASSERTION FAILED (radio_attenuation < 10) at: > > drivers/net/wireless/bcm43xx/bcm43xx_phy.c:1496:bcm43xx_find_lopair() > > Those are well known and do not affect this problem. > > > Moreover after the first oops I have a second oops (Surelly a > > consequence of the first). > > I think that is right. > > Unfortunately, I cannot test for this problem on my system as it doesn't suspend at all. Can you try to debug that? swsusp is very easy to get going these days. And with minimum drivers, it tends to work very reliably. Any help I can provide? -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bcm43xx oops after suspend to disk 2007-01-29 11:58 ` Pavel Machek @ 2007-01-29 12:55 ` roucaries bastien 2007-01-29 14:04 ` Matthew Garrett 0 siblings, 1 reply; 12+ messages in thread From: roucaries bastien @ 2007-01-29 12:55 UTC (permalink / raw) To: Pavel Machek; +Cc: Larry Finger, LKML, bcm43xx devel On 1/29/07, Pavel Machek <pavel@ucw.cz> wrote: > Hi! > > > >> Do you have the log stuff that precedes this part? In particular, was > > >> there a assertion that failed? > > >> > > > It is oops on resume and no asseertion failled this boot. However I > > > have usually a lot of > > > bcm43xx: ASSERTION FAILED (radio_attenuation < 10) at: > > > drivers/net/wireless/bcm43xx/bcm43xx_phy.c:1496:bcm43xx_find_lopair() > > > > Those are well known and do not affect this problem. > > > > > Moreover after the first oops I have a second oops (Surelly a > > > consequence of the first). > > > > I think that is right. > > > > Unfortunately, I cannot test for this problem on my system as it doesn't suspend at all. > > Can you try to debug that? swsusp is very easy to get going these > days. And with minimum drivers, it tends to work very reliably. Any > help I can provide? I don't think so. Larry sends me a patch I will test it this week (perhaps tomorow or thursday). Thank you index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c =================================================================== --- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c @@ -4244,30 +4244,12 @@ static int bcm43xx_suspend(struct pci_de { struct net_device *net_dev = pci_get_drvdata(pdev); struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); - int err; dprintk(KERN_INFO PFX "Suspending...\n"); - - netif_device_detach(net_dev); - bcm->was_initialized = 0; - if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) { - bcm->was_initialized = 1; - ieee80211softmac_stop(net_dev); - err = bcm43xx_disable_interrupts_sync(bcm); - if (unlikely(err)) { - dprintk(KERN_ERR PFX "Suspend failed.\n"); - return -EAGAIN; - } - bcm->firmware_norelease = 1; - bcm43xx_free_board(bcm); - bcm->firmware_norelease = 0; - } - bcm43xx_chipset_detach(bcm); - - pci_save_state(pdev); - pci_disable_device(pdev); - pci_set_power_state(pdev, pci_choose_state(pdev, state)); - + bcm43xx_debugfs_remove_device(bcm); + unregister_netdev(net_dev); + bcm43xx_detach_board(bcm); + free_ieee80211softmac(net_dev); dprintk(KERN_INFO PFX "Device suspended.\n"); return 0; @@ -4275,32 +4257,9 @@ static int bcm43xx_suspend(struct pci_de static int bcm43xx_resume(struct pci_dev *pdev) { - struct net_device *net_dev = pci_get_drvdata(pdev); - struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); - int err = 0; - dprintk(KERN_INFO PFX "Resuming...\n"); - pci_set_power_state(pdev, 0); - err = pci_enable_device(pdev); - if (err) { - printk(KERN_ERR PFX "Failure with pci_enable_device!\n"); - return err; - } - pci_restore_state(pdev); - - bcm43xx_chipset_attach(bcm); - if (bcm->was_initialized) - err = bcm43xx_init_board(bcm); - if (err) { - printk(KERN_ERR PFX "Resume failed!\n"); - return err; - } - netif_device_attach(net_dev); - - dprintk(KERN_INFO PFX "Device resumed.\n"); - - return 0; + return bcm43xx_init_one(pdev, NULL); } #endif /* CONFIG_PM */ Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c =================================================================== --- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c @@ -4244,30 +4244,12 @@ static int bcm43xx_suspend(struct pci_de { struct net_device *net_dev = pci_get_drvdata(pdev); struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); - int err; dprintk(KERN_INFO PFX "Suspending...\n"); - - netif_device_detach(net_dev); - bcm->was_initialized = 0; - if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) { - bcm->was_initialized = 1; - ieee80211softmac_stop(net_dev); - err = bcm43xx_disable_interrupts_sync(bcm); - if (unlikely(err)) { - dprintk(KERN_ERR PFX "Suspend failed.\n"); - return -EAGAIN; - } - bcm->firmware_norelease = 1; - bcm43xx_free_board(bcm); - bcm->firmware_norelease = 0; - } - bcm43xx_chipset_detach(bcm); - - pci_save_state(pdev); - pci_disable_device(pdev); - pci_set_power_state(pdev, pci_choose_state(pdev, state)); - + bcm43xx_debugfs_remove_device(bcm); + unregister_netdev(net_dev); + bcm43xx_detach_board(bcm); + free_ieee80211softmac(net_dev); dprintk(KERN_INFO PFX "Device suspended.\n"); return 0; @@ -4275,32 +4257,9 @@ static int bcm43xx_suspend(struct pci_de static int bcm43xx_resume(struct pci_dev *pdev) { - struct net_device *net_dev = pci_get_drvdata(pdev); - struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); - int err = 0; - dprintk(KERN_INFO PFX "Resuming...\n"); - pci_set_power_state(pdev, 0); - err = pci_enable_device(pdev); - if (err) { - printk(KERN_ERR PFX "Failure with pci_enable_device!\n"); - return err; - } - pci_restore_state(pdev); - - bcm43xx_chipset_attach(bcm); - if (bcm->was_initialized) - err = bcm43xx_init_board(bcm); - if (err) { - printk(KERN_ERR PFX "Resume failed!\n"); - return err; - } - netif_device_attach(net_dev); - - dprintk(KERN_INFO PFX "Device resumed.\n"); - - return 0; + return bcm43xx_init_one(pdev, NULL); } #endif /* CONFIG_PM */ > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bcm43xx oops after suspend to disk 2007-01-29 12:55 ` roucaries bastien @ 2007-01-29 14:04 ` Matthew Garrett 2007-01-29 15:43 ` Larry Finger 0 siblings, 1 reply; 12+ messages in thread From: Matthew Garrett @ 2007-01-29 14:04 UTC (permalink / raw) To: roucaries bastien; +Cc: Pavel Machek, Larry Finger, LKML, bcm43xx devel On Mon, Jan 29, 2007 at 01:55:41PM +0100, roucaries bastien wrote: > - return 0; > + return bcm43xx_init_one(pdev, NULL); > } While this may well work (it's basically equivalent to unloading and reloading the module), it's not a long-term fix - userspace is going to notice the interface vanishing and reappearing. Larry, I guess you just mean this as a test patch? -- Matthew Garrett | mjg59@srcf.ucam.org ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bcm43xx oops after suspend to disk 2007-01-29 14:04 ` Matthew Garrett @ 2007-01-29 15:43 ` Larry Finger 2007-02-04 17:07 ` roucaries bastien 0 siblings, 1 reply; 12+ messages in thread From: Larry Finger @ 2007-01-29 15:43 UTC (permalink / raw) To: Matthew Garrett; +Cc: roucaries bastien, bcm43xx devel, LKML, Pavel Machek Matthew Garrett wrote: > On Mon, Jan 29, 2007 at 01:55:41PM +0100, roucaries bastien wrote: >> - return 0; >> + return bcm43xx_init_one(pdev, NULL); >> } > > While this may well work (it's basically equivalent to unloading and > reloading the module), it's not a long-term fix - userspace is going to > notice the interface vanishing and reappearing. Larry, I guess you just > mean this as a test patch? > Yes. If this doesn't work, then we have real problems. If it does, then I try to find the part that is missing in the current code. Larry ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bcm43xx oops after suspend to disk 2007-01-29 15:43 ` Larry Finger @ 2007-02-04 17:07 ` roucaries bastien 2007-02-04 17:42 ` Larry Finger 0 siblings, 1 reply; 12+ messages in thread From: roucaries bastien @ 2007-02-04 17:07 UTC (permalink / raw) To: Larry Finger; +Cc: Matthew Garrett, bcm43xx devel, LKML, Pavel Machek On 1/29/07, Larry Finger <larry.finger@lwfinger.net> wrote: > Matthew Garrett wrote: > > On Mon, Jan 29, 2007 at 01:55:41PM +0100, roucaries bastien wrote: > >> - return 0; > >> + return bcm43xx_init_one(pdev, NULL); > >> } > > > > While this may well work (it's basically equivalent to unloading and > > reloading the module), it's not a long-term fix - userspace is going to > > notice the interface vanishing and reappearing. Larry, I guess you just > > mean this as a test patch? > > > > Yes. If this doesn't work, then we have real problems. If it does, then I try to find the part that > is missing in the current code. Sorry for the delay it works. This time I can use iwlist eth scan. I have some difficulties to associate and I need to rmmod/modprobe in order to associate but it is another problem linked to a really weak power. Another good point is: - before path : wifi link led is off before suspend and on after - after patch: wifi link led is always off. Initialisation problem? I will send you dmesg by private mail. Regards bastien > Larry > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bcm43xx oops after suspend to disk 2007-02-04 17:07 ` roucaries bastien @ 2007-02-04 17:42 ` Larry Finger 2007-02-05 1:10 ` Rafael J. Wysocki 0 siblings, 1 reply; 12+ messages in thread From: Larry Finger @ 2007-02-04 17:42 UTC (permalink / raw) To: roucaries bastien; +Cc: Matthew Garrett, bcm43xx devel, LKML, Pavel Machek roucaries bastien wrote: > > Sorry for the delay it works. This time I can use iwlist eth scan. > I have some difficulties to associate and I need to rmmod/modprobe in > order to associate but it is another problem linked to a really weak > power. Bastien, Please try this patch instead. Thanks, Larry ============================ Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c =================================================================== --- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c @@ -3638,6 +3638,7 @@ error: static int bcm43xx_init_board(struct bcm43xx_private *bcm) { int err; + struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); mutex_lock(&(bcm)->mutex); @@ -3658,6 +3659,8 @@ static int bcm43xx_init_board(struct bcm if (err) goto err_sysfs_unreg; bcm43xx_periodic_tasks_setup(bcm); + /* force initial LO calibration */ + phy->lo_control->txctl2 = 0xFFFF; /*FIXME: This should be handled by softmac instead. */ schedule_delayed_work(&bcm->softmac->associnfo.work, 0); @@ -3763,7 +3766,6 @@ static int bcm43xx_read_phyinfo(struct b phy->lo_control = kzalloc(sizeof(*(phy->lo_control)), GFP_KERNEL); if (!phy->lo_control) return -ENOMEM; - phy->lo_control->txctl2 = 0xFFFF;//FIXME this is the wrong place } return 0; ---- ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bcm43xx oops after suspend to disk 2007-02-04 17:42 ` Larry Finger @ 2007-02-05 1:10 ` Rafael J. Wysocki 2007-02-05 3:19 ` Larry Finger 0 siblings, 1 reply; 12+ messages in thread From: Rafael J. Wysocki @ 2007-02-05 1:10 UTC (permalink / raw) To: bcm43xx-dev Cc: Larry Finger, roucaries bastien, Matthew Garrett, Pavel Machek, LKML On Sunday, 4 February 2007 18:42, Larry Finger wrote: > roucaries bastien wrote: > > > > Sorry for the delay it works. This time I can use iwlist eth scan. > > I have some difficulties to associate and I need to rmmod/modprobe in > > order to associate but it is another problem linked to a really weak > > power. > > Bastien, > > Please try this patch instead. Hm, it doesn't seem to apply to the mainline version of the driver. Any chance for a fix against 2.6.20? Rafael ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Bcm43xx oops after suspend to disk 2007-02-05 1:10 ` Rafael J. Wysocki @ 2007-02-05 3:19 ` Larry Finger 0 siblings, 0 replies; 12+ messages in thread From: Larry Finger @ 2007-02-05 3:19 UTC (permalink / raw) To: Rafael J. Wysocki Cc: bcm43xx-dev, roucaries bastien, LKML, Pavel Machek, Matthew Garrett Rafael J. Wysocki wrote: > On Sunday, 4 February 2007 18:42, Larry Finger wrote: >> roucaries bastien wrote: >>> Sorry for the delay it works. This time I can use iwlist eth scan. >>> I have some difficulties to associate and I need to rmmod/modprobe in >>> order to associate but it is another problem linked to a really weak >>> power. >> Bastien, >> >> Please try this patch instead. > > Hm, it doesn't seem to apply to the mainline version of the driver. Any chance > for a fix against 2.6.20? Please try this one. I forgot about some other stuff in my working copy of wireless-2.6. Larry ============ Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c =================================================================== --- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c @@ -3617,6 +3617,7 @@ error: static int bcm43xx_init_board(struct bcm43xx_private *bcm) { int err; + struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); mutex_lock(&(bcm)->mutex); @@ -3637,6 +3638,8 @@ static int bcm43xx_init_board(struct bcm if (err) goto err_sysfs_unreg; bcm43xx_periodic_tasks_setup(bcm); + /* force initial LO calibration */ + phy->lo_control->txctl2 = 0xFFFF; /*FIXME: This should be handled by softmac instead. */ schedule_delayed_work(&bcm->softmac->associnfo.work, 0); ^ permalink raw reply [flat|nested] 12+ messages in thread
* Bcm43xx oops after suspend to disk @ 2007-01-25 19:18 roucaries bastien 0 siblings, 0 replies; 12+ messages in thread From: roucaries bastien @ 2007-01-25 19:18 UTC (permalink / raw) To: bcm43xx-dev; +Cc: pavel, linux-kernel, rjw My bcm43xx oops after suspend to disk on a 2.6.20rc5 kernel (preempt+smp). --------------- Jan 25 19:47:39 portablebastien kernel: caller is oops_begin+0xb/0x80 Jan 25 19:47:39 portablebastien kernel: Jan 25 19:47:39 portablebastien kernel: Call Trace: Jan 25 19:47:39 portablebastien kernel: [<ffffffff8033f1eb>] debug_smp_processor_id+0xab/0xc0 Jan 25 19:47:39 portablebastien kernel: [<ffffffff8026d52b>] oops_begin+0xb/0x80 Jan 25 19:47:39 portablebastien kernel: [<ffffffff8020aee4>] do_page_fault+0x6e4/0x890 Jan 25 19:47:39 portablebastien kernel: [<ffffffff8022f383>] __wake_up+0x43/0x70 Jan 25 19:47:39 portablebastien kernel: [<ffffffff80269416>] _spin_unlock_irqrestore+0x16/0x40 Jan 25 19:47:39 portablebastien kernel: [<ffffffff80290f76>] vprintk+0x2f6/0x360 Jan 25 19:47:39 portablebastien kernel: [<ffffffff8026974d>] error_exit+0x0/0x84 Jan 25 19:47:39 portablebastien kernel: [<ffffffff8027ce30>] physflat_send_IPI_mask+0x0/0x80 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803adb1c>] hwrng_unregister+0x1c/0xf0 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803adb10>] hwrng_unregister+0x10/0xf0 Jan 25 19:47:39 portablebastien kernel: [<ffffffff8824f991>] :bcm43xx:bcm43xx_free_board+0x21/0x70 Jan 25 19:47:39 portablebastien kernel: [<ffffffff88252739>] :bcm43xx:bcm43xx_net_stop+0x49/0x60 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803ef268>] dev_close+0x58/0x80 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803ef319>] unregister_netdevice+0x89/0x250 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803ef4f1>] unregister_netdev+0x11/0x20 Jan 25 19:47:39 portablebastien kernel: [<ffffffff882529dc>] :bcm43xx:bcm43xx_remove_one+0x2c/0x50 Jan 25 19:47:39 portablebastien kernel: [<ffffffff80348b0c>] pci_device_remove+0x2c/0x60 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803bb4b1>] __device_release_driver+0x91/0xc0 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803bbaa8>] driver_detach+0xa8/0xf0 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803baf91>] bus_remove_driver+0x81/0xb0 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803bbb2d>] driver_unregister+0xd/0x20 Jan 25 19:47:39 portablebastien kernel: [<ffffffff80348dfe>] pci_unregister_driver+0x1e/0x90 Jan 25 19:47:39 portablebastien kernel: [<ffffffff88269540>] :bcm43xx:bcm43xx_exit+0x10/0x19 Jan 25 19:47:39 portablebastien kernel: [<ffffffff802aabda>] sys_delete_module+0x1da/0x230 Jan 25 19:47:39 portablebastien kernel: [<ffffffff8026211e>] system_call+0x7e/0x83 Jan 25 19:47:39 portablebastien kernel: Jan 25 19:47:39 portablebastien kernel: PGD 67306067 PUD 67309067 PMD 0 Jan 25 19:47:39 portablebastien kernel: CPU 0 Jan 25 19:47:39 portablebastien kernel: Modules linked in: appletalk ipx p8023 ppdev parport_pc lp parport button ac battery ipv6 tun ext3 jbd mbcache dm_snapshot dm _mirror dm_mod eeprom lm90 kvm_amd kvm fuse sbp2 loop joydev pcmcia snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd yenta_socket bcm43xx rsrc_nonstatic sdhci hci_usb pcmcia_core k8temp pcspkr soundcore i2c_nforce2 firmware_class mmc_core bluetooth psmouse serio_raw snd_page_alloc ieee80211softmac ieee 80211 ieee80211_crypt sg i2c_core sr_mod cdrom tsdev eth1394 evdev reiserfs sd_mod generic amd74xx ide_core ata_generic usbhid pata_amd ehci_hcd ohci1394 ieee1394 sa ta_nv libata scsi_mod r8169 ohci_hcd thermal processor fan an 25 19:47:39 portablebastien kernel: Pid: 4427, comm: rmmod Not tainted 2.6.20-rc5toto #4 Jan 25 19:47:39 portablebastien kernel: RIP: 0010:[<ffffffff803adb1c>] [<ffffffff803adb1c>] hwrng_unregister+0x1c/0xf0 Jan 25 19:47:39 portablebastien kernel: RSP: 0018:ffff810067399d88 EFLAGS: 00010246 Jan 25 19:47:39 portablebastien kernel: RAX: 0000000000200200 RBX: ffff81007d985898 RCX: ffff81007d9858c8 Jan 25 19:47:39 portablebastien kernel: RDX: 0000000000100100 RSI: 0000000000000013 RDI: ffffffff8052f2c0 Jan 25 19:47:39 portablebastien kernel: RBP: 0000000000000000 R08: ffffffff805c9800 R09: 0000000000000080 Jan 25 19:47:39 portablebastien kernel: R10: 0000000000000001 R11: ffffffff8027ce30 R12: ffff81007d985218 Jan 25 19:47:39 portablebastien kernel: R13: ffffffff88277ba0 R14: ffffffff88277ba8 R15: 0000000000000880 Jan 25 19:47:39 portablebastien kernel: FS: 00002b34bf0eb6d0(0000) GS:ffffffff8054b000(0000) knlGS:0000000000000000 Jan 25 19:47:39 portablebastien kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b Jan 25 19:47:39 portablebastien kernel: CR2: 0000000000100108 CR3: 000000006df78000 CR4: 00000000000006e0 Jan 25 19:47:39 portablebastien kernel: Process rmmod (pid: 4427, threadinfo ffff810067398000, task ffff8100672570c0) Jan 25 19:47:39 portablebastien kernel: Stack: ffff81007d9851e0 ffffffff8824f991 ffff81007d9851e0 ffff81007d9851e0 Jan 25 19:47:39 portablebastien kernel: ffff81007d9851e0 ffffffff88252739 ffff81007d984000 ffffffff803ef268 Jan 25 19:47:39 portablebastien kernel: ffff81007d984000 ffffffff803ef319 ffff81007d984000 ffff81007d984000 Jan 25 19:47:39 portablebastien kernel: Call Trace: Jan 25 19:47:39 portablebastien kernel: [<ffffffff8824f991>] :bcm43xx:bcm43xx_free_board+0x21/0x70 Jan 25 19:47:39 portablebastien kernel: [<ffffffff88252739>] :bcm43xx:bcm43xx_net_stop+0x49/0x60 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803ef268>] dev_close+0x58/0x80 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803ef319>] unregister_netdevice+0x89/0x250 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803ef4f1>] unregister_netdev+0x11/0x20 Jan 25 19:47:39 portablebastien kernel: [<ffffffff882529dc>] :bcm43xx:bcm43xx_remove_one+0x2c/0x50 Jan 25 19:47:39 portablebastien kernel: [<ffffffff80348b0c>] pci_device_remove+0x2c/0x60 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803bb4b1>] __device_release_driver+0x91/0xc0 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803bbaa8>] driver_detach+0xa8/0xf0 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803baf91>] bus_remove_driver+0x81/0xb0 Jan 25 19:47:39 portablebastien kernel: [<ffffffff803bbb2d>] driver_unregister+0xd/0x20 Jan 25 19:47:39 portablebastien kernel: [<ffffffff80348dfe>] pci_unregister_driver+0x1e/0x90 Jan 25 19:47:39 portablebastien kernel: [<ffffffff88269540>] :bcm43xx:bcm43xx_exit+0x10/0x19 Jan 25 19:47:39 portablebastien kernel: [<ffffffff802aabda>] sys_delete_module+0x1da/0x230 Jan 25 19:47:39 portablebastien kernel: [<ffffffff8026211e>] system_call+0x7e/0x83 Jan 25 19:47:39 portablebastien kernel: Jan 25 19:47:39 portablebastien kernel: Jan 25 19:47:39 portablebastien kernel: Code: 48 89 42 08 48 89 10 48 c7 41 08 00 02 20 00 48 c7 43 30 00 Jan 25 19:47:39 portablebastien kernel: RSP <ffff810067399d88> ---------------------------------- Thank you very much. Regards bastien PS: Btw it seems this bug was signaled on november 11 (https://lists.berlios.de/pipermail/bcm43xx-dev/2006-November/003074.html) but not answered. ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-02-05 3:19 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <45B92488.6090908@lwfinger.net>
2007-01-25 21:46 ` Bcm43xx oops after suspend to disk Larry Finger
2007-01-25 23:30 ` roucaries bastien
2007-01-26 15:55 ` Larry Finger
2007-01-29 11:58 ` Pavel Machek
2007-01-29 12:55 ` roucaries bastien
2007-01-29 14:04 ` Matthew Garrett
2007-01-29 15:43 ` Larry Finger
2007-02-04 17:07 ` roucaries bastien
2007-02-04 17:42 ` Larry Finger
2007-02-05 1:10 ` Rafael J. Wysocki
2007-02-05 3:19 ` Larry Finger
2007-01-25 19:18 roucaries bastien
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox