1. 11 7月, 2012 6 次提交
    • S
      USB: Enable Latency Tolerance Messaging (LTM). · f74631e3
      Sarah Sharp 提交于
      USB 3.0 devices may optionally support a new feature called Latency
      Tolerance Messaging.  If both the xHCI host controller and the device
      support LTM, it should be turned on in order to give the system hardware
      a better clue about the latency tolerance values of its PCI devices.
      
      Once a Set Feature request to enable LTM is received, the USB 3.0 device
      will begin to send LTM updates as its buffers fill or empty, and it can
      tolerate more or less latency.
      
      The USB 3.0 spec, section C.4.2 says that LTM should be disabled just
      before the device is placed into suspend.  Then the device will send an
      updated LTM notification, so that the system doesn't think it should
      remain in an active state in order to satisfy the latency requirements
      of the suspended device.
      
      The Set and Clear Feature LTM enable command can only be sent to a
      configured device.  The device will respond with an error if that
      command is sent while it is in the Default or Addressed state.  Make
      sure to check udev->actconfig in usb_enable_ltm() and usb_disable_ltm(),
      and don't send those commands when the device is unconfigured.
      
      LTM should be enabled once a new configuration is installed in
      usb_set_configuration().  If we end up sending duplicate Set Feature LTM
      Enable commands on a switch from one installed configuration to another
      configuration, that should be harmless.
      
      Make sure that LTM is disabled before the device is unconfigured in
      usb_disable_device().  If no drivers are bound to the device, it doesn't
      make sense to allow the device to control the latency tolerance of the
      xHCI host controller.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      f74631e3
    • S
      xhci: Export Latency Tolerance Messaging capabilities. · af3a23ef
      Sarah Sharp 提交于
      Some xHCI host controllers may have optional support for Latency
      Tolerance Messaging (LTM).  This allows USB 3.0 devices that support LTM
      to pass information about how much latency they can tolerate to the xHC.
      A PCI xHCI host will use this information to update the PCI Latency
      Tolerance Request (LTR) info.  The goal of this is to gather latency
      information for the system, to enable hardware-driven C states, and the
      shutting down of PLLs.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      af3a23ef
    • S
      USB: Remove unused LPM variable. · c5c4bdf0
      Sarah Sharp 提交于
      hub_initiated_lpm_disable_count is not used by any code, so remove it.
      
      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
      c5c4bdf0
    • S
      USB: Fix LPM disable count mismatch on driver unbind. · 24971912
      Sarah Sharp 提交于
      When a user runs `echo 0 > bConfigurationValue` for a USB 3.0 device,
      usb_disable_device() is called.  This function disables all drivers,
      deallocates interfaces, and sets the device configuration value to 0
      (unconfigured).
      
      With the new scheme to ensure that unconfigured devices have LPM
      disabled, usb_disable_device() must call usb_unlocked_disable_lpm() once
      it unconfigures the device.
      
      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
      24971912
    • 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 3 次提交