Changes since v8 [1]:
* Added patch 1 from Alan "USB: mutual exclusion for resetting a hub and
power-managing a port"
* Reworked patch 9 "usb: make usb_port flags atomic, rename
did_runtime_put to child_usage" to move the flags from struct usb_port
to struct usb_hub. Also clarified that did_runtime_put is really a
stand-in for a child usage count
* Reworked patch 17 "usb: resume (wakeup) child device when port is
powered on" to use pm_request_resume() rather than
usb_wakeup_notification(). Rafael, note that this is the patch where we
needed to work around pm_runtime_barrier() disabling future suspends
after flushing the resume. Also added calls to pm_runtime_disable() to
prevent collisions between usb_port_runtime_resume() and
usb_disconnect().
See a summary of the review state of the series below.
=====
This series addresses the following disconnect scenarios when attempting
to use port power-off.
1/ Superspeed devices downgrade to their hispeed connection when
rx-detection fails on the superspeed pins. Address this by
preventing superspeed port poweroff/suspension until the peer port is
suspended, and powering on the superspeed port before the hispeed
port is resumed. This depends on the ability to identify peer ports
(patches 5-8, and patch 10 implements the policy).
2/ khubd prematurely disconnects ports that are in the process of being
resumed or reset. After this series khubd will ignore ports in the
pm-runtime-suspended or suspending state, or force active ports in the
resuming state (patch 14). While it is running it holds a new port
status lock to synchronize the port status changes of
usb_port_{suspend|resume} and usb_reset_and_verify_device() (patch 15).
3/ Superspeed devices fail to reconnect after a 2 second timeout This
event has two causes:
3.1/ Repeated {Set|Clear}PortFeature(PORT_POWER) toggles results in
the the device switching to its hispeed connection (due to
perceived instability of the superspeed connection). Address
this by arranging for the child device to be woken up
and complete a resume cycle when the parent port resumes (patch 17).
3.2/ Devices may require a warm reset when recovering the power
session. When the child device is woken up per above and the
port timed out on reconnect, force a warm-reset during the
child's reset-resume (patch 18).
[1]: v8: http://marc.info/?l=linux-usb&m=139872881108074&w=2
---
ACK => Acked-by: Alan Stern <[email protected]>
ack => Acked-by another reviewer
ACK [01/19] USB: mutual exclusion for resetting a hub and power-managing a port
ACK [02/19] usb: disable port power control if not supported in
wHubCharacteristics
ACK [03/19] usb: rename usb_port device objects
ACK [04/19] usb: cleanup setting udev->removable from port_dev->connect_type
ACK [05/19] usb: assign default peer ports for root hubs
ACK [06/19] usb: assign usb3 external hub port peers
ACK [07/19] usb: find internal hub tier mismatch via acpi
ACK [08/19] usb: sysfs link peer ports
[09/19] usb: make usb_port flags atomic, rename did_runtime_put to
child_usage
ACK [10/19] usb: block suspension of superspeed port while hispeed peer is
active
ACK [11/19] usb: don't clear FEAT_C_ENABLE on usb_port_runtime_resume failure
ACK [12/19] usb: usb3 ports do not support FEAT_C_ENABLE
[13/19] usb: refactor port handling in hub_events()
[14/19] usb: synchronize port poweroff and khubd
[15/19] usb: introduce port status lock
[16/19] usb: hub_handle_remote_wakeup() depends on CONFIG_PM_RUNTIME=y
[17/19] usb: resume (wakeup) child device when port is powered on
ack [18/19] usb: force warm reset to break link re-connect livelock
[19/19] usb: documentation for usb port power off mechanisms
Documentation/usb/power-management.txt | 242 +++++++++
drivers/usb/core/hcd.c | 45 +-
drivers/usb/core/hub.c | 889 +++++++++++++++++---------------
drivers/usb/core/hub.h | 43 +-
drivers/usb/core/port.c | 312 ++++++++++-
drivers/usb/core/usb-acpi.c | 107 ++--
drivers/usb/core/usb.h | 16 -
7 files changed, 1131 insertions(+), 523 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html