On Fri, 4 Mar 2005, zhougoal wrote:

> Hello,everybody!
> 
>       I am a linux-usb user,and now I am reading the linux-usb code
> .Just now I got a question.Anyone Can help me ?
> 
>       I found the usb_probe_interface is the first entry to probe my
> device,is it correct?

That's right.

> And my question is: when I register root_hub ,I
> dont register the interface ,but here the macro to_usb_interface is used
> , it will cause the *intf point to a uninitialized address?

The USB core automatically registers all the interfaces when 
usb_set_configuration() is called from within usb_new_device().  You don't 
have to register the interfaces yourself.  So *intf will not point to an 
uninitialized address.

>       int usb_probe_interface(struct device *dev)
>       {
>               struct usb_interface * intf = to_usb_interface(dev);
>               struct usb_driver * driver = to_usb_driver(dev->driver);
>               const struct usb_device_id *id;
>       ...........
>       Can anyone tell me where is my mistakes! And the interrupt such as
> ehci_irq should be called in a timer's interrupt or a pci interrupt.

It should be called in a PCI interrupt, not a timer interrupt.

Alan Stern



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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