1. 25 3月, 2009 1 次提交
    • F
      USB: composite: avoid inconsistent lock state · b2bdf3a7
      Felipe Balbi 提交于
      Avoid the following INFO from lock debugging:
      
      [  369.126112] =================================
      [  369.132063] [ INFO: inconsistent lock state ]
      [  369.136457] 2.6.28-maemo1 #1
      [  369.139387] ---------------------------------
      [  369.143782] inconsistent {hardirq-on-W} -> {in-hardirq-W} usage.
      [  369.149855] swapper/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
      [  369.154890]  (&cdev->lock){+-..}, at: [<bf1979f0>] composite_disconnect+0x1c/0]
      [  369.163404] {hardirq-on-W} state was registered at:
      [  369.168348]   [<c00788a8>] __lock_acquire+0x5d0/0x7d8
      [  369.173506]   [<c0078b14>] lock_acquire+0x64/0x78
      [  369.178266]   [<c0263a34>] _spin_lock+0x4c/0x80
      [  369.182905]   [<bf19597c>] usb_function_deactivate+0x20/0x70 [g_nokia]
      [  369.189527]   [<bf1a0a88>] 0xbf1a0a88
      [  369.193281]   [<bf19f450>] 0xbf19f450
      [  369.197004]   [<bf19fa3c>] 0xbf19fa3c
      [  369.200758]   [<bf1a03a0>] 0xbf1a03a0
      [  369.204481]   [<bf19f254>] 0xbf19f254
      [  369.208204]   [<bf1a0158>] 0xbf1a0158
      [  369.211927]   [<bf1a130c>] 0xbf1a130c
      [  369.215650]   [<c01c21f0>] usb_gadget_register_driver+0x12c/0x28c
      [  369.221846]   [<bf1a06bc>] 0xbf1a06bc
      [  369.225569]   [<bf1a06e8>] 0xbf1a06e8
      [  369.229322]   [<c002c2dc>] __exception_text_end+0x64/0x19c
      [  369.234877]   [<c0081628>] sys_init_module+0x9c/0x194
      [  369.240004]   [<c002c8e0>] ret_fast_syscall+0x0/0x2c
      [  369.245039]   [<ffffffff>] 0xffffffff
      [  369.248793] irq event stamp: 218356
      [  369.252302] hardirqs last  enabled at (218355): [<c003a77c>] omap3_enter_idle+8
      [  369.260420] hardirqs last disabled at (218356): [<c0264774>] __irq_svc+0x34/0x0
      [  369.267927] softirqs last  enabled at (218348): [<c00585a4>] __do_softirq+0x134
      [  369.275892] softirqs last disabled at (218335): [<c005899c>] irq_exit+0x60/0xb0
      [  369.283308]
      [  369.283308] other info that might help us debug this:
      [  369.289930] no locks held by swapper/0.
      
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NFelipe Balbi <felipe.balbi@nokia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b2bdf3a7
  2. 28 1月, 2009 2 次提交
  3. 18 10月, 2008 2 次提交
  4. 22 7月, 2008 2 次提交
    • D
      usb gadget: minor USBCV fix for composite framework · c24f4227
      David Lopo 提交于
      Fill in a reserved/unused device qualifier field to ensure that
      the USBCV tests will always pass.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c24f4227
    • D
      usb gadget: composite gadget core · 40982be5
      David Brownell 提交于
      Add <linux/usb/composite.h> interfaces for composite gadget drivers, and
      basic implementation support behind it:
      
        - struct usb_function ... groups one or more interfaces into a function
          managed as one unit within a configuration, to which it's added by
          usb_add_function().
      
        - struct usb_configuration ... groups one or more such functions into
          a configuration managed as one unit by a driver, to which it's added
          by usb_add_config().  These operate at either high or full/low speeds
          and at a given bMaxPower.
      
        - struct usb_composite_driver ... groups one or more such configurations
          into a gadget driver, which may be registered or unregistered.
      
        - struct usb_composite_dev ... a usb_composite_driver manages this; it
          wraps the usb_gadget exposed by the controller driver.
      
      This also includes some basic kerneldoc.
      
      How to use it (the short version):  provide a usb_composite_driver with a
      bind() that calls usb_add_config() for each of the needed configurations.
      The configurations in turn have bind() calls, which will usb_add_function()
      for each function required.  Each function's bind() allocates resources
      needed to perform its tasks, like endpoints; sometimes configurations will
      allocate resources too.
      
      Separate patches will convert most gadget drivers to this infrastructure.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      40982be5