Re: [RFC 2/2] USB: Enable Latency Tolerance Messaging (LTM).

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

 



On Mon, 2 Jul 2012, Sarah Sharp wrote:

> > > > @@ -4705,6 +4759,8 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
> > > >  	if (ret) {
> > > >  		dev_err(&udev->dev, "%s Failed to disable LPM\n.", __func__);
> > > >  		mutex_unlock(hcd->bandwidth_mutex);
> > > > +		/* Re-enable LTM, since the default is disabled after reset. */
> > > > +		usb_enable_ltm(udev);
> > > 
> > > These enable calls don't belong all over the place in this function.  
> > > They should occur in exactly one place, in hub_port_reset(), since they 
> > > are needed after each reset.
> 
> The Set Feature LTM_ENABLE request is only valid when the device is in
> the Configured state, so I can't push it down into hub_port_reset().  I
> can't even push it down to hub_port_init() because that function doesn't
> set the configuration.

Yes -- I realized it too the day after sending that message.  We may
not even have the device descriptor when a reset occurs.

Still, it should be possible to use a single call in a single place.  

> I could change hub_port_reset() to disable LPM and LTM before the port
> is reset, if the device is configured.  Callers of hub_port_init() will
> need to re-enable LPM and LTM once the device is configured.

Or maybe add something to usb_set_configuration.

Alan Stern

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