<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/core/driver.c, branch v3.0.82</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/usb/core/driver.c?h=v3.0.82</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/usb/core/driver.c?h=v3.0.82'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-11-11T17:36:57Z</updated>
<entry>
<title>USB: Update last_busy time after autosuspend fails</title>
<updated>2011-11-11T17:36:57Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-11-03T23:52:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5432c16a57990f12d41f57ed99ba194c368c30d0'/>
<id>urn:sha1:5432c16a57990f12d41f57ed99ba194c368c30d0</id>
<content type='text'>
commit b2c0a863e14676fa5760c6d828fd373288e2f64a upstream.

Originally, the runtime PM core would send an idle notification
whenever a suspend attempt failed.  The idle callback routine could
then schedule a delayed suspend for some time later.

However this behavior was changed by commit
f71648d73c1650b8b4aceb3856bebbde6daa3b86 (PM / Runtime: Remove idle
notification after failing suspend).  No notifications were sent, and
there was no clear mechanism to retry failed suspends.

This caused problems for the usbhid driver, because it fails
autosuspend attempts as long as a key is being held down.  A companion
patch changes the PM core's behavior, but we also need to change the
USB core.  In particular, this patch (as1493) updates the device's
last_busy time when an autosuspend fails, so that the PM core will
retry the autosuspend in the future when the delay time expires
again.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: for usb_autopm_get_interface_async -EINPROGRESS is not an error</title>
<updated>2011-11-11T17:35:13Z</updated>
<author>
<name>Jim Wylder</name>
<email>jwylder1@motorola.com</email>
</author>
<published>2011-09-07T02:07:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e46389fa0026dd3bbaebf92a525dad3e80b7bce2'/>
<id>urn:sha1:e46389fa0026dd3bbaebf92a525dad3e80b7bce2</id>
<content type='text'>
commit c5a48592d874ddef8c7880311581eccf0eb30c3b upstream.

A return value of -EINPROGRESS from pm_runtime_get indicates that
the device is already resuming due to a previous call.  Internally,
usb_autopm_get_interface_async doesn't treat this as an error and
increments the usage count, but passes the error status along
to the caller.  The logical assumption of the caller is that
any negative return value reflects the device not resuming
and the pm_usage_cnt not being incremented.  Since the usage count
is being incremented and the device is resuming, return success (0)
instead.

Signed-off-by: James Wylder &lt;james.wylder@motorola.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6</title>
<updated>2011-06-28T18:15:17Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-06-28T18:15:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2e34b429a404675dc4fc4ad2ee339eea028da3ca'/>
<id>urn:sha1:2e34b429a404675dc4fc4ad2ee339eea028da3ca</id>
<content type='text'>
* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  MAINTAINERS: add myself as maintainer of USB/IP
  usb: r8a66597-hcd: fix cannot detect low/full speed device
  USB: ehci-ath79: fix a NULL pointer dereference
  USB: Add new FT232H chip to drivers/usb/serial/ftdi_sio.c
  usb/isp1760: Fix bug preventing the unlinking of control urbs
  USB: Fix up URB error codes to reflect implementation.
  xhci: Always set urb-&gt;status to zero for isoc endpoints.
  xhci: Add reset on resume quirk for asrock p67 host
  xHCI 1.0: Incompatible Device Error
  USB: don't let errors prevent system sleep
  USB: don't let the hub driver prevent system sleep
  USB: change maintainership of ohci-hcd and ehci-hcd
  xHCI 1.0: Force Stopped Event(FSE)
  xhci: Don't warn about zeroed bMaxBurst descriptor field.
  USB: Free bandwidth when usb_disable_device is called.
  xhci: Reject double add of active endpoints.
  USB: TI 3410/5052 USB Serial Driver: Fix mem leak when firmware is too big.
  usb: musb: gadget: clear TXPKTRDY flag when set FLUSHFIFO
  usb: musb: host: compare status for negative error values
</content>
</entry>
<entry>
<title>PM: Rename dev_pm_info.in_suspend to is_prepared</title>
<updated>2011-06-21T21:19:50Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-06-18T18:22:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f76b168b6f117a49d36307053e1acbe30580ea5b'/>
<id>urn:sha1:f76b168b6f117a49d36307053e1acbe30580ea5b</id>
<content type='text'>
This patch (as1473) renames the "in_suspend" field in struct
dev_pm_info to "is_prepared", in preparation for an upcoming change.
The new name is more descriptive of what the field really means.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>USB: don't let errors prevent system sleep</title>
<updated>2011-06-16T00:44:56Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-06-15T20:27:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0af212ba8f123c2eba151af7726c34a50b127962'/>
<id>urn:sha1:0af212ba8f123c2eba151af7726c34a50b127962</id>
<content type='text'>
This patch (as1464) implements the recommended policy that most errors
during suspend or hibernation should not prevent the system from going
to sleep.  In particular, failure to suspend a USB driver or a USB
device should not prevent the sleep from succeeding:

