Re: question about interrupt firing in controller

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Thu, 22 Nov 2007, [big5] ³¢­õ§g (chechun_kuo) wrote:

> Dear all guys and Greg:
> I have a question about when will the the hub_irq be called?

It will be called whenever the hub-status URB completes.

> In hub_configure, we register the hub->urb as urb->complete function below:
> 	usb_fill_int_urb(hub->urb, hdev, pipe, *hub->buffer, maxp, hub_irq,
> 		hub, endpoint->bInterval);
> and in hub_activate(hub), we submit it.
> 	status = usb_submit_urb(hub->urb, GFP_NOIO);
> 
> But the hub_irq is only called after usb_hcd_irq, the irq handler we register for the ehci.

That's not quite correct; it can be called at other times too.  You'll 
see if you test with a UHCI controller.

> It seems we submit the hub->urb to some place and it is been called after interrupt triggered. But where does it hide? 
> Appreciate your help,

Pointers to hub->urb get stored in several places.  For example, in
hcd.c you can see that rh_queue_status() makes hcd->status_urb point to
hub->urb.  That pointer then gets used in usb_hcd_poll_rh_status().

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
[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.