Re: [PATCH 3/11] USB: interface PM state

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Fri, 6 Apr 2007, David Brownell wrote:

> I think the key thing to abstract from your comments below is that
> this state was once used, but that's (thankfully) changed.
> 
> In fact, the generalization is that since dev.power.power_state is
> going to be removed (this summer!), we want to know sooner -- rather
> than later! -- if we even care about it.

Agreed.

> > (There is an apparently unnecessary reference in 
> > usbtest.c, but it shouldn't be affected by this patch.  It also has a
> > race...)
> 
> Presumably autoresume handles that issue now.

It will, if anyone gets around to adding support for it to usbtest.  Not
a big job.

> > BTW, the same is true for udev->dev.power.power_state, with two 
> > exceptions:
> > 
> > 	At one point in hub.c the value is checked in lieu of looking
> > 	at udev->state when CONFIG_USB_SUSPEND isn't set;
> > 
> > 	At one place in hcd-pci.c the value for a root hub is checked --
> > 	this really should be replaced with a check for USB_STATE_SUSPENDED.
> 
> Again, power_state clearly being on the way out, we have alternate
> solutions for what it previously seemed to solve.

Yes.  However there is still one aspect for which we haven't fashioned a
replacement -- the host controller devices themselves.  Both the HCDs and
usbcore are concerned with their power states in various places, and
right now they all rely on checking dev.power.power_state.  Perhaps we 
should add a field to struct usb_hcd for this purpose.

Assuming we do, do you think that field would need to indicate anything 
other than "powered on" vs. "powered off"?  That is, would the non-PCI 
drivers want to store different, more structured values?  Or would they go 
somewhere else, in the driver's private data?

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.