#12657 NORM 13.2.0: Fix btmrvl/mwifiex suspend interactions

Zarro Boogs per Child bugtracker at laptop.org
Tue May 21 11:46:37 EDT 2013


#12657: Fix btmrvl/mwifiex suspend interactions
-------------------------------------+--------------------------------------
           Reporter:  dsd            |       Owner:  pgf          
               Type:  defect         |      Status:  new          
           Priority:  normal         |   Milestone:  13.2.0       
          Component:  kernel         |     Version:  not specified
         Resolution:                 |    Keywords:               
        Next_action:  test in build  |    Verified:  0            
Deployment_affected:                 |   Blockedby:               
           Blocking:                 |  
-------------------------------------+--------------------------------------

Comment(by pgf):

 more tracing has led to this more complete call sequence:
 when the hang occurs, it happens inside of:
     - netif_carrier_off(), called from:
     - mwifiex_remove_card
     - mwifiex_sdio_remove
     - mwifiex_sdio_remove() (via dev->bus->remove(dev)
     - __device_release_driver()
     - device_release_driver()
     - bus_remove_device()
     - device_del()
     - sdio_remove_func()
     - mmc_sdio_remove()
     - mmc_suspend_host() after mmc_sdio_suspend() has returned -ENOSYS

 by being very judicious in my use of printk (actually, by replacing printk
 with one-character writes directly to the UART registers), i've been able
 to recreate the hang with no_console_suspend enabled.  with that enabled,
 i sometimes get a timeout from mwifiex after the hang:
 {{{
 [   38.699170] Freezing remaining freezable tasks ... (elapsed 0.01
 seconds) done.
 [   38.719863] usb usb1: usb auto-resume
 [   38.719894] pxau2o-ehci d4208000.usb: resume root hub
 [   38.729427] dcon_source_switch to DCON
 [   38.766522] hub 1-0:1.0: hub_resume
 [   38.766522] hub 1-0:1.0: port 1: status 0507 change 0000
 [   38.775280] olpc-dcon: The DCON has control
 [   38.779572] usb 1-1: usb auto-resume
 [   38.816537] pxau2o-ehci d4208000.usb: GetStatus port:1 status 8001205 4
 ACK POWER sig=se0 LPM PE CONNECT
 [   38.836527] usb 1-1: finish resume
 [   38.840382] hub 1-1:1.0: hub_resume
 [   38.844868] pxau2o-ehci d4208000.usb: reused qh ec3d5b40 schedule
 [   38.844889] usb 1-1: link qh256-0001/ec3d5b40 start 1 [1/0 us]
 [   38.856760] hub 1-1:1.0: hub_suspend
 [   38.856760] usb 1-1: unlink qh256-0001/ec3d5b40 start 1 [1/0 us]
 [   38.860316] usb 1-1: usb suspend, wakeup 0
 [   38.886521] hub 1-0:1.0: hub_suspend
 [   38.886538] usb usb1: bus suspend, wakeup 0
 [   38.890088] pxau2o-ehci d4208000.usb: suspend root hub
 [   38.899357] mmp3_usb_phy_deinit_internal: Deinit usb phy!!!
 [   38.916513] olpc_ec_1_75_suspend: suspend sync 00000001
 FiIFiI[   38.936512] mmc2: dropping power over suspend
 FGiI[   38.941392] mmc1: dropping power over suspend
 FMxymB123bGHq!01234678&[[   39.055483] MARK:628 bus_remove_device() 'dev'
 is 0xec3d4008
 [   39.062661] MARK:563 device_release_driver() 'dev' is 0xec3d4008
 zxcmn*yo+O[   49.086517] mwifiex_sdio mmc0:0001:1:
 mwifiex_cmd_timeout_func: Timeout cmd id (1369151250.668437) = 0xe5, act =
 0x1
 [   49.086541] ------------[ cut here ]------------
 [   49.086541] WARNING: at kernel/mutex.c:198
 __mutex_lock_slowpath+0x84/0x28c()
 [   49.086561] [<c0015770>] (unwind_backtrace+0x0/0x128) from [<c044f468>]
 (dump_stack+0x20/0x24)
 [   49.086631] [<c044f468>] (dump_stack+0x20/0x24) from [<c00240d0>]
 (warn_slowpath_common+0x5c/0x74)
 [   49.086649] [<c00240d0>] (warn_slowpath_common+0x5c/0x74) from
 [<c0024114>] (warn_slowpath_null+0x2c/0x34)
 [   49.086662] [<c0024114>] (warn_slowpath_null+0x2c/0x34) from
 [<c04539b0>] (__mutex_lock_slowpath+0x84/0x28c)
 [   49.086672] [<c04539b0>] (__mutex_lock_slowpath+0x84/0x28c) from
 [<c0453bd4>] (mutex_lock+0x1c/0x34)
 [   49.086682] [<c0453bd4>] (mutex_lock+0x1c/0x34) from [<c0326aa0>]
 (clk_prepare+0x24/0x44)
 [   49.086697] [<c0326aa0>] (clk_prepare+0x24/0x44) from [<c02389ec>]
 (serial_pxa_console_write+0x34/0x154)
 [   49.086726] [<c02389ec>] (serial_pxa_console_write+0x34/0x154) from
 [<c0025d84>] (call_console_drivers.constprop.12+0x12c/0x170)
 [   49.086726] [<c0025d84>]
 (call_console_drivers.constprop.12+0x12c/0x170) from [<c0026210>]
 (console_unlock+0x2fc/0x3d0)
 [   49.086740] [<c0026210>] (console_unlock+0x2fc/0x3d0) from [<c00267d0>]
 (vprintk_emit+0x39c/0x3cc)
 [   49.086762] [<c00267d0>] (vprintk_emit+0x39c/0x3cc) from [<c044f750>]
 (printk_emit+0x30/0x38)
 [   49.086762] [<c044f750>] (printk_emit+0x30/0x38) from [<c0263358>]
 (__dev_printk+0x174/0x1a0)
 [   49.086787] [<c0263358>] (__dev_printk+0x174/0x1a0) from [<c02634b8>]
 (dev_err+0x44/0x50)
 [   49.086798] [<c02634b8>] (dev_err+0x44/0x50) from [<bf072874>]
 (mwifiex_cmd_timeout_func+0xd8/0x230 [mwifiex])
 [   49.086920] [<bf072874>] (mwifiex_cmd_timeout_func+0xd8/0x230
 [mwifiex]) from [<c0034b5c>] (run_timer_softirq+0x290/0x40c)
 [   49.086920] [<c0034b5c>] (run_timer_softirq+0x290/0x40c) from
 [<c002c204>] (__do_softirq+0x118/0x24c)
 [   49.086933] [<c002c204>] (__do_softirq+0x118/0x24c) from [<c002c74c>]
 (irq_exit+0x54/0x6c)
 [   49.086943] [<c002c74c>] (irq_exit+0x54/0x6c) from [<c000f920>]
 (handle_IRQ+0x74/0x94)
 [   49.086959] [<c000f920>] (handle_IRQ+0x74/0x94) from [<c0008548>]
 (asm_do_IRQ+0x18/0x1c)
 [   49.086970] [<c0008548>] (asm_do_IRQ+0x18/0x1c) from [<c000e4cc>]
 (__irq_svc+0x4c/0x94)
 [   49.086980] Exception stack(0xec92bf30 to 0xec92bf78)
 [   49.086985] bf20:                                     00000000 f0004000
 ec92bf68 ec92bfcc
 [   49.086993] bf40: ec3c0000 00000001 ec92a000 ec3c7800 7fffffff 00000008
 00000001 ec92bfbc
 [   49.087002] bf60: ec92bf78 ec92bf78 c0301dbc c0301dc4 60000113 ffffffff
 [   49.087010] [<c000e4cc>] (__irq_svc+0x4c/0x94) from [<c0301dc4>]
 (sdio_irq_thread+0x258/0x2f0)
 [   49.087021] [<c0301dc4>] (sdio_irq_thread+0x258/0x2f0) from
 [<c0045f14>] (kthread+0x9c/0xa8)
 [   49.087048] [<c0045f14>] (kthread+0x9c/0xa8) from [<c000f9fc>]
 (kernel_thread_exit+0x0/0x8)
 [   49.087053] ---[ end trace 35d43f93aa9731a4 ]---
 [   49.086561] Modules linked in: fuse xt_tcpudp iptable_filter ip_tables
 x_tables mousedev btmrvl_sdio btmrvl uinput joydev mwifiex_sdio bluetooth
 mwifiex fb_sys_fops sysimgblt sysfillrect syscopyarea psmouse mmp_camera
 videobuf2_core videobuf2_dma_sg videobuf2_vmalloc videobuf2_memops zforce
 ov7670 [last unloaded: udlfb]
 [   49.347987] mwifiex_sdio mmc0:0001:1: num_data_h2c_failure = 0
 [   49.381887] mwifiex_sdio mmc0:0001:1: num_cmd_h2c_failure = 0
 [   49.387597] mwifiex_sdio mmc0:0001:1: num_cmd_timeout = 1
 [   49.387606] mwifiex_sdio mmc0:0001:1: num_tx_timeout = 0
 [   49.398231] mwifiex_sdio mmc0:0001:1: last_cmd_index = 0
 [   49.398238] last_cmd_id: 00000000: e5 00 06 00 06
 .....
 [   49.411618] last_cmd_act: 00000000: 01 00 03 00 03
 .....
 [   49.419827] mwifiex_sdio mmc0:0001:1: last_cmd_resp_index = 4
 [   49.419836] last_cmd_resp_id: 00000000: 06 80 06 80 06
 .....
 [   49.434079] mwifiex_sdio mmc0:0001:1: last_event_index = 0
 [   49.439539] last_event: 00000000: 0a 00 0a 00 0b
 .....
 [   49.447575] mwifiex_sdio mmc0:0001:1: data_sent=0 cmd_sent=1
 [   49.447575] mwifiex_sdio mmc0:0001:1: ps_mode=0 ps_state=0

 }}}


 so i think the problem is that we're still asking the 8787 module to honor
 commands, after we've told it to go into host sleep mode.  but i think the
 card was supposed to be resumed already in order to prevent that.

-- 
Ticket URL: <http://dev.laptop.org/ticket/12657#comment:5>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list