Re: [RFC] USB 3.0 Hub Changes

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

 



On Thu, Jul 22, 2010 at 07:43:09AM +0200, Oliver Neukum wrote:
> Am Mittwoch, 21. Juli 2010, 22:43:48 schrieben Sie:
> > > Okay, good.  Could we put the link into a low-power state instead of 
> > > disabling it?  Ideally, a state from which it won't return to full 
> > > power until there's a disconnect or a reset?
> > 
> > Yes, I think we can.  Link PM is designed to be handled by the devices
> > on the bus, not software, but there is commands to force devices into
> > lower power link states.  SetPortFeature(PORT_LINK_STATE) = U1 or U2.
> > Figure 7-13 shows that if there's a device removal or a reset, then the
> > link state machine transitions back to Rx.Detect from any other state.
> > 
> > However, the SetPortFeature(PORT_LINK_STATE) for U1 or U2 will fail if
> > the link isn't in U0 to start with.  So we'd have to force the link into
> > U0 first, and then force it into U2.  I think we would also have to
> > disable the U1 and U2 timers too, otherwise the device could transition
> > into U1 from U0 before we could force it into U2.
> 
> If I read section 7.2.4.2 of the USB 3.0 spec correctly, a device may refuse
> to put its link into U1 or U2.

Under normal circuimstances, yes.  A device can refuse a lower power
link state request by a parent hub (say because it knows it is just
about to send an asynchronous request to tell the host data is
available, search for ERDY).  A hub can also refuse a device's request
to go into a lower power link state (because it has just received a
header bound for the device).

But this describes the case where the device and parent hub are acting
on programmed U1 and U2 timers, without direct software intervention.
If software wants to put the link into a lower power state, the device
cannot refuse.

The device "shall not" refuse a link power state request if the
Force_LinkPM_Accept bit is set in the request.  This bit is set when
software asks the hub to put the port into a particular link state.  See
section 8.4.2:

"Upon receipt of a LMP with the Force_LinkPM_Accept bit asserted, the
port shall accept all LGO_U1 and LGO_U2 Link Commands until the port
receives a LMP with the Force_LinkPM_Accept bit de-asserted."

This is how they do link power management testing in the compliance test
suite.  So devices won't be certified unless they will go into a link
state when this bit is set.  (Granted, there might be uncertified
devices out there.)

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