[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-usb
Subject:    [PATCH v6 part1 0/8] port power control: cleanups and port peering
From:       Dan Williams <dan.j.williams () intel ! com>
Date:       2014-02-28 23:18:00
Message-ID: 20140228231653.15862.49161.stgit () viggo ! jf ! intel ! com
[Download RAW message or body]

Per Alan's request this is the first half of the series that addresses
the following disconnect scenarios when attempting to use port
power-off.  These 8 patches address scenario 1.  Scenarios 2 and 3 are
addressed in part2 of this series (to be re-posted once part1 is
accepted).

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.
   This depends on the ability to identify peer ports (patches 4-7), and
   then 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 state and holds a new port status lock
   to synchronize the port status changes of usb_port_{suspend|resume}.

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 caused the
	device to switch to its hispeed connection (perceived
	instability of the superspeed connection).  Address this by
	arranging for the child device to be woken up when the parent
        port resumes.

   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.

Changes since v5: [1]
* Patch 2: "usb: rename usb_port device objects"
           new cleanup patch: suggested by Alan to rename usb_port device
           objects to something useful.

* Patch 3: "usb: cleanup setting udev->removable from port_dev->connect_type"
           new cleanup patch: Alan noticed that usb_acpi_find_companion()
	   was doing work that belonged to set_usb_port_removable().

* Patch 4: "usb: assign default peer ports for root hubs"
           fixed up locking, now we hold the usb_port_peer_mutex around
	   the entire port registration/de-registration process and when
	   we invalidate a root hub for peering operations (i.e. mark it
           unregistered).

* Patch 5: "usb: assign usb3 external hub port peers"
           add locking around 'hub->disconnect = 1' and 'port->child =
           NULL' events to stop new lookups as hubs are being torn down.

* Patch 6: "usb: find internal hub tier mismatch via acpi"
	   Alan noticed that if we stop assigning default peers to ports
	   that have location data this patch gets much simpler as we no
	   longer need to redo peering when the default-peer conflicts
           with the acpi firmware based peer identification.

* Patch 7: "usb: sysfs link peer ports"
           Fixed up the changelog to reference the new port names

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

---

[PATCH v6 part1 1/8] usb: disable port power control if not supported in wHubCharacteristics
[PATCH v6 part1 2/8] usb: rename usb_port device objects
[PATCH v6 part1 3/8] usb: cleanup setting udev->removable from port_dev->connect_type
[PATCH v6 part1 4/8] usb: assign default peer ports for root hubs
[PATCH v6 part1 5/8] usb: assign usb3 external hub port peers
[PATCH v6 part1 6/8] usb: find internal hub tier mismatch via acpi
[PATCH v6 part1 7/8] usb: sysfs link peer ports
[PATCH v6 part1 8/8] usb: block suspension of superspeed port while hispeed peer is active

 drivers/usb/core/hcd.c      |    8 +
 drivers/usb/core/hub.c      |  316 ++++++++++++++++++-----------------------
 drivers/usb/core/hub.h      |   19 ++
 drivers/usb/core/port.c     |  330 +++++++++++++++++++++++++++++++++++++++++--
 drivers/usb/core/usb-acpi.c |  108 ++++++++------
 drivers/usb/core/usb.h      |   13 +-
 6 files changed, 553 insertions(+), 241 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic