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
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to