Re: xhci: LPM issues using Western Digital harddrive

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

 



On Mon, Oct 01, 2012 at 03:53:03PM -0400, Alan Stern wrote:
> On Mon, 1 Oct 2012, Sarah Sharp wrote:
> 
> > > I don't remember the details.  Doesn't usb_unlocked_disable_lpm() force 
> > > the device back into U0?  You call that routine before suspending the 
> > > port.
> > 
> > It sends the control transfer to bring the port from U1/U2 into U0 and
> > disables any further device or hub initiated U1/U2 transitions.  But it
> > doesn't actually _wait_ for the port to enter U0.
> 
> Would you have to poll for it in a loop?

We know the worst-case amount of time it takes for a path in the device
tree to come out of U1 or U2.  I would probably implement a loop that
sleeps using udelay or msleep for that path exit latency, and then
checks the port status.  After some arbitrary number of times (3? 5?)
the call to disable LPM would fail.

> > > But we don't when going into the FREEZE or PRETHAW stages of 
> > > hibernation -- all we do is call the bus_suspend routines for root 
> > > hubs.  That may need to be changed for USB-3 buses.
> > 
> > I think so.  Where is the code that only calls bus_suspend?  I'll take a
> > stab at fixing it.
> 
> generic.c:generic_suspend().  Note that nowadays, PM_EVENT_PRETHAW is 
> merely an alias for PM_EVENT_QUIESCE.

Ok, thanks.

Sarah Sharp
--
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