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 01:32:08PM -0400, Alan Stern wrote:
> On Mon, 1 Oct 2012, Sarah Sharp wrote:
> > Second, I'm wondering if LPM is interacting with system suspend and
> > resume in a bad way.  I noticed in my log with the USB 3.0 hub and hard
> > drive that LPM was disabled for the hub before the system went into
> > suspend, but LPM was not disabled for the hard drive.  We should have
> > disabled LPM if usb_port_suspend() was called for the hard drive's port.
> > I'll have to add some more debugging to see if it was called, but I
> > don't think it is.
> > 
> > ISTR that you said when the system is suspended or hibernated, only the
> > roothub ports are placed into suspend, because the rest of the bus will
> > be placed into global suspend when the system goes into S3/S4.
> 
> I said that only the root hub's ports _need_ to be suspended.  And of
> course, that statement doesn't apply to USB-3 ports.
> 
> >  However,
> > there is no link state transition between U1/U2 into U3.  If a USB 3.0
> > device in the second tier of the tree is in U1/U2 when the system is
> > suspended, we're attempting to put it into U3 from U1 or U2.  That could
> > possibly cause us to hit bugs in the device firmware, since we're
> > forcing the device through an undefined link state transition.
> 
> 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.

> > Is my recollection of the system suspend procedure correct, or do I have
> > something wrong here?
> 
> Currently we do suspend all the attached devices when going into system 
> suspend.

Hmm, I'll have to do some further debugging, because that probably means
there's a bug in the LPM code if the hard drive didn't have LPM disabled
before suspend.

> 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.

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