Hi

I looked at the driver binding code years ago (2.4.x).  Since then
things seem to have got a lot more complicated  :(

Anyway I'm using 2.6.19 now...
I have loaded the gadget Zero driver on the Device side.
I wish to load the usbtest driver on the Host side.

Problem is that usbtest does not seem to find a device to bind to.

>From usbtest_init(), and assuming everything works, then the stack seems
like it should look like this:

usb_register( usb_driver* )
driver_register( device_driver* )
bus_add_driver( device_driver* )
driver_attach( device_driver* )
bus_for_each_dev( bus_type* )
__driver_attach( device* dev, device_driver* drv )     <== Issue here.
driver_probe_device( device_driver* drv, device* dev )
usb_device_match(..)
usb_match_id(..)
usb_match_one_id(..)

In __driver_attach() there is a line that reads:

if (!dev->driver)
    driver_probe_device(drv, dev);

I've put printk's in here and the problem seems to be that dev->driver
is never NULL, thus driver_probe_device() never gets called.

dev->driver seems to be the address for the generic_usb structure
(dev->driver->name="usb").

Is that what is supposed to happen ? If Gadget Zero is loaded on the Dev
side and the host enumerates it but doesn't find a specific driver (like
usbtest) then is the generic_usb supposed to be assigned to it ?

How does generic_usb get removed if usbtest is then subsequently loaded
?

I obviously don't understand this process, any help is appreciated.
Thanks
dom

-------------------------------------------------------------------------
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