Re: [PATCH 9/9 v3] usbcore: add sysfs support to xHCI usb2 hardware LPM

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

 



On Wed, Sep 07, 2011 at 02:36:24PM +0800, Andiry Xu wrote:
> On Tue, 2011-09-06 at 11:26 -0700, Greg KH wrote:
> > On Tue, Sep 06, 2011 at 08:06:30PM +0200, Sebastian Andrzej Siewior wrote:
> > > * Greg KH | 2011-09-06 08:27:13 [-0700]:
> > > 
> > > >> +		When a USB2 device which support LPM is plugged to a
> > > >> +		xHCI host root hub which support software LPM, the
> > > >> +		host will run a software LPM test for it; if the device
> > > >> +		enters L1 state and resume successfully and the host
> > > >> +		supports USB2 hardware LPM, it will enable hardware LPM
> > > >> +		for the device and the file shows "enable", otherwise
> > > >> +		it shows "disable". You can write those words to the
> > > >> +		file to enable/disable USB2 hardware LPM manually only
> > > >> +		if the device can perform LPM and the host supports
> > > >> +		hardware LPM. When driver suspend the port into U3
> > > >> +		state, it will disable hardware LPM first.
> > > >
> > > >This file should only show up if the device supports this, not for all
> > > >devices like this patch has.
> > > >
> > > >And why would you not enable this for a device that supports this?
> > > 
> > > According to Andiry's earlier postings there are some devices which
> > > support LPM and it works on xhci core from vendor A but it fails on a
> > > xhci core from vendor B. Another device works fine on both cores.
> > > As of now the root cause for this anomaly remains unknown.
> > 
> > Ok, then how would a user, or a distro, know if it was safe or not to
> > enable this?
> > 
> 
> The hardware LPM can be enable/disable via sysfs only if the device
> passed the LPM test, and after that hardware LPM is enabled
> automatically.
> 
> User can not force a non-LPM or LPM-test-failed device to enable
> hardware LPM, it will reject the request and show "operation not
> permitted", so it's safe.

No, you should not even show the sysfs file if this is something that
doesn't even pertain to this device.

Don't wait until the sysfs file is accessed to tell the user that their
hardware doesn't support this, it's too late and you can't tell the
difference between that, and "something went wrong".

thanks,

greg k-h
--
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