1. 17 7月, 2013 1 次提交
    • A
      USB: global suspend and remote wakeup don't mix · e583d9db
      Alan Stern 提交于
      The hub driver was recently changed to use "global" suspend for system
      suspend transitions on non-SuperSpeed buses.  This means that we don't
      suspend devices individually by setting the suspend feature on the
      upstream hub port; instead devices all go into suspend automatically
      when the root hub stops transmitting packets.  The idea was to save
      time and to avoid certain kinds of wakeup races.
      
      Now it turns out that many hubs are buggy; they don't relay wakeup
      requests from a downstream port to their upstream port if the
      downstream port's suspend feature is not set (depending on the speed
      of the downstream port, whether or not the hub is enabled for remote
      wakeup, and possibly other factors).
      
      We can't have hubs dropping wakeup requests.  Therefore this patch
      goes partway back to the old policy: It sets the suspend feature for a
      port if the device attached to that port or any of its descendants is
      enabled for wakeup.  People will still be able to benefit from the
      time savings if they don't care about wakeup and leave it disabled on
      all their devices.
      
      In order to accomplish this, the patch adds a new field to the usb_hub
      structure: wakeup_enabled_descendants is a count of how many devices
      below a suspended hub are enabled for remote wakeup.  A corresponding
      new subroutine determines the number of wakeup-enabled devices at or
      below an arbitrary suspended USB device.
      
      This should be applied to the 3.10 stable kernel.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-and-tested-by: NToralf Förster <toralf.foerster@gmx.de>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e583d9db
  2. 19 6月, 2013 1 次提交
  3. 26 1月, 2013 2 次提交
    • L
      usb: add usb port auto power off mechanism · ad493e5e
      Lan Tianyu 提交于
      This patch is to add usb port auto power off mechanism.
      When usb device is suspending, usb core will suspend usb port and
      usb port runtime pm callback will clear PORT_POWER feature to
      power off port if all conditions were met. These conditions are
      remote wakeup disable, pm qos NO_POWER_OFF flag clear and persist
      enable. When it resumes, power on port again.
      
      Add did_runtime_put in the struct usb_port to ensure
      pm_runtime_get/put(portdev) to be called pairedly.  Set did_runtime_put
      to true when call pm_runtime_put(portdev) during suspending. The
      pm_runtime_get(portdev) only will be called when did_runtime_put
      is set to true during resuming. Set did_runtime_put to false after
      calling pm_runtime_get(portdev).
      
      Make clear_port_feature() and hdev_to_hub() as global symbol.
      Rename clear_port_feature() to usb_clear_port_feature() and
      hdev_to_hub() to usb_hub_to_struct_hub().
      
      Extend hub_port_debounce() with the fuction of debouncing to
      be connected. Add two wraps: hub_port_debounce_be_connected()
      and hub_port_debouce_be_stable().
      
      Increase HUB_DEBOUNCE_TIMEOUT to 2000 because some usb ssds
      needs around 1.5 or more to make the hub port status to be
      connected steadily after being powered off and powered on.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ad493e5e
    • L
      usb: add runtime pm support for usb port device · 971fcd49
      Lan Tianyu 提交于
      This patch is to add runtime pm callback for usb port device.
      Set/clear PORT_POWER feature in the resume/suspend callback.
      Add portnum for struct usb_port to record port number. Do
      pm_rumtime_get_sync/put(portdev) when a device is plugged/unplugged
      to prevent it from being powered off when it is active.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      971fcd49
  4. 25 1月, 2013 1 次提交
  5. 19 1月, 2013 1 次提交
  6. 21 5月, 2010 1 次提交
  7. 13 7月, 2009 1 次提交
    • A
      USB: fix the clear_tt_buffer interface · cb88a1b8
      Alan Stern 提交于
      This patch (as1255) updates the interface for calling
      usb_hub_clear_tt_buffer().  Even the name of the function is changed!
      
      When an async URB (i.e., Control or Bulk) going through a high-speed
      hub to a non-high-speed device is cancelled or fails, the hub's
      Transaction Translator buffer may be left busy still trying to
      complete the transaction.  The buffer has to be cleared; that's what
      usb_hub_clear_tt_buffer() does.
      
      It isn't safe to send any more URBs to the same endpoint until the TT
      buffer is fully clear.  Therefore the HCD needs to be told when the
      Clear-TT-Buffer request has finished.  This patch adds a callback
      method to struct hc_driver for that purpose, and makes the hub driver
      invoke the callback at the proper time.
      
      The patch also changes a couple of names; "hub_tt_kevent" and
      "tt.kevent" now look rather antiquated.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cb88a1b8
  8. 16 6月, 2009 1 次提交
    • S
      USB: Add USB 3.0 roothub support to USB core. · d2e9b4d6
      Sarah Sharp 提交于
      Add USB 3.0 root hub descriptors.  This is a kludge because I reused the old
      USB 2.0 descriptors, instead of using the new USB 3.0 hub descriptors with
      endpoint companion descriptors and other descriptors.  I did this because I
      wasn't ready to add USB 3.0 hub changes to khubd.  For now, a USB 3.0 roothub
      looks like a USB 2.0 roothub, with a higher speed.
      
      USB 3.0 hubs have no transaction translator (TT).
      
      Make USB core debugging handle super speed ports.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d2e9b4d6
  9. 25 4月, 2008 2 次提交
    • I
      wusb: make ep0_reinit available for modules · fc721f51
      Inaky Perez-Gonzalez 提交于
      We need to be able to call ep0_reinit() [renamed to usb_ep0_reinit()]
      from the WUSB security code. The reason is that when we authenticate
      the device, it's address changes (from having bit 7 set to having it
      cleared). Thus, we need to signal the USB stack to reinitialize EP0,
      so the status with the previous address kept at the HCD layer is
      cleared and properly reinitialized.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fc721f51
    • D
      USB: defines for USB "Link Power Management" (LPM) ECN · dbe0dbb7
      David Brownell 提交于
      There's a new PM-related change notice for the USB 2.0 specification
      called "Link Power Management" (LPM).  It defines a new "L1 Suspend"
      state which resembles the current (L2) suspend state, except that it
      can be entered and exited much more quickly.  It should thus be more
      useful for runtime PM, even though it doesn't mandate reduced power
      draw from VBUS.
      
      This patch provides the relevant #defines for usbcore.  Actually
      implementing these mechanisms requires host silicon that can generate
      new USB packets, plus hubs handling some new requests and peripherals
      which understand the new packets.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      dbe0dbb7
  10. 02 2月, 2008 1 次提交
  11. 02 12月, 2006 2 次提交
    • A
      USB: Move private hub declarations out of public header file · 1bb5f66b
      Alan Stern 提交于
      This patch (as809b) moves the declaration of the hub driver's private
      data structure from hub.h into the hub.c source file.  Lots of other
      files import hub.h; they have no need to know about the details of the
      hub driver's private data.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1bb5f66b
    • I
      usb/hub: allow hubs up to 31 children · 43705251
      inaky@linux.intel.com 提交于
      Current Wireless USB host hardware (Intel i1480 for example) allows up
      to 22 devices to connect, thus bringing up the max number of children
      in the WUSB Host Controller to 22 'fake' ports. Upcoming hardware
      might raise that limit.
      
      Makes almost no difference to go to 31, as the bit arrays are
      byte-aligned (plus an extra bit in general), so 22 bits fit in 4 bytes
      as 31 do.
      
      As well, the only other array that depends on USB_MAXCHILDREN is
      'struct usb_hub->indicator'. By declaring it 'u8' instead of 'enum
      hub_led_mode', we reduce the size of each entry from 4 bytes (in i386)
      to 1, which will add as we when are doubling USB_MAXCHILDREN
      (with 16 the size of that array is 64 bytes, with 31 would be 128; by
      using u8 that goes down to 31 bytes).
      Signed-off-by: NInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      43705251
  12. 22 11月, 2006 1 次提交
  13. 28 9月, 2006 1 次提交
    • A
      usbcore: khubd and busy-port handling · d5cbad4b
      Alan Stern 提交于
      We don't want khubd to start interfering in the device-resume process
      merely because the PORT_STATUS_C_SUSPEND feature happens to be set.
      Ports need to be marked as busy while a resume is taking place.
      
      In addition, so long as ports are marked as busy, khubd won't be able to
      clear their various status-change features.  On an interrupt-driven root
      hub this could lead to an interrupt storm.  Root hub IRQs should not be
      re-enabled until the busy_bits value is equal to 0.
      
      This patch (as765) fixes these two potential problems.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d5cbad4b
  14. 05 1月, 2006 1 次提交
    • A
      [PATCH] USB: Consider power budget when choosing configuration · 55c52718
      Alan Stern 提交于
      This patch (as609) changes the way we keep track of power budgeting for
      USB hubs and devices, and it updates the choose_configuration routine to
      take this information into account.  (This is something we should have
      been doing all along.)  A new field in struct usb_device holds the amount
      of bus current available from the upstream port, and the usb_hub structure
      keeps track of the current available for each downstream port.
      
      Two new rules for configuration selection are added:
      
      	Don't select a self-powered configuration when only bus power
      	is available.
      
      	Don't select a configuration requiring more bus power than is
      	available.
      
      However the first rule is #if-ed out, because I found that the internal
      hub in my HP USB keyboard claims that its only configuration is
      self-powered.  The rule would prevent the configuration from being chosen,
      leaving the hub & keyboard unconfigured.  Since similar descriptor errors
      may turn out to be fairly common, it seemed wise not to include a rule
      that would break automatic configuration unnecessarily for such devices.
      
      The second rule may also trigger unnecessarily, although this should be
      less common.  More likely it will annoy people by sometimes failing to
      accept configurations that should never have been chosen in the first
      place.
      
      The patch also changes usbcore's reaction when no configuration is
      suitable.  Instead of raising an error and rejecting the device, now
      the core will simply leave the device unconfigured.  People can always
      work around such problems by installing configurations manually through
      sysfs.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      55c52718
  15. 29 10月, 2005 1 次提交
  16. 09 9月, 2005 1 次提交
  17. 28 6月, 2005 1 次提交
  18. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4