Re: Difference between run time and normal suspend

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

 



On Wed, 7 Jan 2015, vichy wrote:

> I attach usbmon for your reference.
> But keyboard is still not working on runtime suspend.

The usbmon trace resembles what I got during a test some time ago.  I
don't remember the details; the problem was related to the fact that
the keyboard had two HID interfaces.  One of them was suspending okay
but the other one wasn't, and that prevented the entire keyboard from
going into runtime suspend.  The same thing is happening to you.

The problem turned out to be something like the LED settings.  Does the 
keyboard go into runtime suspend if you turn off all the LEDs (Caps 
Lock, Num Lock, and so on)?  Or if you turn on the "ignoreled" module 
parameter for usbhid?

An illuminated LED requires more current than a suspended device is 
allowed to draw from the USB bus.  Therefore a bus-powered keyboard 
cannot be put into runtime suspend if any of its LEDs is turned on.

> >> 3. for host part, runtime suspend/resume is only doing port
> >> suspend/resume or both host and port going to suspend/resume?
> >
> > Only the port.  However, when _all_ the devices attached to the host
> > controlluer go into runtime suspend, the controller itself will also be
> > put into runtime suspend.
> Would you mind to show me where the program determine controller go
> into runtime suspend if all devices on it go to suspend?

That is handled by the runtime PM core.  Look for the comment line:

	/* Maybe the parent is now able to suspend. */

in rpm_suspend() in drivers/base/power/runtime.c.

> BTW
> a. if even controller suspended, does that mean all devices on it will
> be disconnect and re-enumerated when resume?

No.  When the controller resumes, the devices should still be connected 
to it.

> b. is there any usb sysfs file can let us suspend specific port on
> root or normal hub?

No, there's only the .../power/control file.

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