1. 28 9月, 2006 4 次提交
    • A
      usbcore: set device and power states properly · 2bf4086d
      Alan Stern 提交于
      This patch (as733) fixes up the places where device states and power
      states are set in usbcore.  Right now things are duplicated or missing;
      this should straighten things out.
      
      The idea is that udev->state is USB_STATE_SUSPENDED exactly when the
      device's upstream port has been suspended, whereas
      udev->dev.power.power_state.event reflects the result of the last call
      to the suspend/resume routines (which might not actually change the
      device state, especially if CONFIG_USB_SUSPEND isn't set).
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2bf4086d
    • A
      usbcore: resume device resume recursion · a8e7c565
      Alan Stern 提交于
      This patch (as717b) removes the existing recursion in hub resume code:
      Resuming a hub will no longer automatically resume the devices attached
      to the hub.
      
      At the same time, it adds one level of recursion: Suspending a USB
      device will automatically suspend all the device's interfaces.  Failure
      at an intermediate stage will cause all the already-suspended interfaces
      to be resumed. Attempts to suspend or resume an interface by itself will
      do nothing, although they won't return an error.  Thus the regular
      system-suspend and system-resume procedures should continue to work as
      before; only runtime PM will be affected.
      
      The patch also removes the code that tests state of the interfaces
      before suspending a device.  It's no longer needed, since everything
      gets suspended together.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a8e7c565
    • A
      usbcore: make usb_generic a usb_device_driver · 782da727
      Alan Stern 提交于
      This patch (as714b) makes usb_generic into a usb_device_driver capable
      of being probed and unbound, just like other drivers.  A fair amount of
      the work that used to get done during discovery or removal of a USB
      device have been moved to the probe and disconnect methods of
      usb_generic: creating the sysfs attributes and selecting an initial
      configuration.  However the normal behavior should continue to be the
      same as before.
      
      We will now have the possibility of creating other USB device drivers,
      They will assist with exporting devices to remote systems
      (USB-over-TCPIP) or to paravirtual guest operating systems.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      782da727
    • A
      usbcore: rename usb_suspend_device to usb_port_suspend · 140d8f68
      Alan Stern 提交于
      This revised patch (as715b) renames usb_suspend_device to
      usb_port_suspend, usb_resume_device to usb_port_resume, and
      finish_device_resume to finish_port_resume.  There was no objection to
      the original version of the patch so this should be okay to apply.
      
      The revision was needed only because I have re-arranged the order of the
      earlier patches.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      140d8f68
  2. 13 7月, 2006 2 次提交
  3. 01 7月, 2006 1 次提交
  4. 22 6月, 2006 5 次提交
  5. 09 5月, 2006 1 次提交
    • A
      [PATCH] USB: usbcore: don't check the device's power source · 436f5762
      Alan Stern 提交于
      The choose_configuration() routine contains code the determine the
      device's power source, so that configurations requiring external power
      can be ruled out if the device is running on bus power.  Unfortunately
      it turns out that some devices have errors in their config descriptors
      and other devices don't like the GET_DEVICE_STATUS request.
      
      Since that information wasn't used for anything else, this patch (as673)
      removes the code, leaving only a comment.  It fixes bugzilla entry
      #6448.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      436f5762
  6. 15 4月, 2006 2 次提交
  7. 21 3月, 2006 4 次提交
  8. 05 1月, 2006 8 次提交
    • A
      [PATCH] USB: Don't assume root-hub resume succeeds · 2425e9fe
      Alan Stern 提交于
      This patch (as614) makes a small change to the part of the hub driver
      responsible for remote wakeup of root hubs.  When these wakeups occur
      the driver is suspended, and in case the resume fails the driver should
      remain suspended -- it shouldn't try to proceed with its normal
      processing.
      
      This will hardly ever matter in normal use, but it did crop up while I
      was debugging a different problem.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2425e9fe
    • A
      [PATCH] USB: Store port number in usb_device · 12c3da34
      Alan Stern 提交于
      This patch (as610) adds a field to struct usb_device to store the device's
      port number.  This allows us to remove several loops in the hub driver
      (searching for a particular device among all the entries in the parent's
      array of children).
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      12c3da34
    • 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
    • A
      [PATCH] USB: Fix locking for USB suspend/resume · 4bf0ba86
      Alan Stern 提交于
      The earlier USB locking updates didn't touch the suspend/resume
      routines.  They need updating as well, since now the caller holds the
      device semaphore.  This patch (as608) makes the necessary changes.  It
      also adds a line to store the correct power state when a device is
      resumed, something which was unaccountably missing.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4bf0ba86
    • A
      [PATCH] USB: Disconnect children during hub unbind · 7d069b7d
      Alan Stern 提交于
      This patch (as606b) is an updated version of my earlier patch to
      disconnect children from a hub device when the hub driver is unbound.
      Thanks to the changes in the driver core locking, we now know that the
      entire hub device (and not just the interface) is locked whenever the
      hub driver's disconnect method runs.  Hence it is safe to disconnect the
      child device structures immediately instead of deferring the job.
      
      The earlier version of the patch neglected to disable the hub's ports.
      We don't want to forget that; otherwise we'd end up with live devices
      using addresses that have been recycled.  This update adds the necessary
      code.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7d069b7d
    • A
      [PATCH] USB: Remove USB private semaphore · 9ad3d6cc
      Alan Stern 提交于
      This patch (as605) removes the private udev->serialize semaphore,
      relying instead on the locking provided by the embedded struct device's
      semaphore.  The changes are confined to the core, except that the
      usb_trylock_device routine now uses the return convention of
      down_trylock rather than down_read_trylock (they return opposite values
      for no good reason).
      
      A couple of other associated changes are included as well:
      
      	Now that we aren't concerned about HCDs that avoid using the
      	hcd glue layer, usb_disconnect no longer needs to acquire the
      	usb_bus_lock -- that can be done by usb_remove_hcd where it
      	belongs.
      
      	Devices aren't locked over the same scope of code in
      	usb_new_device and hub_port_connect_change as they used to be.
      	This shouldn't cause any trouble.
      
      Along with the preceding driver core patch, this needs a lot of testing.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9ad3d6cc
    • G
      [PATCH] USB: remove .owner field from struct usb_driver · 75318d2d
      Greg Kroah-Hartman 提交于
      It is no longer needed, so let's remove it, saving a bit of memory.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      75318d2d
    • A
      [PATCH] USB: central handling for host controllers that were reset during suspend/resume · 1c50c317
      Alan Stern 提交于
      This patch (as515b) adds a routine to usbcore to simplify handling of
      host controllers that lost power or were reset during suspend/resume.
      The new core routine marks all the child devices of the root hub as
      NOTATTACHED and tells khubd to disconnect the device structures as soon
      as possible.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1c50c317
  9. 24 11月, 2005 1 次提交
    • D
      [PATCH] USB: EHCI updates · f03c17fc
      David Brownell 提交于
      This fixes some bugs in EHCI suspend/resume that joined us over the past
      few releases (as usbcore, PCI, pmcore, and other components evolved):
      
        - Removes suspend and resume recursion from the EHCI driver, getting
          rid of the USB_SUSPEND special casing.
      
        - Updates the wakeup mechanism to work again; there's a newish usbcore
          call it needs to use.
      
        - Provide simpler tests for "do we need to restart from scratch", to
          address another case where PCI Vaux was lost.  (In this case it was
          restoring a swsusp snapshot, but there could be others.)
      
      Un-exports a symbol that was temporarily exported.
      
      A notable change from previous version is that this doesn't move
      the spinlock init, so there's still a resume/reinit path bug.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f03c17fc
  10. 18 11月, 2005 1 次提交
  11. 29 10月, 2005 11 次提交