1. 11 4月, 2012 6 次提交
    • A
      usb: s3c-hsotg: Fix maximum patcket size setting for EP0 · 659ad60c
      Anton Tikhomirov 提交于
      MPS field of DOEPCTL0 is read only.
      Signed-off-by: NAnton Tikhomirov <av.tikhomirov@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      659ad60c
    • A
      usb: s3c-hsotg: Fix TX FIFOs allocation · f7a83fe1
      Anton Tikhomirov 提交于
      According to documentation, TX FIFO_number index starts from 1.
      For IN endpoint FIFO 0 we use GNPTXFSIZ register for programming
      the size and memory start address.
      Signed-off-by: NAnton Tikhomirov <av.tikhomirov@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f7a83fe1
    • P
      usb: fsl_udc_core: prime status stage once data stage has primed · f79a60b8
      Peter Chen 提交于
      - For Control Read transfer, the ACK handshake on an IN transaction
      may be corrupted, so the device may not receive the ACK for data
      stage, the complete irq will not occur at this situation.
      Therefore, we need to move prime status stage from complete irq
      routine to the place where the data stage has just primed, or the
      host will never get ACK for status stage.
      The above issue has been described at USB2.0 spec chapter 8.5.3.3.
      
      - After adding prime status stage just after prime the data stage,
      there is a potential problem when the status dTD is added before the data stage
      has primed by hardware. The reason is the device's dTD descriptor has NO direction bit,
      if data stage (IN) prime hasn't finished, the status stage(OUT)
      dTD will be added at data stage dTD's Next dTD Pointer, so when the data stage
      transfer has finished, the status dTD will be primed as IN by hardware,
      then the host will never receive ACK from the device side for status stage.
      
      - Delete below code at fsl_ep_queue:
             /* Update ep0 state */
             if ((ep_index(ep) == 0))
                     udc->ep0_state = DATA_STATE_XMIT;
      the udc->ep0_state will be updated again after udc->driver->setup
      finishes.
      
      It is tested at i.mx51 bbg board with g_mass_storage, g_ether, g_serial.
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f79a60b8
    • G
      usb: musb: fix some runtime_pm issues · c04352a5
      Grazvydas Ignotas 提交于
      When runtime_pm was originally added, it was done in rather confusing
      way: omap2430_musb_init() (called from musb_init_controller) would do
      runtime_pm_get_sync() and musb_init_controller() itself would do
      runtime_pm_put to balance it out. This is not only confusing but also
      wrong if non-omap2430 glue layer is used.
      
      This confusion resulted in commit 772aed45 "usb: musb: fix
      pm_runtime mismatch", that removed runtime_pm_put() from
      musb_init_controller as that looked unbalanced, and also happened to
      fix unrelated isp1704_charger crash. However this broke runtime PM
      functionality (musb is now always powered, even without gadget active).
      
      Avoid these confusing runtime pm dependences by making
      musb_init_controller() and omap2430_musb_init() do their own runtime
      get/put pairs; also cover error paths. Remove unneeded runtime_pm_put
      in omap2430_remove too. isp1704_charger crash that motivated
      772aed45 will be fixed by following patch.
      
      Cc: Felipe Contreras <felipe.contreras@gmail.com>
      Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c04352a5
    • V
      usb: musb: fix oops on omap2430 module unload · afb76df1
      Vladimir Zapolskiy 提交于
      This change prevents runtime suspend and resume actual execution, if
      omap2430 controller driver is loaded after musb-hdrc, and therefore the
      controller isn't initialized properly.
      
      The problem is reproducible with 3.1.y and 3.2 kernels.
      
      Kernel configuration of musb:
      
        % cat .config | egrep 'MUSB|GADGET'
        CONFIG_USB_MUSB_HDRC=y
        # CONFIG_USB_MUSB_TUSB6010 is not set
        CONFIG_USB_MUSB_OMAP2PLUS=m
        # CONFIG_USB_MUSB_AM35X is not set
        CONFIG_MUSB_PIO_ONLY=y
        CONFIG_USB_GADGET=y
        # CONFIG_USB_GADGET_DEBUG is not set
        # CONFIG_USB_GADGET_DEBUG_FILES is not set
        # CONFIG_USB_GADGET_DEBUG_FS is not set
        CONFIG_USB_GADGET_VBUS_DRAW=2
        CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
        CONFIG_USB_GADGET_MUSB_HDRC=m
        CONFIG_USB_GADGET_DUALSPEED=y
        CONFIG_USB_GADGETFS=m
        # CONFIG_USB_MIDI_GADGET is not set
      
      Fixes the following oops on module unloading:
      
        Unable to handle kernel NULL pointer dereference at virtual address 00000220
        ----8<----
        [<bf162088>] (omap2430_runtime_resume+0x24/0x54 [omap2430]) from [<c0302e34>] (pm_generic_runtime_resume+0x3c/0x50)
        [<c0302e34>] (pm_generic_runtime_resume+0x3c/0x50) from [<c0031a24>] (_od_runtime_resume+0x28/0x2c)
        [<c0031a24>] (_od_runtime_resume+0x28/0x2c) from [<c0306cb0>] (__rpm_callback+0x60/0xa0)
        [<c0306cb0>] (__rpm_callback+0x60/0xa0) from [<c0307f2c>] (rpm_resume+0x3fc/0x6e4)
        [<c0307f2c>] (rpm_resume+0x3fc/0x6e4) from [<c030851c>] (__pm_runtime_resume+0x5c/0x90)
        [<c030851c>] (__pm_runtime_resume+0x5c/0x90) from [<c02fd0dc>] (__device_release_driver+0x2c/0xd0)
        [<c02fd0dc>] (__device_release_driver+0x2c/0xd0) from [<c02fda18>] (driver_detach+0xe8/0xf4)
        [<c02fda18>] (driver_detach+0xe8/0xf4) from [<c02fcf88>] (bus_remove_driver+0xa0/0x104)
        [<c02fcf88>] (bus_remove_driver+0xa0/0x104) from [<c02fde54>] (driver_unregister+0x60/0x80)
        [<c02fde54>] (driver_unregister+0x60/0x80) from [<c02ff2d4>] (platform_driver_unregister+0x1c/0x20)
        [<c02ff2d4>] (platform_driver_unregister+0x1c/0x20) from [<bf162928>] (omap2430_exit+0x14/0x1c [omap2430])
        [<bf162928>] (omap2430_exit+0x14/0x1c [omap2430]) from [<c007d8bc>] (sys_delete_module+0x1f4/0x264)
        [<c007d8bc>] (sys_delete_module+0x1f4/0x264) from [<c000f000>] (ret_fast_syscall+0x0/0x30)
      Signed-off-by: NVladimir Zapolskiy <vladimir.zapolskiy@nokia.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: stable@vger.kernel.org # 3.1
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      afb76df1
    • G
      usb: dwc3: ep0: add a default case for SetFeature command · ecb07797
      Gerard Cauvy 提交于
      Without this default case returning an error,
      thus replying with a stall, we would fail
      USB30CV TD 9.11 Bad Feature test case.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NGerard Cauvy <g-cauvy1@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ecb07797
  2. 10 4月, 2012 3 次提交
  3. 06 4月, 2012 1 次提交
    • S
      simple_open: automatically convert to simple_open() · 234e3405
      Stephen Boyd 提交于
      Many users of debugfs copy the implementation of default_open() when
      they want to support a custom read/write function op.  This leads to a
      proliferation of the default_open() implementation across the entire
      tree.
      
      Now that the common implementation has been consolidated into libfs we
      can replace all the users of this function with simple_open().
      
      This replacement was done with the following semantic patch:
      
      <smpl>
      @ open @
      identifier open_f != simple_open;
      identifier i, f;
      @@
      -int open_f(struct inode *i, struct file *f)
      -{
      (
      -if (i->i_private)
      -f->private_data = i->i_private;
      |
      -f->private_data = i->i_private;
      )
      -return 0;
      -}
      
      @ has_open depends on open @
      identifier fops;
      identifier open.open_f;
      @@
      struct file_operations fops = {
      ...
      -.open = open_f,
      +.open = simple_open,
      ...
      };
      </smpl>
      
      [akpm@linux-foundation.org: checkpatch fixes]
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      234e3405
  4. 05 4月, 2012 5 次提交
  5. 31 3月, 2012 1 次提交
  6. 29 3月, 2012 1 次提交
  7. 28 3月, 2012 1 次提交
  8. 26 3月, 2012 2 次提交
  9. 24 3月, 2012 6 次提交
  10. 21 3月, 2012 5 次提交
  11. 17 3月, 2012 3 次提交
  12. 16 3月, 2012 6 次提交