xHCI: Kick khubd when USB3 resume really completes.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Wed, 25 Jan 2012 00:39:02 +0000 (16:39 -0800)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Tue, 14 Feb 2012 20:11:50 +0000 (12:11 -0800)
commitd93814cfadb131fb219359d4b7008c728421c552
tree67e97af19569cebf85fa04384712aeb3e9bedf63
parent50e5dfb6c4111c860bfa4d93dfe115bedf6b0fb1
xHCI: Kick khubd when USB3 resume really completes.

xHCI roothubs go through slightly different port state machines when
either a device initiates a remote wakeup and signals resume, or when
the host initiates a resume.

According to section 4.19.1.2.13 of the xHCI 1.0 spec, on host-initiated
resume, the xHC port state machine automatically goes through the U3Exit
state into the U0 state, setting the port link state change (PLC) bit in
the process.

When a device initiates resume, the xHCI port state machine goes into
the "Resume" state and sets the PLC bit.  Then the xHCI driver writes U0
into the port link state register to transition the port to U0 from the
Resume state.

We can't be sure the device is actually in the U0 state until we receive
the next port status change event with the PLC bit set.  We really don't
want khubd to be polling the roothub port status bits until the device
is really in U0.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: Andiry Xu <andiry.xu@amd.com>
drivers/usb/host/xhci-ring.c