On Mon, Nov 26, 2001 at 11:02:08PM +0530, Masoodur Rahman wrote:
> hi ,
> I was not able to figure out how the packets coming to the usb device are
> handed over to the USB device drivers through the usb-uhci interface .
> AFAICS, while sending the packets, it goes through
> -->uhci_submit_urb()---->uhci_submit_xxx_urb() (xxx->ctrl/bulk/iso/int)
>
> In each of these routines Tds are allocates and filled and the URB gets
> queued.
> After this the host controller takes charge of putting them on the bus.
> Is my understanding correct ???
>
> What happens when a packet(bulk/isoc/control/interrupt) comes to the usb
> device from the other side ??
> What are the functions that gets called upto the point where it delivers
> to the specific device driver ?? Does it start from uhci_interrupt ???
No, you missed the point that USB is a master/slave protocol, with the PC as
the ONE AND ONLY master. Thus the PC actively sends a "read-request" to the
device, which answers (hopefully). So the if the user wants to receive data,
a TD with the IN-flag is assembled. This TD triggers a IN request on USB, if
the device sends data, the TD gets filled and completed. If no data arrives
(either an active NAK or a timeout), the transfer is retried.
So everything is started with the submit_urb, the interrupts only signal the
completion or the failing of the transfer.
--
Georg Acher, [EMAIL PROTECTED]
http://www.in.tum.de/~acher/
"Oh no, not again !" The bowl of petunias
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users