Bug 771477

Summary: suspend to ram kills brcmsmac driver (4313 wifi card & kernel 3.2.0-0.rc7.git3.1)
Product: [Fedora] Fedora Reporter: Jacek Pawlyta <cunio>
Component: kernelAssignee: John W. Linville <linville>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: arend, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, zajec5
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-02 17:32:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jacek Pawlyta 2012-01-03 20:50:49 UTC
Description of problem:

suspend to ram/resume cycle kills brcmsmac driver 

Version-Release number of selected component (if applicable):
kernel 3.2.0-0.rc7.git3.1

How reproducible:
always

Steps to Reproduce:
1. boot in kernel 3.2.0-0.rc7.git3.1
2. suspend to ram
3. resume

  
Actual results:
brcmsmac driver blocked

Expected results:
brcmsmac driver gets up and NM connects to AP 

Additional info:
if I try to unload the driver I got this:

 NetworkManager[1040]: NetworkManager[1040]: (nm-system.c:679):nm_system_iface_is_up: runtime check failed: (iface != NULL)                                        
 NetworkManager[1040]: NetworkManager[1040]: <error> [1325616847.227187] [nm-system.c:681] nm_system_iface_is_up(): (unknown): failed to get interface link object 
 kernel: [  829.022448] general protection fault: 0000 [#1] SMP                                                                                                    
 kernel: [  829.022543] CPU 0                                                                                                                                      
 kernel: [  829.022561] Modules linked in: ppdev parport_pc lp parport hidp fuse lockd tpm_bios rfcomm bnep ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_f
ilter ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack coretemp uvcvideo arc4 videodev btusb bluetooth media v4l2_compat
_ioctl32 snd_hda_codec_conexant brcmutil snd_hda_intel cfg80211 crc8 cordic snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm ideapad_laptop iTCO_wdt i2c_i801 iTCO_vendor_support 
snd_timer microcode snd sparse_keymap soundcore rfkill snd_page_alloc tg3 bcma(-) sunrpc uinput binfmt_misc i915 drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: mac80211
]                                                                                                                                                                                       
 kernel: [  829.023054]                                                                                                                                            
 kernel: [  829.023054] Pid: 2589, comm: modprobe Tainted: G        W    3.2.0-0.rc7.git3.1.fc17.x86_64 #1 LENOVO 20023               /NITU1                       
 kernel: [  829.023054] RIP: 0010:[<ffffffffa006158b>]  [<ffffffffa006158b>] bcma_bus_unregister+0x3b/0x60 [bcma]                                                  
 kernel: [  829.023054] RSP: 0018:ffff88013292dd68  EFLAGS: 00010296                                                                                               
 kernel: [  829.023054] RAX: 6b6b6b6b6b6b6b6b RBX: 6b6b6b6b6b6b66c3 RCX: ffffffff8220dbe0                                                                          
 kernel: [  829.023054] RDX: 0000000000000006 RSI: 0000000000000000 RDI: 0000000000000246                                                                          
 kernel: [  829.023054] RBP: ffff88013292dd78 R08: 0000000000000000 R09: 0000000000000001                                                                          
 kernel: [  829.023054] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801aada1728                                                                          
 kernel: [  829.023054] R13: ffff8801aada16f8 R14: ffffffffa00655f0 R15: 00000000004110d0                                                                          
 kernel: [  829.023054] FS:  00007f6d30e4f700(0000) GS:ffff8801b9200000(0000) knlGS:0000000000000000                                                               
 kernel: [  829.023054] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b                                                                                          
 kernel: [  829.023054] CR2: 00007f77d218f000 CR3: 0000000132edc000 CR4: 00000000000406f0                                                                          
 kernel: [  829.023054] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000                                                                          
 kernel: [  829.023054] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400                                                                          
 kernel: [  829.023054] Process modprobe (pid: 2589, threadinfo ffff88013292c000, task ffff88016c5dc8e0)                                                           
 kernel: [  829.023054] Stack:                                                                                                                                     
 kernel: [  829.023054]  ffff8801b4ad33d8 ffff8801b4ad3468 ffff88013292dda8 ffffffffa0063866                                                                       
 kernel: [  829.023054]  ffff8801b4ad3468 ffff8801b4ad3468 ffffffffa0065520 ffff8801b4ad33d8                                                                       
 kernel: [  829.023054]  ffff88013292ddd8 ffffffff813327b6 ffffffffa0065580 ffff8801b4ad3468                                                                       
 kernel: [  829.023054] Call Trace:                                                                                                                                
 kernel: [  829.023054]  [<ffffffffa0063866>] bcma_host_pci_remove+0x36/0x80 [bcma]                                                                                
 kernel: [  829.023054]  [<ffffffff813327b6>] pci_device_remove+0x46/0x110                                                                                         
 kernel: [  829.023054]  [<ffffffff813f5afc>] __device_release_driver+0x7c/0xe0                                                                                    
 kernel: [  829.023054]  [<ffffffff813f6408>] driver_detach+0xd8/0xe0                                                                                              
 kernel: [  829.023054]  [<ffffffff813f5931>] bus_remove_driver+0x91/0x110                                                                                         
 kernel: [  829.023054]  [<ffffffff813f6bd2>] driver_unregister+0x62/0xa0                                                                                          
 kernel: [  829.023054]  [<ffffffff81331624>] pci_unregister_driver+0x44/0xa0                                                                                      
 kernel: [  829.023054]  [<ffffffffa0063f83>] bcma_host_pci_exit+0x10/0x8d [bcma]                                                                                  
 kernel: [  829.023054]  [<ffffffffa0063f65>] bcma_modexit+0x9/0x17 [bcma]                                                                                         
 kernel: [  829.023054]  [<ffffffff810cc18c>] sys_delete_module+0x18c/0x270                                                                                        
 kernel: [  829.023054]  [<ffffffff8168083a>] ? sysret_check+0x2e/0x69                                                                                             
 kernel: [  829.023054]  [<ffffffff813149ae>] ? trace_hardirqs_on_thunk+0x3a/0x3f                                                                                  
 kernel: [  829.023054]  [<ffffffff81680802>] system_call_fastpath+0x16/0x1b                                                                                       
 kernel: [  829.023054] Code: 4c 8d 67 30 49 39 c4 48 8d 98 58 fb ff ff 75 1b eb 2e 66 0f 1f 44 00 00 48 8b 83 a8 04 00 00 49 39 c4 48 8d 98 58 fb ff ff 74 15 <80>
 bb 84 04 00 00 00 74 e4 48 8d 7b 10 e8 f3 0a 39 e1 eb d9 90                                                                                                                            
 kernel: [  829.023054] RIP  [<ffffffffa006158b>] bcma_bus_unregister+0x3b/0x60 [bcma]                                                                             
 kernel: [  829.023054]  RSP <ffff88013292dd68>                                                                                                                    
 kernel: [  829.074170] ---[ end trace bd0a2e3925ce8587 ]---

