1. 11 7月, 2012 2 次提交
    • S
      USB: Disable LPM while the device is unconfigured. · 9cf65991
      Sarah Sharp 提交于
      The USB 3.0 Set/Clear Feature U1/U2 Enable cannot be sent to a device in
      the Default or Addressed state.  It can only be sent to a configured
      device.  Change the USB core to initialize the LPM disable count to 1
      (disabled), which reflects this limitation.
      
      Change usb_set_configuration() to ensure that if the device is
      unconfigured on entry, usb_lpm_disable() is not called.  This avoids
      sending the Clear Feature U1/U2 when the device is in the Addressed
      state.  When usb_set_configuration() exits with a successfully installed
      configuration, usb_lpm_enable() will be called.
      
      Once the new configuration is installed, make sure
      usb_set_configuration() only calls usb_enable_lpm() if the device moved
      to the Configured state.  If we have unconfigured the device by sending
      it a Set Configuration for config 0, don't enable LPM.
      
      This commit should be backported to kernels as old as 3.5, that contain
      the commit 8306095f "USB: Disable USB
      3.0 LPM in critical sections."
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      9cf65991
    • S
      USB: Fix LPM disable/enable during device reset. · 6d1d0513
      Sarah Sharp 提交于
      The USB 3.0 specification says that sending a Set Feature or Clear
      Feature for U1/U2 Enable is not a valid request when the device is in
      the Default or Addressed state.  It is only valid when the device is in
      the Configured state.
      
      The original LPM patch attempted to disable LPM after the device had
      been reset by hub_port_init(), before it had the configuration
      reinstalled.  The TI hub I tested with did not fail the Clear Feature
      U1/U2 Enable request that khubd sent while it was in the addressed
      state, which is why I didn't catch it.
      
      Move the LPM disable before the device reset, so that we can send the
      Clear Feature U1/U2 Enable successfully, and balance the LPM disable
      count.
      
      Also delete any calls to usb_enable_lpm() on error paths that lead to
      re-enumeration.  The calls will fail because the device isn't
      configured, and it's not useful to balance the LPM disable count because
      the usb_device is about to be destroyed before re-enumeration.
      
      Fix the early exit path ("done" label) to call usb_enable_lpm() to
      balance the LPM disable count.
      
      Note that calling usb_reset_and_verify_device() with an unconfigured
      device may fail on the first call to usb_disable_lpm().  That's because
      the LPM disable count is initialized to 0 (LPM enabled), and
      usb_disable_lpm() will attempt to send a Clear Feature U1/U2 request to
      a device in the Addressed state.  The next patch will fix that.
      
      This commit should be backported to kernels as old as 3.5, that contain
      the commit 8306095f "USB: Disable USB
      3.0 LPM in critical sections."
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      6d1d0513
  2. 10 7月, 2012 12 次提交
  3. 09 7月, 2012 1 次提交
    • A
      EHCI: centralize controller suspend/resume · c5cf9212
      Alan Stern 提交于
      This patch (as1563) removes a lot of duplicated code by moving the
      EHCI controller suspend/resume routines into the core driver, where
      the various platform drivers can invoke them as needed.
      
      Not only does this simplify these platform drivers, this also makes it
      easier for other platform drivers to add suspend/resume support in the
      future.
      
      Note: The patch does not touch the ehci-fsl.c file, because its
      approach to suspend and resume is so different from all the others.
      It will have to be handled specially by its maintainer.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c5cf9212
  4. 07 7月, 2012 13 次提交
  5. 06 7月, 2012 4 次提交
    • G
      Merge tag 'xceiv-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next · ff9cce82
      Greg Kroah-Hartman 提交于
      usb: phy: patches for v3.6 merge window
      
      We are starting to support multiple USB phys as
      we should thanks for Kishon's work. DeviceTree support
      for USB PHYs won't come until discussion with DeviceTree
      maintainer is finished.
      
      Together with that series, we have one fix for twl4030
      which missed a IRQF_ONESHOT annotation when requesting
      a threaded IRQ without a top half handler, and removal
      of an unused variable compilation warning to isp1301_omap.
      ff9cce82
    • G
      Merge tag 'dwc3-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next · 93314150
      Greg Kroah-Hartman 提交于
      usb: dwc3: patches for v3.6 merge window
      
      lots of changes for the dwc3 driver which will make
      the driver a lot more stable and some changes which
      are just cosmetic.
      
      The bulk of changes is related to mis-defined macros
      which were never used before, some fixes to error path
      which e.g. prevent the driver from initiating two
      transfer on ep0out in case of stall, some fixes to
      request dequeueing and the End Transfer Command.
      
      We have some changes to U1/U2 handling where we were
      enabling those transtions at the wrong spot (though
      we haven't seen a problem from that as of today).
      
      A few patches will make it easier to add support for
      newer releases of the core by adding definitions for
      new registers and changing the code to act accordingly
      when certain revisions are detected.
      
      There's also the usual comestic changes to make the
      driver easier to maintain and make it easier for new-
      comers to understand the driver. Also one patch fixing
      a double inclusion of a header.
      93314150
    • G
      Merge tag 'gadget-for-v3.6' of... · 94ff447c
      Greg Kroah-Hartman 提交于
      Merge tag 'gadget-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
      
      usb: gadget: patches for v3.6 merge window
      
      This is quite a big pull request and contains patches
      all over the place.
      
      omap_udc is now a bit cleaner after removing omap2 support,
      fixing some checkpatch.pl warnings and errors, switching over
      to generic map/unmap routines and preventing a NULL pointer
      de-reference.
      
      s3c-hsotg has been switched over to devm_* API, got some
      locking fixes and improvements and it also got an implementation
      for the pullup() method.
      
      the mass storage gadgets changed default value of the removable
      parameter, dropped some unused options and made "file" and "ro"
      module_parameters read-only in some cases.
      
      ffs function got support for HID descriptor.
      
      Some UDCs have been converted to clk_prepare_enable() and
      clk_disable_unprepare().
      
      Marvell now got support for its USB3 controller in mainline
      after introducing its mv_u3d_core.c driver.
      94ff447c
    • G
      Merge tag 'musb-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next · 979eef33
      Greg Kroah-Hartman 提交于
      usb: musb: patches for v3.6 merge window
      
      Just two patches here:
      
      First we have a fix to disable DMA in case DMA channel
      request fails.
      
      Second, there's a fix for situations where the user
      kills musb (by rmmod or any other means) while a
      transfer is on the fly. In such cases, we could be
      led into a NULL pointer dereference due to endpoint
      being disabled and endpoint descriptor being NULL.
      979eef33
  6. 05 7月, 2012 1 次提交
  7. 02 7月, 2012 7 次提交