Failure to suspend a device won't matter, because the device will
automatically go into suspend mode when the USB bus stops carrying
packets.  (This might be less true for USB-3.0 devices, but let's not
worry about them now.)

Failure of a driver to suspend might lead to trouble later on when the
system wakes up, but it isn't sufficient reason to prevent the system
from going to sleep.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>USB: Move runtime PM callbacks to usb_device_pm_ops</title>
<updated>2011-03-18T18:55:36Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-03-18T18:55:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e1620d591a75a10b15cf61dbf8243a0b7e6731a2'/>
<id>urn:sha1:e1620d591a75a10b15cf61dbf8243a0b7e6731a2</id>
<content type='text'>
USB defines usb_device_type pointing to usb_device_pm_ops that
provides system-wide PM callbacks only and usb_bus_type pointing to
usb_bus_pm_ops that provides runtime PM callbacks only.  However,
the USB runtime PM callbacks may be defined in usb_device_pm_ops
which makes it possible to drop usb_bus_pm_ops and will allow us
to consolidate the handling of subsystems by the PM core code.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>usb: Always return 0 or -EBUSY to the runtime PM core.</title>
<updated>2011-03-14T01:07:07Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2010-12-30T06:03:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=db7c7c0aeef51dba12d877875b8deb78d9886647'/>
<id>urn:sha1:db7c7c0aeef51dba12d877875b8deb78d9886647</id>
<content type='text'>
The PM core reacts badly when the return code from usb_runtime_suspend()
is not 0, -EAGAIN, or -EBUSY.  The PM core regards this as a fatal error,
and refuses to run anymore PM helper functions.  In particular,
usbfs_open() and other usbfs functions will fail because the PM core will
return an error code when usb_autoresume_device() is called.  This causes
libusb and/or lsusb to either hang or segfault.

If a USB device cannot suspend for some reason (e.g. a hub doesn't report
it has remote wakeup capabilities), we still want lsusb and other
userspace programs to work.  So return -EBUSY, which will fill people's
log files with failed tries, but will ensure userspace still works.

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6</title>
<updated>2011-01-10T16:14:53Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-01-10T16:14:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c8940eca75e6d1ea57f6c491a30bd1023c64c9ad'/>
<id>urn:sha1:c8940eca75e6d1ea57f6c491a30bd1023c64c9ad</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  spi / PM: Support dev_pm_ops
  PM: Prototype the pm_generic_ operations
  PM / Runtime: Generic resume shouldn't set RPM_ACTIVE unconditionally
  PM: Use dev_name() in core device suspend and resume routines
  PM: Permit registration of parentless devices during system suspend
  PM: Replace the device power.status field with a bit field
  PM: Remove redundant checks from core device resume routines
  PM: Use a different list of devices for each stage of device suspend
  PM: Avoid compiler warning in pm_noirq_op()
  PM: Use pm_wakeup_pending() in __device_suspend()
  PM / Wakeup: Replace pm_check_wakeup_events() with pm_wakeup_pending()
  PM: Prevent dpm_prepare() from returning errors unnecessarily
  PM: Fix references to basic-pm-debugging.txt in drivers-testing.txt
  PM / Runtime: Add synchronous runtime interface for interrupt handlers (v3)
  PM / Hibernate: When failed, in_suspend should be reset
  PM / Hibernate: hibernation_ops-&gt;leave should be checked too
  Freezer: Fix a race during freezing of TASK_STOPPED tasks
  PM: Use proper ccflag flag in kernel/power/Makefile
  PM / Runtime: Fix comments to match runtime callback code
</content>
</entry>
<entry>
<title>PM: Replace the device power.status field with a bit field</title>
<updated>2010-12-24T14:02:44Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2010-12-15T23:51:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b8c76f6aed0ab7df73a6410f3f82de2c831bb144'/>
<id>urn:sha1:b8c76f6aed0ab7df73a6410f3f82de2c831bb144</id>
<content type='text'>
The device power.status field is too complicated for its purpose
(storing the information about whether or not the device is in the
"active" state from the PM core's point of view), so replace it with
a bit field and modify all of its users accordingly.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>USB: improve uses of usb_mark_last_busy</title>
<updated>2010-11-16T22:04:22Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2010-11-15T20:57:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c08512c761e7b9eaaab0e9167a389393f268e93c'/>
<id>urn:sha1:c08512c761e7b9eaaab0e9167a389393f268e93c</id>
<content type='text'>
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: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
