All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: How the EHCI HC driver make the decision to suspend some USB devices?
       [not found] <E1137F8E61CF44408FF70E6507DB4B0499FDDEB4@szxeml592-mbx.china.huawei.com>
@ 2016-08-19 14:16 ` Alan Stern
  2016-08-22  9:04   ` Oliver Neukum
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Stern @ 2016-08-19 14:16 UTC (permalink / raw)
  To: ludeng
  Cc: gregkh, linux-usb, linux-kernel, Lipengcheng,
	Zhangzhenxing (Christian, Device ChipSet)

On Fri, 19 Aug 2016, ludeng wrote:

> Hi,
> How the EHCI HC driver make the decision to suspend some USB devices,
> but not to suspend some others? We notice that for some USB Video
> Cameras, when they are enumerated and there is no data to transfer,
> the EHCI HC driver will suspend them by setting the Suspend bit of
> the PORTSC register. But for some other Cameras, the EHCI HC driver
> will not suspend them. The drvier make the decision based on what
> kind of information of the device ?

The EHCI driver does not make this decision.  The decision is made by 
the video camera driver and by the user.

Alan Stern

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How the EHCI HC driver make the decision to suspend some USB devices?
  2016-08-19 14:16 ` How the EHCI HC driver make the decision to suspend some USB devices? Alan Stern
@ 2016-08-22  9:04   ` Oliver Neukum
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Neukum @ 2016-08-22  9:04 UTC (permalink / raw)
  To: Alan Stern
  Cc: ludeng, Lipengcheng, Device ChipSet) Zhangzhenxing (Christian,
	gregkh, linux-kernel, linux-usb

On Fri, 2016-08-19 at 10:16 -0400, Alan Stern wrote:
> On Fri, 19 Aug 2016, ludeng wrote:
> 
> > Hi,
> > How the EHCI HC driver make the decision to suspend some USB devices,
> > but not to suspend some others? We notice that for some USB Video
> > Cameras, when they are enumerated and there is no data to transfer,
> > the EHCI HC driver will suspend them by setting the Suspend bit of
> > the PORTSC register. But for some other Cameras, the EHCI HC driver
> > will not suspend them. The drvier make the decision based on what
> > kind of information of the device ?
> 
> The EHCI driver does not make this decision.  The decision is made by 
> the video camera driver and by the user.

And the driver core in case of devices with multiple interfaces.

But I guess, the question is also about how, not where the decision
is made.

Runtime suspend will be used if

1) every interface's driver has declared
	a) it supports autosuspend
	b) its interface is idle

2) every bus connected to an interface [SCSI] has only suspended
devices

3) the requirements for remote wakeup are met on every interface.
That means, either
	a) remote wakeup is not requested
	b) remote wakeup is requested and
		I) the device supports it
		II) the RESET_RESUME quirk is not set for the device

4) it is enabled in sysfs

	HTH
		Oliver

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-22  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1137F8E61CF44408FF70E6507DB4B0499FDDEB4@szxeml592-mbx.china.huawei.com>
2016-08-19 14:16 ` How the EHCI HC driver make the decision to suspend some USB devices? Alan Stern
2016-08-22  9:04   ` Oliver Neukum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.