Quoting Alan Stern <[EMAIL PROTECTED]>:

> > Mister Greg, how to change configuration _inside_ the driver? Device
> > was made to be
> > working on second usb config after one reconnect/device change, i've
> > lost whole day
> > trying to make something with that. After all, usb_set_configuration()
> > isn't even
> > EXPORT()ED at all !

The current driver depends on a hot plug script to change configurations.
See the comments at the top of the file.  That is not an ideal situation
at all.  If 2.6.19 again has a way for the driver to change its configuration
that would be great.

-- Al

>
> It isn't exported because, generally speaking, drivers can't use it.  If
> your driver called usb_set_configuration() from within its probe routine,
> it would hang.  That's because usb_set_configuration would unregister the
> interface being probed by your driver, so it would try to call your
> driver's disconnect routine, but first it would have to wait for the probe
> to finish -- deadlock.
>
> There is an exported routine drivers can use in the rare cases where they
> do need to change configurations.  It's called
> usb_driver_set_configuration(), and it is present in 2.6.19.
>
> 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