Status: To date Alan has acked 9 of 16 patches (patch 1, 2, and 4 - 10), thanks Alan! Of course, if others want to jump in please feel free. Changes since v6 [1] [2] are simply rebasing/testing on top of current usb-next (commit 6aec044cc2f5 "USB: unbind all interfaces before rebinding any"), fixing up the collisions with commit a82b76f7fa61 "usb: Reset USB-3 devices on USB-3 link bounce" and recording Alan's acks. ===== 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 4-7, and patch 8 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 12). 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 13). 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 14). 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 15). [1] v6 part1: http://marc.info/?l=linux-usb&m=139362948508700&w=2 [2] v6 part2: http://marc.info/?l=linux-usb&m=139474608015248&w=2 --- [PATCH v7 01/16] usb: disable port power control if not supported in wHubCharacteristics [PATCH v7 02/16] usb: rename usb_port device objects [PATCH v7 03/16] usb: cleanup setting udev->removable from port_dev->connect_type [PATCH v7 04/16] usb: assign default peer ports for root hubs [PATCH v7 05/16] usb: assign usb3 external hub port peers [PATCH v7 06/16] usb: find internal hub tier mismatch via acpi [PATCH v7 07/16] usb: sysfs link peer ports [PATCH v7 08/16] usb: block suspension of superspeed port while hispeed peer is active [PATCH v7 09/16] usb: don't clear FEAT_C_ENABLE on usb_port_runtime_resume failure [PATCH v7 10/16] usb: usb3 ports do not support FEAT_C_ENABLE [PATCH v7 11/16] usb: refactor port handling in hub_events() [PATCH v7 12/16] usb: synchronize port poweroff and khubd [PATCH v7 13/16] usb: introduce port status lock [PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on [PATCH v7 15/16] usb: force warm reset to break link re-connect livelock [PATCH v7 16/16] 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 | 855 +++++++++++++++++--------------- drivers/usb/core/hub.h | 34 + drivers/usb/core/port.c | 293 ++++++++++- drivers/usb/core/usb-acpi.c | 107 ++-- drivers/usb/core/usb.h | 17 - 7 files changed, 1087 insertions(+), 506 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