[PATCH v2 00/14] fixup and rework port power control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Summary:
1/ Half the size of v1 [1], drop peer port power control for now
2/ Make port power control more robust by reusing the existing
   "reset-resume" implementation for connection recovery.

First off, this set diverges significantly from the initial RFC [1].  It
frontloads the fixes to the top of the patchset and completely drops the
attempt to track and synchronize peer ports (peer ports being the paired
USB3 and USB2 phys that share a connector).  As a result, it is about
half the size of the original set.  5 of the patches cleanup/delete more
lines than they add (patches 1, 3, 4, 7 and 12) and patch 14 updates the
power-management document for port power control.

At this point it looks as though the peer port power coordination code
may not be necessary.  Testing high frequency port power toggling indeed
caused a USB3 SATA bridge device to switch from its USB3 connection to
USB2.  However, the same "disconnect" (failure to reconnect on resume)
occurred whether the peer USB2 port was powered or not.  The hypothesis
is that upon seeing a high frequency connection toggle the device
eventually gives up on trying to connect via its USB3 phy.  Regardless,
the failure mode is not modulated by the power state of the peer port.

"[PATCH v2 13/14] USB: ratelimit port power transitions" follows that
line of thinking and prevents userspace from toggling power faster than
one recovery (reset-resume) cycle.  With patch 13 in place the test
device reliably reconnects via its USB3 connection.  We can revisit this
if we encounter devices that aggressively downgrade to USB2; however,
the suspicion is that those devices would have proven to be flakey with
the power session losses that occur during system suspend.

Patches 1, 6, 7, and 13 are the meat of the implemenation rework.

Patches 9 - 11 are straightforward and simply take/drop a pm reference
anytime one of the power off constraints is touched.

Remaining patches are cleanups, minor fixes, and documentation.

Please review, much appreciated.

--
Dan

[1]: http://marc.info/?l=linux-usb&m=138260013707007&w=2

---

Patches with notable cleanups below.

[PATCH v2 01/14] USB: use ->reset_resume for port power recovery
	3 files changed, 27 insertions(+), 40 deletions(-)
[PATCH v2 02/14] USB: synchronize port poweroff and khubd
[PATCH v2 03/14] USB: kill ->power_is_on flag and usb_hub_set_port_power() wrapper
	3 files changed, 16 insertions(+), 56 deletions(-)
[PATCH v2 04/14] USB: kill unnecessary C_PORT_CONNECTION and broken C_PORT_ENABLE manipulations
	1 files changed, 0 insertions(+), 2 deletions(-)
[PATCH v2 05/14] USB: allow hubs to runtime suspend after all ports are powered off
[PATCH v2 06/14] USB: centralize usb port power policy
[PATCH v2 07/14] USB: make usb_ports proper parents of their child usb_devices
	4 files changed, 21 insertions(+), 59 deletions(-)
[PATCH v2 08/14] USB: show port power state
[PATCH v2 09/14] PM / Runtime: hold device active during device_wakeup_{enable|disable}
[PATCH v2 10/14] USB: notify pm_runtime on change to ->persist_enabled
[PATCH v2 11/14] USB: add connect_type == hotplug as a port poweroff constraint
[PATCH v2 12/14] USB: convert khubd to a workqueue
	2 files changed, 29 insertions(+), 103 deletions(-)
[PATCH v2 13/14] USB: ratelimit port power transitions
[PATCH v2 14/14] USB: Documentation for USB port power off mechanisms

 Documentation/ABI/testing/sysfs-bus-usb |   21 ++
 Documentation/usb/power-management.txt  |  208 +++++++++++++++++++
 drivers/base/power/wakeup.c             |    9 +
 drivers/usb/core/hub.c                  |  340 ++++++++++++-------------------
 drivers/usb/core/hub.h                  |   35 +--
 drivers/usb/core/port.c                 |  178 +++++++++++++---
 drivers/usb/core/sysfs.c                |    3 
 drivers/usb/core/usb.c                  |    9 +
 8 files changed, 536 insertions(+), 267 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux