1. 13 5月, 2012 6 次提交
  2. 10 5月, 2012 1 次提交
    • S
      usb-gadget: Initial merge of target module for UASP + BOT · c52661d6
      Sebastian Andrzej Siewior 提交于
      This fabric uses the target framework to provide a usb gadget
      device.  This gadget supports the USB Attached SCSI Protocol (UASP)
      and Bulk Only Transfers (BOT or BBB). BOT is the primary interface,
      UAS is the alternative interface.
      
      It has been tested with dummy_hcd on HS and SS. On SS USB3 are
      supported. I also took my omap device and tried it there against
      WindowsXP.  UAS implements basic command passing (i.e. read/write
      requests) and TASK MANAGEMENT functions are missing.
      
      I had to add a little of error recovery to BOT because Windows was
      issuing some strange commands and it does not complain after the
      gadget responded with CSW.status=1.
      
      (nab: Move to drivers/usb/gadget as per Sebastian to address legacy
            limitations for built-in gadget code)
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Greg KH <gregkh@linuxfoundation.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c52661d6
  3. 02 5月, 2012 2 次提交
    • S
      USB: ehci-tegra: remove redundant gpio_set_value · 04c235c9
      Stephen Warren 提交于
      The immediately preceding gpio_direction_output() already set the value,
      so there's no need to repeat it. This also prevents gpio_set_value() from
      WARNing when the GPIO is sleepable (e.g. is on an I2C expander); the set
      direction API is always sleepable, but plain set_value isn't.
      
      Cc: <stable@vger.kernel.org> # v3.3
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      04c235c9
    • A
      EHCI: update PM methods in ehci-tegra.c · ebf20de4
      Alan Stern 提交于
      This patch (as1547) rearranges the Power Management parts of the
      ehci-tegra driver to match the conventions used in other EHCI platform
      drivers.  In particular, the controller should not be powered down by
      the root hub's suspend routine; the controller's power level should be
      managed by the controller's own PM methods.
      
      The end result of the patch is that the standard ehci_bus_suspend()
      and ehci_bus_resume() methods can be used instead of special-purpose
      routines.  The driver now uses the standard dev_pm_ops methods instead
      of legacy power management.  Since there is no supported wakeup
      mechanism for the controller, runtime suspend is forbidden by default
      (this can be overridden via sysfs, if desired).
      
      These adjustments are needed in order to make ehci-tegra compatible
      with recent changes to the USB core.  The core now checks the root
      hub's status following bus suspend; if the controller is automatically
      powered down during bus suspend then the check will fail and the root
      hub will be resumed immediately.  Doing the controller power-down in a
      separate method avoids this problem.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NStephen Warren <swarren@wwwdotorg.org>
      Tested-by: NStephen Warren <swarren@wwwdotorg.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ebf20de4
  4. 27 4月, 2012 3 次提交
  5. 25 4月, 2012 2 次提交
  6. 23 4月, 2012 1 次提交
  7. 20 4月, 2012 1 次提交
  8. 19 4月, 2012 8 次提交
    • F
      usb: gadget: dummy: do not call pullup() on udc_stop() · 15b120d6
      Felipe Balbi 提交于
      pullup() is already called properly by udc-core.c and
      there's no need to call it from udc_stop(), in fact that
      will cause issues.
      
      Cc: stable@vger.kernel.org
      Reviewed-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      15b120d6
    • S
      USB: ehci-tegra: don't call set_irq_flags(IRQF_VALID) · 8034761c
      Stephen Warren 提交于
      This call is not needed; the IRQ controller should (and does) set up
      interrupts correctly. set_irq_flags() isn't exported to modules, to
      this also fixes compilation of ehci-tegra.c as a module.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8034761c
    • T
      USB: yurex: Fix missing URB_NO_TRANSFER_DMA_MAP flag in urb · 532f17b5
      Tomoki Sekiyama 提交于
      Current probing code is setting URB_NO_TRANSFER_DMA_MAP flag into a wrong urb
      structure, and this causes BUG_ON with some USB host implementations.
      This patch fixes the issue.
      Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      532f17b5
    • T
      USB: yurex: Remove allocation of coherent buffer for setup-packet buffer · 523fc5c1
      Tomoki Sekiyama 提交于
      Removes allocation of coherent buffer for the control-request setup-packet
      buffer from the yurex driver. Using coherent buffers for setup-packet is
      obsolete and does not work with some USB host implementations.
      Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      523fc5c1
    • J
      drivers/usb/misc/usbtest.c: add kfrees · f4a728d0
      Julia Lawall 提交于
      Free the two previously allocated buffers before exiting the function in an
      error case.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f4a728d0
    • A
      USB: ehci-fsl: Fix kernel crash on mpc5121e · f941f692
      Anatolij Gustschin 提交于
      Since commit 28c56ea1
      (powerpc/usb: fix bug of kernel hang when initializing usb)
      the kernel crashes on mpc5121e. mpc5121e doesn't have system interface
      registers, accessing this register address space cause the machine check
      exception and a kernel crash:
      ...
      [    1.294596] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
      [    1.316491] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
      [    1.337334] fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
      [    1.358548] Machine check in kernel mode.
      [    1.375917] Caused by (from SRR1=49030): Transfer error ack signal
      [    1.395505] Oops: Machine check, sig: 7 [#1]
      [    1.413113] MPC5121 ADS
      [    1.428718] Modules linked in:
      [    1.444841] NIP: c026efc4 LR: c0278b50 CTR: 00000000
      [    1.463342] REGS: df837ba0 TRAP: 0200   Not tainted  (3.3.0-08839-gb5174fa3)
      [    1.484083] MSR: 00049030 <EE,ME,IR,DR>  CR: 42042022  XER: 20000000
      [    1.504099] TASK = df834000[1] 'swapper' THREAD: df836000
      [    1.509667] GPR00: 1c000000 df837c50 df834000 df9d74e0 00000003 00000010 00000000 00000000
      [    1.531650] GPR08: 00000020 00000000 c037cdd8 e1088000 22042028 1001a69c 00000000 00000000
      [    1.553762] GPR16: 1ffbce70 00000000 1fef5b28 1fef3e08 00000000 00000000 1ffcbc7c c045b264
      [    1.575824] GPR24: 0000008b 00000002 c04a7dd0 e1088000 df33c960 df9d74e0 00000000 df9d7400
      [    1.612295] NIP [c026efc4] ehci_fsl_setup_phy+0x110/0x124
      [    1.632454] LR [c0278b50] ehci_fsl_setup+0x29c/0x304
      [    1.652065] Call Trace:
      [    1.668923] [df837c50] [c0278a40] ehci_fsl_setup+0x18c/0x304 (unreliable)
      [    1.690332] [df837c70] [c025cba4] usb_add_hcd+0x1f0/0x66c
      [    1.710377] [df837cb0] [c0277ab8] ehci_fsl_drv_probe+0x180/0x308
      [    1.731322] [df837ce0] [c01fc7a8] platform_drv_probe+0x20/0x30
      [    1.752202] [df837cf0] [c01fb0ac] driver_probe_device+0x8c/0x214
      [    1.773491] [df837d10] [c01f956c] bus_for_each_drv+0x6c/0xa8
      [    1.794279] [df837d40] [c01fafdc] device_attach+0xb4/0xd8
      [    1.814574] [df837d60] [c01fa44c] bus_probe_device+0xa4/0xb4
      [    1.835343] [df837d80] [c01f87a8] device_add+0x52c/0x5dc
      [    1.855462] [df837dd0] [c01fcd58] platform_device_add+0x124/0x1d0
      [    1.876558] [df837df0] [c036dcec] fsl_usb2_device_register+0xa0/0xd4
      [    1.897512] [df837e10] [c036df28] fsl_usb2_mph_dr_of_probe+0x208/0x264
      [    1.918253] [df837e90] [c01fc7a8] platform_drv_probe+0x20/0x30
      [    1.938300] [df837ea0] [c01fb0ac] driver_probe_device+0x8c/0x214
      [    1.958511] [df837ec0] [c01fb2f0] __driver_attach+0xbc/0xc0
      [    1.978088] [df837ee0] [c01f9608] bus_for_each_dev+0x60/0x9c
      [    1.997589] [df837f10] [c01fab88] driver_attach+0x24/0x34
      [    2.016757] [df837f20] [c01fa744] bus_add_driver+0x1ac/0x274
      [    2.036339] [df837f50] [c01fb898] driver_register+0x88/0x150
      [    2.056052] [df837f70] [c01fcabc] platform_driver_register+0x68/0x78
      [    2.076650] [df837f80] [c0446500] fsl_usb2_mph_dr_driver_init+0x18/0x28
      [    2.097734] [df837f90] [c0003988] do_one_initcall+0x148/0x1b0
      [    2.117934] [df837fc0] [c042d89c] kernel_init+0xfc/0x190
      [    2.137667] [df837ff0] [c000d2c4] kernel_thread+0x4c/0x68
      [    2.157240] Instruction dump:
      [    2.174119] 90050004 4e800020 2f840003 419e0014 2f840004 409eff64 6400c000 4bffff5c
      [    2.196000] 64001000 7c0004ac 812b0500 0c090000 <4c00012c> 61290200 7c0004ac 912b0500
      [    2.218100] ---[ end trace 21659aedb84ad816 ]---
      [    2.237089]
      [    3.232940] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000007
      [    3.232954]
      [    3.271575] Rebooting in 1 seconds..
      
      Check pdata->have_sysif_regs flag before accessing system interface
      registers.
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f941f692
    • A
      EHCI: always clear the STS_FLR status bit · 2fbe2bf1
      Alan Stern 提交于
      This patch (as1544) fixes a problem affecting some EHCI controllers.
      They can generate interrupts whenever the STS_FLR status bit is turned
      on, even though that bit is masked out in the Interrupt Enable
      register.
      
      Since the driver doesn't use STS_FLR anyway, the patch changes the
      interrupt routine to clear that bit whenever it is set, rather than
      leaving it alone.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-and-tested-by: NTomoya MORINAGA <tomoya.rohm@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2fbe2bf1
    • S
      usb: ehci-tegra: Add vbus_gpio to platform data · 434103ad
      Stephen Warren 提交于
      Add a vbus_gpio field to platform data. This mirrors the device tree
      property nvidia,vbus-gpio. This makes the VBUS GPIO handling identical
      between booting with board files and device tree; the driver always does
      it.
      
      This removes the need for board files to request and initialize the GPIO
      early during their boot process, perhaps even before the GPIO driver is
      ready to process the request.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: linux-usb@vger.kernel.org
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NOlof Johansson <olof@lixom.net>
      434103ad
  9. 18 4月, 2012 7 次提交
    • J
      usb: musb: davinci.c: add missing unregister · c67dd31c
      Julia Lawall 提交于
      usb_nop_xceiv_unregister is needed on failure of usb_get_transceiver, as
      done in other error-handling code in the same function.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c67dd31c
    • F
      usb: musb: drop __deprecated flag · fc87e080
      Felipe Balbi 提交于
      Looks like we cannot live without that double_buffer_not_ok
      flag due to many HW bugs this MUSB core has.
      
      So, let's drop the __deprecated flag to avoid annoying
      compile warnings.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      fc87e080
    • A
      EHCI: fix criterion for resuming the root hub · dc75ce9d
      Alan Stern 提交于
      This patch (as1542) changes the criterion ehci-hcd uses to tell when
      it needs to resume the controller's root hub.  A resume is needed when
      a port status change is detected, obviously, but only if the root hub
      is currently suspended.
      
      Right now the driver tests whether the root hub is running, and that
      is not the correct test.  In particular, if the controller has died
      then the root hub should not be restarted.  In addition, some buggy
      hardware occasionally requires the root hub to be running and
      sending out SOF packets even while it is nominally supposed to be
      suspended.
      
      In the end, the test needs to be changed.  Rather than checking whether
      the root hub is currently running, the driver will now check whether
      the root hub is currently suspended.  This will yield the correct
      behavior in all cases.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Peter Chen <B29397@freescale.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dc75ce9d
    • B
      USB: sierra: avoid QMI/wwan interface on MC77xx · 749541d1
      Bjørn Mork 提交于
      These devices have a number of non serial interfaces as well.  Use
      the existing "Direct IP" blacklist to prevent binding to interfaces
      which are handled by other drivers.
      
      We also extend the "Direct IP" blacklist with with interfaces only
      seen in "QMI" mode, assuming that these devices use the same
      interface numbers for serial interfaces both in "Direct IP" and in
      "QMI" mode.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      749541d1
    • X
      usb: usbtest: avoid integer overflow in alloc_sglist() · 8bde9a62
      Xi Wang 提交于
      A large `nents' from userspace could overflow the allocation size,
      leading to memory corruption.
      
      | alloc_sglist()
      | usbtest_ioctl()
      
      Use kmalloc_array() to avoid the overflow.
      Signed-off-by: NXi Wang <xi.wang@gmail.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8bde9a62
    • X
      usb: usbtest: avoid integer overflow in test_ctrl_queue() · e65cdfae
      Xi Wang 提交于
      Avoid overflowing context.count = param->sglen * param->iterations,
      where both `sglen' and `iterations' are from userspace.
      
      | test_ctrl_queue()
      | usbtest_ioctl()
      
      Keep -EOPNOTSUPP for error code.
      Signed-off-by: NXi Wang <xi.wang@gmail.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e65cdfae
    • A
      USB: fix deadlock in bConfigurationValue attribute method · 8963c487
      Alan Stern 提交于
      This patch (as154) fixes a self-deadlock that occurs when userspace
      writes to the bConfigurationValue sysfs attribute for a hub with
      children.  The task tries to lock the bandwidth_mutex at a time when
      it already owns the lock:
      
      	The attribute's method calls usb_set_configuration(),
      	which calls usb_disable_device() with the bandwidth_mutex
      	held.
      
      	usb_disable_device() unregisters the existing interfaces,
      	which causes the hub driver to be unbound.
      
      	The hub_disconnect() routine calls hub_quiesce(), which
      	calls usb_disconnect() for each of the hub's children.
      
      	usb_disconnect() attempts to acquire the bandwidth_mutex
      	around a call to usb_disable_device().
      
      The solution is to make usb_disable_device() acquire the mutex for
      itself instead of requiring the caller to hold it.  Then the mutex can
      cover only the bandwidth deallocation operation and not the region
      where the interfaces are unregistered.
      
      This has the potential to change system behavior slightly when a
      config change races with another config or altsetting change.  Some of
      the bandwidth released from the old config might get claimed by the
      other config or altsetting, make it impossible to restore the old
      config in case of a failure.  But since we don't try to recover from
      config-change failures anyway, this doesn't matter.
      
      [This should be marked for stable kernels that contain the commit
      fccf4e86 "USB: Free bandwidth when
      usb_disable_device is called."
      That commit was marked for stable kernels as old as 2.6.32.]
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8963c487
  10. 17 4月, 2012 3 次提交
  11. 13 4月, 2012 1 次提交
    • P
      ARM: OMAP1: OHCI: use platform_data fn ptr to enable OCPI bus · d3645d39
      Paul Walmsley 提交于
      The OMAP1 OHCI driver needs to enable the OCPI IP block before it can
      work.  Previously, the driver was simply calling a symbol defined in
      the OMAP platform code, but this is incorrect: drivers should be fully
      decoupled from platform and architecture code.
      
      So instead, modify the driver to call through a platform_data function
      pointer instead.  We skip any DT aspect, since OMAP1 is not scheduled
      to be converted to DT in the near future.
      
      This resolves the following sparse warning:
      
      It also gets rid of a cpu_is_omap16xx() call in a driver.
      
      In the long term, it probably makes sense to move the OCPI bus code to
      somewhere under drivers/.  This should avoid the whole platform_data/DT
      issue with this function.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Anand Gadiyar <gadiyar@ti.com>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      d3645d39
  12. 12 4月, 2012 2 次提交
  13. 11 4月, 2012 3 次提交