Google
  Web www.spinics.net

Re: [PATCH] Fix clk->enabled counter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Dmitry Baryshkov wrote:

> David Brownell wrote:
> 
>> On Thursday 10 January 2008, Dmitry Baryshkov wrote:
>>> Hi,
>>> 
>>> eric miao wrote:
>>> 
>>> > isn't it better to extract clk_{enable, disable} from udc_disable()?
>>> > this can be treated as two different things, one is for the clock,
>>> > the other controls the udc register bit, and better be divided.
>>> 
>>> Good idea. What about this patch:
>> 
>> Minor issues as noted below.  You tested this?  With suspend, resume,
>> remote wakeup, unplug-while-active, and rmmod g_<what> scenarios to
>> make sure the main code paths behave OK?
> 
> 
> I've tested with g_ether the suspend/resume of gadget (got log messages
> as found bellow, but otherwise OK), plug-unplug also works. Can't test
> rmmod/modrobe as I don't build modular kernels for my device. Also what
> do you mean by remote wakeup? I'll try making modules to work, fix
> things you noted and resubmit the patch.

Oops...forgot the log:

pxa2xx-udc pxa2xx-udc: suspend
udc: inactive
udc: disconnect ether

=================================
[ INFO: inconsistent lock state ]
2.6.24-rc8 #110
---------------------------------
inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
apmd/975 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&dev->req_lock){++..}, at: [<c01a06e8>] rx_complete+0x1b0/0x204
{in-hardirq-W} state was registered at:
  [<c0058dc0>] lock_acquire+0x6c/0x84
  [<c0245164>] _spin_lock+0x40/0x50
  [<c019f038>] set_ether_config+0x1d0/0x210
  [<c019f0e0>] eth_set_config+0x68/0x138
  [<c01a032c>] eth_setup+0x238/0x444
  [<c019e0cc>] pxa2xx_udc_irq+0x368/0x638
  [<c00649f0>] handle_IRQ_event+0x2c/0x70
  [<c0066498>] handle_level_irq+0xb8/0x120
  [<c001c048>] __exception_text_start+0x48/0x64
  [<c001ca88>] __irq_svc+0x48/0xd0
  [<c001e4e0>] cpu_idle+0x38/0x64
  [<c02427b8>] rest_init+0x64/0x74
  [<c0008be0>] start_kernel+0x22c/0x288
  [<a0008034>] 0xa0008034
irq event stamp: 5342
hardirqs last  enabled at (5342): [<c0087f8c>] kmem_cache_free+0xd8/0xe0
hardirqs last disabled at (5341): [<c0087ee0>] kmem_cache_free+0x2c/0xe0
softirqs last  enabled at (4739): [<c003bfa4>] __do_softirq+0x100/0x114
softirqs last disabled at (4734): [<c003c52c>] irq_exit+0x5c/0x70

other info that might help us debug this:
2 locks held by apmd/975:
 #0:  (pm_mutex){--..}, at: [<c0061c5c>] enter_state+0x170/0x1d0
 #1:  (dpm_mtx){--..}, at: [<c0161534>] device_suspend+0x20/0x2d4

stack backtrace:
[<c0021818>] (dump_stack+0x0/0x14) from [<c005670c>] (print_usage_bug+0x10c/0x144)
[<c0056600>] (print_usage_bug+0x0/0x144) from [<c0057228>] (mark_lock+0x27c/0x530)
[<c0056fac>] (mark_lock+0x0/0x530) from [<c00580cc>] (__lock_acquire+0x4e0/0xcf4)
[<c0057bec>] (__lock_acquire+0x0/0xcf4) from [<c0058dc0>] (lock_acquire+0x6c/0x84)
[<c0058d54>] (lock_acquire+0x0/0x84) from [<c0245164>] (_spin_lock+0x40/0x50)
 r7:c030d498 r6:c3e57c30 r5:c01a06e8 r4:c3d71584
[<c0245124>] (_spin_lock+0x0/0x50) from [<c01a06e8>] (rx_complete+0x1b0/0x204)
 r5:c3d71540 r4:c3d71584
[<c01a0538>] (rx_complete+0x0/0x204) from [<c019c7f0>] (done+0x5c/0x70)
 r6:c030d0e8 r5:c3e57c30 r4:00000001
[<c019c794>] (done+0x0/0x70) from [<c019c820>] (nuke+0x1c/0x50)
 r6:00000003 r5:ffffff94 r4:c030d0e8
[<c019c804>] (nuke+0x0/0x50) from [<c019c8a0>] (stop_activity+0x4c/0x80)
 r5:c030ce20 r4:c030d0e8
[<c019c854>] (stop_activity+0x0/0x80) from [<c019ca08>] (pullup+0x134/0x190)
 r7:00000000 r6:00000002 r5:c02f4e20 r4:c030ce20
[<c019c8d4>] (pullup+0x0/0x190) from [<c019dd58>] (pxa2xx_udc_suspend+0x50/0x5c)
 r5:c02f4e20 r4:c030ce20
[<c019dd08>] (pxa2xx_udc_suspend+0x0/0x5c) from [<c015ee60>] (platform_drv_suspend+0x20/0x24)
 r4:c02f4f78
[<c015ee40>] (platform_drv_suspend+0x0/0x24) from [<c015eeb4>] (platform_suspend+0x2c/0x38)
[<c015ee88>] (platform_suspend+0x0/0x38) from [<c01616b0>] (device_suspend+0x19c/0x2d4)
[<c0161514>] (device_suspend+0x0/0x2d4) from [<c0061a08>] (suspend_devices_and_enter+0x4c/0x130)
 r8:c001d108 r7:00000003 r6:00000003 r5:c05245a0 r4:00002969
[<c00619bc>] (suspend_devices_and_enter+0x0/0x130) from [<c0061c14>] (enter_state+0x128/0x1d0)
 r6:c02ac158 r5:c05268bc r4:00002969
[<c0061aec>] (enter_state+0x0/0x1d0) from [<c0061d9c>] (pm_suspend+0x20/0x2c)
 r7:00000036 r6:c3f3ace0 r5:00004102 r4:00000000
[<c0061d7c>] (pm_suspend+0x0/0x2c) from [<c0155cb8>] (apm_suspend+0x18/0xac)
[<c0155ca0>] (apm_suspend+0x0/0xac) from [<c015640c>] (apm_ioctl+0x80/0x2b0)
 r4:00000000
[<c015638c>] (apm_ioctl+0x0/0x2b0) from [<c00994fc>] (do_ioctl+0x7c/0x98)
 r6:00000000 r5:00004102 r4:c3e56bd0
[<c0099480>] (do_ioctl+0x0/0x98) from [<c00997c4>] (vfs_ioctl+0x2ac/0x2dc)
 r6:00000000 r5:c3f2d498 r4:c3e56bd0
[<c0099518>] (vfs_ioctl+0x0/0x2dc) from [<c0099834>] (sys_ioctl+0x40/0x64)
 r9:c3f62000 r8:c001d108 r6:00004102 r5:fffffff7 r4:c3e56bd0
[<c00997f4>] (sys_ioctl+0x0/0x64) from [<c001cf60>] (ret_fast_syscall+0x0/0x2c)
 r6:0000001e r5:0000000a r4:00000000
usb0: eth_reset_config

-- 
With best wishes
Dmitry



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

[Home]     [Video for Linux]     [Photo]     [Yosemite Forum]     [Yosemite Photos]    [Video Projectors]     [PDAs]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [Free Dating]

  Powered by Linux