1. 22 7月, 2008 3 次提交
    • A
      USB: try to salvage lost power sessions · 8808f00c
      Alan Stern 提交于
      This patch (as1073) adds to khubd a way to recover from power-session
      interruption caused by transient connect-change or enable-change
      events.  After the debouncing period, khubd attempts to do a
      USB-Persist-style reset or reset-resume.  If it works, the connection
      will remain unscathed.
      
      The upshot is that we will be more immune to noise caused by EMI.  The
      grace period is on the order of 100 ms, so this won't permit recovery
      from the "accidentally knocked the USB cable out of its socket" type
      of event, but it's a start.
      
      As an added bonus, if a device was suspended when the system goes to
      sleep then we no longer need to check for power-session interruptions
      when the system wakes up.  Khubd will naturally see the status change
      while processing the device's parent hub and will do the right thing.
      
      The remote_wakeup() routine is changed; now it expects the caller to
      acquire the device lock rather than acquiring the lock itself.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8808f00c
    • A
      USB: simplify hub_restart() logic · 6ee0b270
      Alan Stern 提交于
      This patch (as1081) straightens out the logic of the hub_restart()
      routine.  Each port of the hub is scanned and the driver makes sure
      that ports which are supposed to be disabled really _are_ disabled.
      Any ports with a significant change in status are flagged in
      hub->change_bits, so that khubd can focus on them without the need to
      scan all the ports a second time -- which means the hub->activating
      flag is no longer needed.
      
      Also, it is now recognized explicitly that the only reason for
      resuming a port which was not suspended is to carry out a reset-resume
      operation, which happens only in a non-CONFIG_USB_SUSPEND setting.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6ee0b270
    • K
      USB: usb dev_name() instead of dev->bus_id · 7071a3ce
      Kay Sievers 提交于
      The bus_id field is going away, use the dev_name() function instead.
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7071a3ce
  2. 25 4月, 2008 4 次提交
    • H
      USB: replace remaining __FUNCTION__ occurrences · 441b62c1
      Harvey Harrison 提交于
      __FUNCTION__ is gcc-specific, use __func__
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      441b62c1
    • A
      USB: HCDs use the do_remote_wakeup flag · 58a97ffe
      Alan Stern 提交于
      When a USB device is suspended, whether or not it is enabled for
      remote wakeup depends on the device_may_wakeup() setting.  The setting
      is then saved in the do_remote_wakeup flag.
      
      Later on, however, the device_may_wakeup() value can change because of
      user activity.  So when testing whether a suspended device is or
      should be enabled for remote wakeup, we should always test
      do_remote_wakeup instead of device_may_wakeup().  This patch (as1076)
      makes that change for root hubs in several places.
      
      The patch also adjusts uhci-hcd so that when an autostopped controller
      is suspended, the remote wakeup setting agrees with the value recorded
      in the root hub's do_remote_wakeup flag.
      
      And the patch adjusts ehci-hcd so that wakeup events on selectively
      suspended ports (i.e., the bus itself isn't suspended) don't turn on
      the PME# wakeup signal.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      58a97ffe
    • A
      USB: remove dev->power.power_state · 70a1c9e0
      Alan Stern 提交于
      power.power_state is scheduled for removal.  This patch (as1053)
      removes all uses of that field from drivers/usb.  Almost all of them
      were write-only, the most significant exceptions being sl811-hcd.c and
      u132-hcd.c.
      
      Part of this patch was written by Pavel Machek.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: David Brownell <david-b@pacbell.net>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      70a1c9e0
    • A
      USB: EHCI: carry out port handover during each root-hub resume · 3bb1af52
      Alan Stern 提交于
      This patch (as1044) causes EHCI port handover for non-high-speed
      devices to occur during every root-hub resume, not just in cases where
      the controller lost power or was reset.  This is necessary because:
      
      	When some machines go into suspend, they remove power from
      	on-board USB devices while retaining suspend current for USB
      	controllers.
      
      	The user might well unplug a USB device while the system is
      	suspended and then plug it back in before resuming.
      
      A corresponding change is made to the core resume routine; now
      high-speed root hubs will always be resumed when the system wakes up,
      even if they were suspended before the system went to sleep.  If this
      weren't done then EHCI port handover wouldn't work, since it is called
      when the EHCI root hub is resumed.
      
      Finally, a comment is added to the hub driver explaining the khubd has
      to be freezable; if it weren't frozen then it could interfere with
      port handover.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3bb1af52
  3. 02 2月, 2008 3 次提交
  4. 25 1月, 2008 1 次提交
  5. 29 11月, 2007 1 次提交
    • A
      USB: uevent environment key fix · 4a9bee82
      Alan Stern 提交于
      This patch (as1010) was written by both Kay Sievers and me.  It solves
      the problem of duplicated keys in USB uevent structures by refactoring
      the uevent subroutines, taking advantage of the way the hotplug core
      calls uevent handlers for the device's bus and for the device's type.
      Keys needed for both USB-device and USB-interface events are added in
      usb_uevent(), which is the bus handler.  Keys appropriate only for
      USB-device or USB-interface events are added in usb_dev_uevent() or
      usb_if_uevent() respectively, the type handlers.
      
      In addition, unnecessary tests for NULL pointers are removed as are
      duplicated debugging log statements.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4a9bee82
  6. 13 10月, 2007 7 次提交
    • A
      USB: fix race in autosuspend reschedule · d1aa3e6a
      Alan Stern 提交于
      This patch (as1002) fixes a small race which can occur when a driver
      expects usbcore to reschedule an autosuspend request.  If the request
      arrives too late, it won't be rescheduled.  The patch adds an extra
      argument to autosuspend_check(), indicating that a reschedule is
      needed no matter how much time has elapsed.
      
      It also tries to avoid letting asynchronous changes to the value of
      jiffies cause a delay to become negative, by caching a local copy of
      the current time.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d1aa3e6a
    • A
      USB: skip autosuspended devices during system resume · 271f9e68
      Alan Stern 提交于
      System suspends and hibernation are supposed to be as transparent as
      possible.  By this reasoning, if a USB device is already autosuspended
      before the system sleep begins then it should remain autosuspended
      after the system wakes up.
      
      This patch (as1001) adds a skip_sys_resume flag to the usb_device
      structure and uses it to avoid waking up devices which were suspended
      when a system sleep began.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      271f9e68
    • A
      USB: don't propagate FREEZE or PRETHAW suspends · 7108f284
      Alan Stern 提交于
      This patch (as992) fixes a recently-added bug.  During a FREEZE or
      PRETHAW suspend notification, non-root devices don't actually get
      suspended.  So we shouldn't tell their parent hubs that they did.
      
      (This code path used to be skipped over, until the FREEZE/PRETHAW test
      got moved out of usb_suspend_both() into generic_suspend().)
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7108f284
    • A
      USB: flush outstanding URBs when suspending · 6840d255
      Alan Stern 提交于
      This patch (as989) makes usbcore flush all outstanding URBs for each
      device as the device is suspended.  This will be true even when
      CONFIG_USB_SUSPEND is not enabled.
      
      In addition, an extra can_submit flag is added to the usb_device
      structure.  That flag will be turned off whenever a suspend request
      has been received for the device, even if the device isn't actually
      suspended because CONFIG_USB_SUSPEND isn't set.
      
      It's no longer necessary to check for the device state being equal to
      USB_STATE_SUSPENDED during URB submission; that check can be replaced
      by a check of the can_submit flag.  This also permits us to remove
      some questionable references to the deprecated power.power_state field.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6840d255
    • A
      USB: move decision to ignore FREEZE events · 5ad4f71e
      Alan Stern 提交于
      This patch (as987) changes the way FREEZE and PRETHAW suspend events
      are handled in usbcore.  The decision about whether or not to ignore
      them for non-root devices is pushed down into the USB-device driver,
      instead of being made in the core code.
      
      This is appropriate, since devices exported to a virtualized guest or
      over a network may indeed need to handle these types of suspend, even
      though normal devices don't.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5ad4f71e
    • I
      usb: usb_probe_interface() obeys authorization · 72230abb
      Inaky Perez-Gonzalez 提交于
      If called and the device is not authorized to be used, it won't
      configure the interface and print a message saying so.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      72230abb
    • K
      Driver core: change add_uevent_var to use a struct · 7eff2e7a
      Kay Sievers 提交于
      This changes the uevent buffer functions to use a struct instead of a
      long list of parameters. It does no longer require the caller to do the
      proper buffer termination and size accounting, which is currently wrong
      in some places. It fixes a known bug where parts of the uevent
      environment are overwritten because of wrong index calculations.
      
      Many thanks to Mathieu Desnoyers for finding bugs and improving the
      error handling.
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      7eff2e7a
  7. 11 9月, 2007 1 次提交
  8. 23 8月, 2007 1 次提交
  9. 19 7月, 2007 1 次提交
    • D
      dev_vdbg(), available with -DVERBOSE_DEBUG · aebdc3b4
      David Brownell 提交于
      This defines a dev_vdbg() call, which is enabled with -DVERBOSE_DEBUG.
      When enabled, dev_vdbg() acts just like dev_dbg().  When disabled, it is a
      NOP ...  just like dev_dbg() without -DDEBUG.  The specific code was moved
      out of a USB patch, but lots of drivers have similar support.
      
      That is, code can now be written to use an additional level of debug
      output, selected at compile time.  Many driver authors have found this
      idiom to be very useful.  A typical usage model is for "normal" debug
      messages to focus on fault paths and not be very "chatty", so that those
      messages can be left on during normal operation without much of a
      performance or syslog load.  On the other hand "verbose" messages would be
      noisy enough that they wouldn't normally be enabled; they might even affect
      timings enough to change system or driver behavior.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      aebdc3b4
  10. 13 7月, 2007 9 次提交
    • V
      USB: Make usb-autosuspend timer 1 sec jiffy aligned · 8d6d5fd0
      Venki Pallipadi 提交于
      Make usb autosuspend timers 1sec jiffy aligned.
      
      This helps to reduce the frequency at which the CPU must be taken out of a
      lower-power state.
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8d6d5fd0
    • A
      USB: Remove usages of dev->power.power_state · e7e6da9e
      Alan Stern 提交于
      This patch (as922) removes all but one of the remaining vestiges of
      dev->power.power_state from usbcore.  The only usage left must remain
      until the deprecated "power/state" sysfs attribute is gone.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e7e6da9e
    • A
      USB: add reset_resume method · f07600cf
      Alan Stern 提交于
      This patch (as918) introduces a new USB driver method: reset_resume.
      It is called when a device needs to be reset as part of a resume
      procedure (whether because of a device quirk or because of the
      USB-Persist facility), thereby taking over a role formerly assigned to
      the post_reset method.  As a consequence, post_reset no longer needs
      an argument indicating whether it is being called as part of a
      reset-resume.  This separation of functions makes the code clearer.
      
      In addition, the pre_reset and post_reset method return types are
      changed; they now must return an error code.  The return value is
      unused at present, but at some later time we may unbind drivers and
      re-probe if they encounter an error during reset handling.
      
      The existing pre_reset and post_reset methods in the usbhid,
      usb-storage, and hub drivers are updated to match the new
      requirements.  For usbhid the post_reset routine is also used for
      reset_resume (duplicate method pointers); for the other drivers a new
      reset_resume routine is added.  The change to hub.c looks bigger than
      it really is, because mark_children_for_reset_resume() gets moved down
      next to the new hub_reset_resume() routine.
      
      A minor change to usb-storage makes the usb_stor_report_bus_reset()
      routine acquire the host lock instead of requiring the caller to hold
      it already.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      f07600cf
    • A
      USB: rework C++-style comments · 20dfdad7
      Alan Stern 提交于
      This patch (as911) replaces some C++-style commented-out debugging
      lines in driver.c with a new "verbose debugging" macro.  It makes the
      code look cleaner, and it's easier to turn the debugging on or off.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      20dfdad7
    • A
      USB: add RESET_RESUME device quirk · 6bc6cff5
      Alan Stern 提交于
      This patch (as888) adds a new USB device quirk for devices which are
      unable to resume correctly.  By using the new code added for the
      USB-persist facility, it is a simple matter to reset these devices
      instead of resuming them.  To get things kicked off, a quirk entry is
      added for the Philips PSC805.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6bc6cff5
    • A
      USB: add USB-Persist facility · 0458d5b4
      Alan Stern 提交于
      This patch (as886) adds the controversial USB-persist facility,
      allowing USB devices to persist across a power loss during system
      suspend.
      
      The facility is controlled by a new Kconfig option (with appropriate
      warnings about the potential dangers); when the option is off the
      behavior will remain the same as it is now.  But when the option is
      on, people will be able to use suspend-to-disk and keep their USB
      filesystems intact -- something particularly valuable for small
      machines where the root filesystem is on a USB device!
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0458d5b4
    • A
      USB: move bus_suspend and bus_resume method calls · b6f6436d
      Alan Stern 提交于
      This patch (as885) moves the root-hub bus_suspend() and bus_resume()
      method calls from the hub driver's suspend and resume methods into the
      usb_generic driver methods, where they make just as much sense.
      
      Their old locations were not fully correct.  For example, in a kernel
      compiled without CONFIG_USB_SUSPEND, if one were to do:
      
      	echo -n 1-0:1.0 >/sys/bus/usb/drivers/hub/unbind
      
      to unbind the hub driver from a root hub, there would then be no way
      to suspend that root hub.  Attempts to put the system to sleep would
      fail; the USB controller driver would refuse to suspend because the
      root hub was still active.
      
      The patch also makes a very slight change in the way devices with no
      driver are handled during suspend.  Rather than doing a standard USB
      port-suspend directly, now the suspend routine in usb_generic is
      called.  In practice this should never affect anyone.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b6f6436d
    • A
      USB: Implement PM FREEZE and PRETHAW · 4d461095
      Alan Stern 提交于
      This patch (as884) finally implements the time-saving semantics
      possible with the Power Management FREEZE and PRETHAW events.  Their
      proper handling requires only that devices be quiesced, with
      interrupts and DMA turned off; non-root USB devices don't actually
      need to be put in a suspended state.  The patch checks and avoids
      doing the suspend call when possible.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4d461095
    • A
      USB: interface PM state · 784a6e1c
      Alan Stern 提交于
      This patch (as880) strives to keep the PM core's idea of a USB
      interface's power state in synch with usbcore's own idea.  In the end
      this doesn't really matter, but it's better to be consistent.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      784a6e1c
  11. 23 5月, 2007 1 次提交
    • A
      USB: more autosuspend timer stuff · ef7f6c70
      Alan Stern 提交于
      This patch (as879) ties up some loose ends from an earlier patch.
      These are things I didn't think to include at the time but which
      clearly belonged there.
      
      	If an autosuspend fails because driver activity races with
      	the autosuspend call, restart the autosuspend timer.
      
      	When a device is resumed by an external request, it counts
      	as device activity and should update the last_busy time so
      	that the next autoresume won't occur immediately.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ef7f6c70
  12. 28 4月, 2007 8 次提交
    • A
      USB: fix signed jiffies issue in autosuspend logic · 8c9862e5
      Alan Stern 提交于
      This patch (as897) changes the autosuspend timer code to use the
      standard types and macros in dealing with jiffies values.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      8c9862e5
    • A
      USB: add "last_busy" field for use in autosuspend · 1941044a
      Alan Stern 提交于
      This patch (as877) adds a "last_busy" field to struct usb_device, for
      use by the autosuspend framework.  Now if an autosuspend call comes at
      a time when the device isn't busy but hasn't yet been idle for long
      enough, the timer can be set to exactly the desired value.  And we
      will be ready to handle things like HID drivers, which can't maintain
      a useful usage count and must rely on the time-of-last-use to decide
      when to autosuspend.
      
      The patch also makes some related minor improvements:
      
      	Move the calls to the autosuspend condition-checking routine
      	into usb_suspend_both(), which is the only place where it
      	really matters.
      
      	If the autosuspend timer is already running, don't stop
      	and restart it.
      
      	Replace immediate returns with gotos so that the optional
      	debugging ouput won't be bypassed.
      
      	If autoresume is disabled but the device is already awake,
      	don't return an error for an autoresume call.
      
      	Don't try to autoresume a device if it isn't suspended.
      	(Yes, this undercuts the previous change -- so sue me.)
      
      	Don't duplicate existing code in the autosuspend work routine.
      
      	Fix the kerneldoc in usb_autopm_put_interface(): If an
      	autoresume call fails, the usage counter is left unchanged.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      1941044a
    • K
      USB: make usbdevices export their device nodes instead of using a separate class · 9f8b17e6
      Kay Sievers 提交于
      o The "real" usb-devices export now a device node which can
        populate /dev/bus/usb.
      
      o The usb_device class is optional now and can be disabled in the
        kernel config. Major/minor of the "real" devices and class devices
        are the same.
      
      o The environment of the usb-device event contains DEVNUM and BUSNUM to
        help udev and get rid of the ugly udev rule we need for the class
        devices.
      
      o The usb-devices and usb-interfaces share the same bus, so I used
        the new "struct device_type" to let these devices identify
        themselves. This also removes the current logic of using a magic
        platform-pointer.
        The name of the device_type is also added to the environment
        which makes it easier to distinguish the different kinds of devices
        on the same subsystem.
      
        It looks like this:
          add@/devices/pci0000:00/0000:00:1d.1/usb2/2-1
          ACTION=add
          DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1
          SUBSYSTEM=usb
          SEQNUM=1533
          MAJOR=189
          MINOR=131
          DEVTYPE=usb_device
          PRODUCT=46d/c03e/2000
          TYPE=0/0/0
          BUSNUM=002
          DEVNUM=004
      
      This udev rule works as a replacement for usb_device class devices:
        SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
          NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
      
      Updated patch, which needs the device_type patches in Greg's tree.
      
      I also got a bugzilla assigned for this. :)
        https://bugzilla.novell.com/show_bug.cgi?id=250659Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      9f8b17e6
    • A
      USB: add power/level sysfs attribute · 2add5229
      Alan Stern 提交于
      This patch (as874) adds another piece to the user-visible part of the
      USB autosuspend interface.  The new power/level sysfs attribute allows
      users to force the device on (with autosuspend off), force the device
      to sleep (with autoresume off), or return to normal automatic operation.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2add5229
    • A
      USB: Allow autosuspend delay to equal 0 · eaafbc3a
      Alan Stern 提交于
      This patch (as867) adds an entry for the new power/autosuspend
      attribute in Documentation/ABI/testing, and it changes the behavior of
      the delay value.  Now a delay of 0 means to autosuspend as soon as
      possible, and negative values will prevent autosuspend.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      eaafbc3a
    • A
      USB: separate autosuspend from external suspend · 6b157c9b
      Alan Stern 提交于
      This patch (as866) adds new entry points for external USB device
      suspend and resume requests, as opposed to internally-generated
      autosuspend or autoresume.  It also changes the existing
      remote-wakeup code paths to use the new routines, since remote wakeup
      is not the same as autoresume.
      
      As part of the change, it turns out to be necessary to do remote
      wakeup of root hubs from a workqueue.  We had been using khubd, but it
      does autoresume rather than an external resume.  Using the
      ksuspend_usb_wq workqueue for this purpose seemed a logical choice.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6b157c9b
    • A
      usbcore: move usb_autosuspend_work · 718efa64
      Alan Stern 提交于
      This patch (as864) moves the work routine for USB autosuspend from one
      source file to another.  This permits the removal of one whole global
      symbol (!) and should smooth the way for more changes in the future.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      718efa64
    • G
      USB: remove use of the bus rwsem, as it doesn't really protect anything. · 341487a8
      Greg Kroah-Hartman 提交于
      The driver core stopped using the rwsem a long time ago, yet the USB
      core still grabbed the lock, thinking it protected something.  This
      patch removes that useless use.
      
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Oliver Neukum <oneukum@suse.de>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: linux-usb-devel <linux-usb-devel@lists.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      341487a8