1. 22 2月, 2012 1 次提交
    • E
      USB: Set hub depth after USB3 hub reset · a45aa3b3
      Elric Fu 提交于
      The superspeed device attached to a USB 3.0 hub(such as VIA's)
      doesn't respond the address device command after resume. The
      root cause is the superspeed hub will miss the Hub Depth value
      that is used as an offset into the route string to locate the
      bits it uses to determine the downstream port number after
      reset, and all packets can't be routed to the device attached
      to the superspeed hub.
      
      Hub driver sends a Set Hub Depth request to the superspeed hub
      except for USB 3.0 root hub when the hub is initialized and
      doesn't send the request again after reset due to the resume
      process. So moving the code that sends the Set Hub Depth request
      to the superspeed hub from hub_configure() to hub_activate()
      is to cover those situations include initialization and reset.
      
      The patch should be backported to kernels as old as 2.6.39.
      Signed-off-by: NElric Fu <elricfu1@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable@vger.kernel.org
      a45aa3b3
  2. 13 1月, 2012 1 次提交
  3. 10 12月, 2011 1 次提交
    • A
      USB: Adding #define in hub_configure() and hcd.c file · 7bf01185
      Aman Deep 提交于
      This patch is in succession of previous patch
      commit c8421147
              xHCI: Adding #define values used for hub descriptor
      
      Hub descriptors characteristics #defines values are added in
      hub_configure() in place of magic numbers as asked by Alan Stern.
      And the indentation for switch and case is changed to be same.
      
      Some #defines values are added in ch11.h for defining hub class
      protocols and used in hub.c and hcd.c in which magic values were
      used for hub class protocols.
      Signed-off-by: NAman Deep <amandeep3986@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7bf01185
  4. 27 11月, 2011 1 次提交
  5. 05 11月, 2011 1 次提交
    • D
      usb, xhci: Clear warm reset change event during init · 79c3dd81
      Don Zickus 提交于
      I noticed on my Panther Point system that I wasn't getting hotplug events
      for my usb3.0 disk on a usb3 port.  I tracked it down to the fact that the
      system had the warm reset change bit still set.  This seemed to block future
      events from being received, including a hotplug event.
      
      Clearing this bit during initialization allowed the hotplug event to be
      received and the disk to be recognized correctly.
      
      This patch should be backported to kernels as old as 2.6.39.
      Signed-off-by: NDon Zickus <dzickus@redhat.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      79c3dd81
  6. 28 9月, 2011 1 次提交
  7. 27 9月, 2011 3 次提交
  8. 21 9月, 2011 2 次提交
    • S
      USB: When hot reset for USB3 fails, try warm reset. · 10d674a8
      Sarah Sharp 提交于
      When a hot reset (standard USB port reset) fails on a USB 3.0 port, the
      host controller transitions to the "Error" state.  It reports the port
      link state as "Inactive", sets the link state change flag, and (if the
      device disconnects) also reports the disconnect and connect change status.
      It's also supposed to transition the link state to "RxDetect", but the NEC
      µPD720200 xHCI host does not.
      
      Unfortunately, Harald found that the combination of the NEC µPD720200 and
      a LogiLink USB 3.0 to SATA adapter triggered this issue.  The USB core
      would reset the device, the port would go into this error state, and the
      device would never be enumerated.  This combination works under Windows,
      but not under Linux.
      
      When a hot reset fails on a USB 3.0 port, and the link state is reported
      as Inactive, fall back to a warm port reset instead.  Harald confirms that
      with a warm port reset (along with all the change bits being correctly
      cleared), the USB 3.0 device will successfully enumerate.
      
      Harald also had to add two other patches ("xhci: Set change bit when warm
      reset change is set." and "usbcore: refine warm reset logic") to make this
      setup work.  Since the warm reset refinement patch is not destined for the
      stable kernels (it's too big), this patch should not be backported either.
      
      This fixes https://bugzilla.kernel.org/show_bug.cgi?id=41752Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: NHarald Brennich <harald.brennich@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      10d674a8
    • A
      usbcore: refine warm reset logic · 75d7cf72
      Andiry Xu 提交于
      Current waiting time for warm(BH) reset in hub_port_warm_reset() is too short
      for xHC host to complete the warm reset and report a BH reset change.
      
      This patch increases the waiting time for warm reset and merges the function
      into hub_port_reset(), so it can handle both cold reset and warm reset, and
      factor out hub_port_finish_reset() to make the code looks cleaner.
      
      This fixes the issue that driver fails to clear BH reset change and port is
      "dead".
      Signed-off-by: NAndiry Xu <andiry.xu@amd.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      75d7cf72
  9. 18 9月, 2011 1 次提交
    • M
      usb: Provide usb_speed_string() function · e538dfda
      Michal Nazarewicz 提交于
      In a few places in the kernel, the code prints
      a human-readable USB device speed (eg. "high speed").
      This involves a switch statement sometimes wrapped
      around in ({ ... }) block leading to code repetition.
      
      To mitigate this issue, this commit introduces
      usb_speed_string() function, which returns
      a human-readable name of provided speed.
      
      It also changes a few places switch was used to use
      this new function.  This changes a bit the way the
      speed is printed in few instances at the same time
      standardising it.
      Signed-off-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e538dfda
  10. 24 8月, 2011 1 次提交
    • K
      USB: use usb_endpoint_maxp() instead of le16_to_cpu() · 29cc8897
      Kuninori Morimoto 提交于
      Now ${LINUX}/drivers/usb/* can use usb_endpoint_maxp(desc) to get maximum packet size
      instead of le16_to_cpu(desc->wMaxPacketSize).
      This patch fix it up
      
      Cc: Armin Fuerst <fuerst@in.tum.de>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Johannes Erdfelt <johannes@erdfelt.com>
      Cc: Vojtech Pavlik <vojtech@suse.cz>
      Cc: Oliver Neukum <oliver@neukum.name>
      Cc: David Kubicek <dave@awk.cz>
      Cc: Johan Hovold <jhovold@gmail.com>
      Cc: Brad Hards <bhards@bigpond.net.au>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Thomas Dahlmann <dahlmann.thomas@arcor.de>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: David Lopo <dlopo@chipidea.mips.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Michal Nazarewicz <m.nazarewicz@samsung.com>
      Cc: Xie Xiaobo <X.Xie@freescale.com>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Jiang Bo <tanya.jiang@freescale.com>
      Cc: Yuan-hsin Chen <yhchen@faraday-tech.com>
      Cc: Darius Augulis <augulis.darius@gmail.com>
      Cc: Xiaochen Shen <xiaochen.shen@intel.com>
      Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Cc: OKI SEMICONDUCTOR, <toshiharu-linux@dsn.okisemi.com>
      Cc: Robert Jarzmik <robert.jarzmik@free.fr>
      Cc: Ben Dooks <ben@simtec.co.uk>
      Cc: Thomas Abraham <thomas.ab@samsung.com>
      Cc: Herbert Pötzl <herbert@13thfloor.at>
      Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
      Cc: Roman Weissgaerber <weissg@vienna.at>
      Acked-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Tony Olech <tony.olech@elandigitalsystems.com>
      Cc: Florian Floe Echtler <echtler@fs.tum.de>
      Cc: Christian Lucht <lucht@codemercs.com>
      Cc: Juergen Stuber <starblue@sourceforge.net>
      Cc: Georges Toth <g.toth@e-biz.lu>
      Cc: Bill Ryder <bryder@sgi.com>
      Cc: Kuba Ober <kuba@mareimbrium.org>
      Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      29cc8897
  11. 23 8月, 2011 1 次提交
  12. 20 8月, 2011 1 次提交
  13. 16 6月, 2011 2 次提交
    • A
      USB: don't let the hub driver prevent system sleep · cbb33004
      Alan Stern 提交于
      This patch (as1465) continues implementation of the policy that errors
      during suspend or hibernation should not prevent the system from going
      to sleep.
      
      In this case, failure to turn on the Suspend feature for a hub port
      shouldn't be reported as an error.  There are situations where this
      does actually occur (such as when the device plugged into that port
      was disconnected in the recent past), and it turns out to be harmless.
      There's no reason for it to prevent a system sleep.
      
      Also, don't allow the hub driver to fail a system suspend if the
      downstream ports aren't all suspended.  This is also harmless (and
      should never happen, given the change mentioned above); printing a
      warning message in the kernel log is all we really need to do.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cbb33004
    • S
      USB: Free bandwidth when usb_disable_device is called. · fccf4e86
      Sarah Sharp 提交于
      Tanya ran into an issue when trying to switch a UAS device from the BOT
      configuration to the UAS configuration via the bConfigurationValue sysfs
      file.  Before installing the UAS configuration, set_bConfigurationValue()
      calls usb_disable_device().  That function is supposed to remove all host
      controller resources associated with that device, but it leaves some state
      in the xHCI host controller.
      
      Commit 0791971b
      	usb: allow drivers to use allocated bandwidth until unbound
      added a call to usb_disable_device() in usb_set_configuration(), before
      the xHCI bandwidth functions were invoked.  That commit fixed a bug, but
      also introduced a bug that is triggered when a configured device is
      switched to a new configuration.
      
      usb_disable_device() goes through all the motions of unbinding the drivers
      attached to active interfaces and removing the USB core structures
      associated with those interfaces, but it doesn't actually remove the
      endpoints from the internal xHCI host controller bandwidth structures.
      
      When usb_disable_device() calls usb_disable_endpoint() with reset_hardware
      set to true, the entries in udev->ep_out and udev->ep_in will be set to
      NULL.  Usually, when the USB core installs a new configuration,
      usb_hcd_alloc_bandwidth() will drop all non-NULL endpoints in udev->ep_out
      and udev->ep_in before adding any new endpoints.  However, when the new
      UAS configuration was added, all those entries were null, so none of the
      old endpoints in the BOT configuration were dropped.
      
      The xHCI driver blindly added the UAS configuration endpoints, and some of
      the endpoint addresses overlapped with the old BOT configuration
      endpoints.  This caused the xHCI host to reject the Configure Endpoint
      command.  Now that the xHCI driver code is cleaned up to reject a
      double-add of active endpoints, we need to fix the USB core to properly
      drop old endpoints in usb_disable_device().
      
      If the host controller driver needs bandwidth checking support, make
      usb_disable_device() call usb_disable_endpoint() with
      reset_hardware set to false, drop the endpoints from the xHCI host
      controller, and then call usb_disable_endpoint() again with
      reset_hardware set to true.
      
      The first call to usb_disable_endpoint() will cancel any pending URBs and
      wait on them to be freed in usb_hcd_disable_endpoint(), but will keep the
      pointers in udev->ep_out and udev->ep in intact.  Then
      usb_hcd_alloc_bandwidth() will use those pointers to know which endpoints
      to drop.
      
      The final call to usb_disable_endpoint() will do two things:
      
      1. It will call usb_hcd_disable_endpoint() again, which should be harmless
      since the ep->urb_list should be empty after the first call to
      usb_disable_endpoint() returns.
      
      2. It will set the entries in udev->ep_out and udev->ep in to NULL, and call
      usb_hcd_disable_endpoint().  That call will have no effect, since the xHCI
      driver doesn't set the endpoint_disable function pointer.
      
      Note that usb_disable_device() will now need to be called with
      hcd->bandwidth_mutex held.
      
      This should be backported to kernels as old as 2.6.32.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: NTanya Brokhman <tlinder@codeaurora.org>
      Cc: ablay@codeaurora.org
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: stable@kernel.org
      fccf4e86
  14. 07 6月, 2011 1 次提交
  15. 03 5月, 2011 3 次提交
  16. 14 4月, 2011 1 次提交
  17. 31 3月, 2011 1 次提交
  18. 15 3月, 2011 1 次提交
  19. 14 3月, 2011 5 次提交
    • S
      USB: Disable auto-suspend for USB 3.0 hubs. · 0c9ffe0f
      Sarah Sharp 提交于
      USB 3.0 devices have a slightly different suspend sequence than USB
      2.0/1.1 devices.  There isn't support for USB 3.0 device suspend yet, so
      make khubd leave autosuspend disabled for USB 3.0 hubs.  Make sure that
      USB 3.0 roothubs still have autosuspend enabled, since that path in the
      xHCI driver works fine.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      0c9ffe0f
    • S
      USB: Remove bogus USB_PORT_STAT_SUPER_SPEED symbol. · 131dec34
      Sarah Sharp 提交于
      USB_PORT_STAT_SUPER_SPEED is a made up symbol that the USB core used to
      track whether USB ports had a SuperSpeed device attached.  This is a
      linux-internal symbol that was used when SuperSpeed and non-SuperSpeed
      devices would show up under the same xHCI roothub.  This particular
      port status is never returned by external USB 3.0 hubs.  (Instead they
      have a USB_PORT_STAT_SPEED_5GBPS that uses a completely different speed
      mask.)
      
      Now that the xHCI driver registers two roothubs, USB 3.0 devices will only
      show up under USB 3.0 hubs.  Rip out USB_PORT_STAT_SUPER_SPEED and replace
      it with calls to hub_is_superspeed().
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      131dec34
    • S
      usb: Change usb_hcd->bandwidth_mutex to a pointer. · d673bfcb
      Sarah Sharp 提交于
      Change the bandwith_mutex in struct usb_hcd to a pointer.  This will allow
      the pointer to be shared across usb_hcds for the upcoming work to split
      the xHCI driver roothub into a USB 2.0/1.1 and a USB 3.0 bus.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      d673bfcb
    • S
      USB: Clear "warm" port reset change. · c7061574
      Sarah Sharp 提交于
      In USB 3.0, there are two types of resets: a "hot" port reset and a "warm"
      port reset.  The hot port reset is always tried first, and involves
      sending the reset signaling for a shorter amount of time.  But sometimes
      devices don't respond to the hot reset, and a "Bigger Hammer" is needed.
      
      External hubs and roothubs will automatically try a warm reset when the
      hot reset fails, and they will set a status change bit to indicate when
      there is a "BH reset" change.  Make sure the USB core clears that port
      status change bit, or we'll get lots of status change notifications on the
      interrupt endpoint of the USB 3.0 hub.
      
      (Side note: you may be confused why the USB 3.0 spec calls the same type
      of reset "warm reset" in some places and "BH reset" in other places.  "BH"
      reset is supposed to stand for "Big Hammer" reset, but it also stands for
      "Brad Hosler".  Brad died shortly after the USB 3.0 bus specification was
      started, and they decided to name the reset after him.  The suggestion was
      made shortly before the spec was finalized, so the wording is a bit
      inconsistent.)
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      c7061574
    • J
      USB 3.0 Hub Changes · dbe79bbe
      John Youn 提交于
      Update the USB core to deal with USB 3.0 hubs.  These hubs have a slightly
      different hub descriptor than USB 2.0 hubs, with a fixed (rather than
      variable length) size.  Change the USB core's hub descriptor to have a
      union for the last fields that differ.  Change the host controller drivers
      that access those last fields (DeviceRemovable and PortPowerCtrlMask) to
      use the union.
      
      Translate the new version of the hub port status field into the old
      version that khubd understands.  (Note: we need to fix it to translate the
      roothub's port status once we stop converting it to USB 2.0 hub status
      internally.)
      
      Add new code to handle link state change status.  Send out new control
      messages that are needed for USB 3.0 hubs, like Set Hub Depth.
      
      This patch is a modified version of the original patch submitted by John
      Youn.  It's updated to reflect the removal of the "bitmap" #define, and
      change the hub descriptor accesses of a couple new host controller
      drivers.
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Cc: Tony Olech <tony.olech@elandigitalsystems.com>
      Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>
      Cc: Max Vozeler <mvz@vozeler.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Cc: Rodolfo Giometti <giometti@linux.it>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Anton Vorontsov <avorontsov@mvista.com>
      Cc: Sebastian Siewior <bigeasy@linutronix.de>
      Cc: Lothar Wassmann <LW@KARO-electronics.de>
      Cc: Olav Kongas <ok@artecdesign.ee>
      Cc: Martin Fuzzey <mfuzzey@gmail.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      dbe79bbe
  20. 12 3月, 2011 1 次提交
  21. 01 3月, 2011 2 次提交
  22. 26 2月, 2011 1 次提交
  23. 20 2月, 2011 1 次提交
    • L
      USB: Reset USB 3.0 devices on (re)discovery · 07194ab7
      Luben Tuikov 提交于
      If the device isn't reset, the XHCI HCD sends
      SET ADDRESS to address 0 while the device is
      already in Addressed state, and the request is
      dropped on the floor as it is addressed to the
      default address. This sequence of events, which this
      patch fixes looks like this:
      
      usb_reset_and_verify_device()
      	hub_port_init()
      		hub_set_address()
      			SET_ADDRESS to 0 with 1
      		usb_get_device_descriptor(udev, 8)
      		usb_get_device_descriptor(udev, 18)
      	descriptors_changed() --> goto re_enumerate:
      		hub_port_logical_disconnect()
      			kick_khubd()
      
      And then:
      
      hub_events()
      	hub_port_connect_change()
      		usb_disconnect()
      			usb_disable_device()
      		new device struct
      		sets device state to Powered
      		choose_address()
      		hub_port_init() <-- no reset, but SET ADDRESS to 0 with 1, timeout!
      
      The solution is to always reset the device in
      hub_port_init() to put it in a known state.
      
      Note from Sarah Sharp:
      
      This patch should be queued for stable trees all the way back to 2.6.34,
      since that was the first kernel that supported configured device reset.
      The code this patch touches has been there since 2.6.32, but the bug
      would never be hit before 2.6.34 because the xHCI driver would
      completely reject an attempt to reset a configured device under xHCI.
      Signed-off-by: NLuben Tuikov <ltuikov@yahoo.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@kernel.org
      07194ab7
  24. 18 2月, 2011 2 次提交
    • G
      Revert "USB: Reset USB 3.0 devices on (re)discovery" · 9ce4f80f
      Greg Kroah-Hartman 提交于
      This reverts commit 637d11bf.  Sarah
      wants to tweak it some more before it's applied to the tree.
      
      Cc: Luben Tuikov <ltuikov@yahoo.com>
      Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9ce4f80f
    • L
      USB: Reset USB 3.0 devices on (re)discovery · 637d11bf
      Luben Tuikov 提交于
      If the device isn't reset, the XHCI HCD sends
      SET ADDRESS to address 0 while the device is
      already in Addressed state, and the request is
      dropped on the floor as it is addressed to the
      default address. This sequence of events, which this
      patch fixes looks like this:
      
      usb_reset_and_verify_device()
      	hub_port_init()
      		hub_set_address()
      			SET_ADDRESS to 0 with 1
      		usb_get_device_descriptor(udev, 8)
      		usb_get_device_descriptor(udev, 18)
      	descriptors_changed() --> goto re_enumerate:
      		hub_port_logical_disconnect()
      			kick_khubd()
      
      And then:
      
      hub_events()
      	hub_port_connect_change()
      		usb_disconnect()
      			usb_disable_device()
      		new device struct
      		sets device state to Powered
      		choose_address()
      		hub_port_init() <-- no reset, but SET ADDRESS to 0 with 1, timeout!
      
      The solution is to always reset the device in
      hub_port_init() to put it in a known state.
      Signed-off-by: NLuben Tuikov <ltuikov@yahoo.com>
      Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      637d11bf
  25. 04 2月, 2011 1 次提交
  26. 15 1月, 2011 1 次提交
    • S
      usb: Realloc xHCI structures after a hub is verified. · 653a39d1
      Sarah Sharp 提交于
      When there's an xHCI host power loss after a suspend from memory, the USB
      core attempts to reset and verify the USB devices that are attached to the
      system.  The xHCI driver has to reallocate those devices, since the
      hardware lost all knowledge of them during the power loss.
      
      When a hub is plugged in, and the host loses power, the xHCI hardware
      structures are not updated to say the device is a hub.  This is usually
      done in hub_configure() when the USB hub is detected.  That function is
      skipped during a reset and verify by the USB core, since the core restores
      the old configuration and alternate settings, and the hub driver has no
      idea this happened.  This bug makes the xHCI host controller reject the
      enumeration of low speed devices under the resumed hub.
      
      Therefore, make the USB core re-setup the internal xHCI hub device
      information by calling update_hub_device() when hub_activate() is called
      for a hub reset resume.  After a host power loss, all devices under the
      roothub get a reset-resume or a disconnect.
      
      This patch should be queued for the 2.6.37 stable tree.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@kernel.org
      653a39d1
  27. 17 11月, 2010 2 次提交
    • A
      USB: improve uses of usb_mark_last_busy · c08512c7
      Alan Stern 提交于
      This patch (as1434) cleans up the uses of usb_mark_last_busy() in
      usbcore.  The function will be called when a device is resumed and
      whenever a usage count is decremented.  A call that was missing from
      the hub driver is added: A hub is used whenever one of its ports gets
      suspended (this prevents hubs from suspending immediately after their
      last child).
      
      In addition, the call to disable autosuspend support for new devices
      by default is moved from usb_detect_quirks() (where it doesn't really
      belong) into usb_new_device() along with all the other runtime-PM
      initializations.  Finally, an extra pm_runtime_get_noresume() is added
      to prevent new devices from autosuspending while they are being
      registered.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c08512c7
    • A
      USB: use the runtime-PM autosuspend implementation · fcc4a01e
      Alan Stern 提交于
      This patch (as1428) converts USB over to the new runtime-PM core
      autosuspend framework.  One slightly awkward aspect of the conversion
      is that USB devices will now have two suspend-delay attributes: the
      old power/autosuspend file and the new power/autosuspend_delay_ms
      file.  One expresses the delay time in seconds and the other in
      milliseconds, but otherwise they do the same thing.  The old attribute
      can be deprecated and then removed eventually.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fcc4a01e