Comment 1 Arend van Spriel 2012-01-05 20:52:31 UTC
I believe suspend/resume support has been added recently to bcma. Maybe some additional interfacing between brcmsmac and bcma is missing for that.

Comment 2 John W. Linville 2012-01-11 18:54:45 UTC
Does this problem persist with current rawhide kernels?

Comment 3 Jacek Pawlyta 2012-01-11 22:30:34 UTC
It does, there is some progress however.

Running 3.2.0-2.fc17.x86_64 after resume I see this:

[65721.119134] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[65721.119151] ieee80211 phy0: wl0: psmdebug 0x00ff8f6d, phydebug 0x00000000, psm_brc 0x0000

but now I can at least unload brcmsmac and reload it manually without killing the kernel.

Comment 4 Jacek Pawlyta 2012-01-13 21:13:26 UTC
kernel 3.2.1-2 and problem is again here:


[  817.930543] general protection fault: 0000 [#1] SMP 
[  817.931045] CPU 1 
[  817.931045] Modules linked in: arc4 bcma(-) brcmutil cfg80211 crc8 cordic lib80211 lp parport hidp fuse lockd rfcomm tpm_bios bnep nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_REJECT nf_conntrack_ipv6 nf_conntrack_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 ip6table_filter ip6_tables xt_state nf_conntrack coretemp uvcvideo videodev media v4l2_compat_ioctl32 btusb bluetooth snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm ideapad_laptop sparse_keymap rfkill snd_timer snd tg3 i2c_i801 iTCO_wdt iTCO_vendor_support soundcore snd_page_alloc microcode uinput sunrpc binfmt_misc i915 drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: mac80211]
[  817.933690] 
[  817.933690] Pid: 3561, comm: modprobe Tainted: P           O 3.2.1-2.fc17.x86_64 #1 LENOVO 20023               /NITU1
[  817.933690] RIP: 0010:[<ffffffffa03a95db>]  [<ffffffffa03a95db>] bcma_bus_unregister+0x3b/0x60 [bcma]
[  817.933690] RSP: 0018:ffff8801a969fd68  EFLAGS: 00010296
[  817.933690] RAX: 6b6b6b6b6b6b6b6b RBX: 6b6b6b6b6b6b66c3 RCX: 00000001000c000a
[  817.933690] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000246
[  817.933690] RBP: ffff8801a969fd78 R08: 0000000000000000 R09: ffff88010d60d3f8
[  817.933690] R10: ffff8801a969fb50 R11: 0000000000000000 R12: ffff880125625db8
[  817.933690] R13: ffff8801b4ad3468 R14: ffffffffa03ae5f0 R15: 00000000004110d0
[  817.933690] FS:  00007f8d44ff1700(0000) GS:ffff8801b9400000(0000) knlGS:0000000000000000
[  817.933690] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  817.933690] CR2: 00007f4a66ea2000 CR3: 0000000197bf3000 CR4: 00000000000406e0
[  817.933690] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  817.933690] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  817.962862] Process modprobe (pid: 3561, threadinfo ffff8801a969e000, task ffff880091bba470)
[  817.962862] Stack:
[  817.962862]  ffff8801b4ad33d8 ffff880125625d88 ffff8801a969fda8 ffffffffa03abed6
[  817.962862]  ffff8801b4ad3468 ffff8801b4ad3468 ffffffffa03ae520 ffff8801b4ad33d8
[  817.962862]  ffff8801a969fdd8 ffffffff81330a6f ffff8801b4ad3468 ffff8801b4ad3468
[  817.962862] Call Trace:
[  817.962862]  [<ffffffffa03abed6>] bcma_host_pci_remove+0x36/0x74 [bcma]
[  817.962862]  [<ffffffff81330a6f>] pci_device_remove+0x3f/0x110
[  817.962862]  [<ffffffff813f44cc>] __device_release_driver+0x7c/0xe0
[  817.962862]  [<ffffffff813f4a98>] driver_detach+0xd8/0xe0
[  817.962862]  [<ffffffff813f3fd9>] bus_remove_driver+0x99/0x110
[  817.962862]  [<ffffffff813f5082>] driver_unregister+0x62/0xa0
[  817.962862]  [<ffffffff813306c4>] pci_unregister_driver+0x44/0xa0
[  817.962862]  [<ffffffffa03abf3b>] bcma_host_pci_exit+0x10/0xd5 [bcma]
[  817.962862]  [<ffffffffa03abf1d>] bcma_modexit+0x9/0x17 [bcma]
[  817.962862]  [<ffffffff810ca7d4>] sys_delete_module+0x184/0x2a0
[  817.962862]  [<ffffffff81312b1e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[  817.962862]  [<ffffffff8167ee82>] system_call_fastpath+0x16/0x1b
[  817.962862] Code: 4c 8d 67 30 49 39 c4 48 8d 98 58 fb ff ff 75 1b eb 2e 66 0f 1f 44 00 00 48 8b 83 a8 04 00 00 49 39 c4 48 8d 98 58 fb ff ff 74 15 <80> bb 84 04 00 00 00 74 e4 48 8d 7b 10 e8 93 76 04 e1 eb d9 90 
[  817.962862] RIP  [<ffffffffa03a95db>] bcma_bus_unregister+0x3b/0x60 [bcma]
[  817.962862]  RSP <ffff8801a969fd68>
[  818.032292] ---[ end trace a83f5a0d04387feb ]---

Comment 5 Arend van Spriel 2012-01-13 21:25:18 UTC
bcma was doing old-style PM ops and did not call the suspend/resume functions for the registered drivers (ie. brcmsmac or b43). Linus dived into it as he wanted bcm43224 in his MacBook Air to work and created a number of patches. Not sure what the status of those patches is as I was unable to test them on my machine over here.

Comment 6 Josh Boyer 2012-02-02 17:32:42 UTC
This issue should be resolved with the 3.3-rc2 kernel in rawhide.  The patches Linus included are contained in that release.  If you are still hitting this with the latest rawhide kernel, please reopen.