Hello everyone,

I am implementing a USB driver that emulates a network device (like eth0).
The driver interacts with underlying USB adapter via simple protocol
(command request-confirmation reply). So the sample sequence to send
data to the adapter was:

SendUSBRequest - usb_submit_urb(read_urb); usb_submit_urb(write_urb);
WaitUSBReply - schedule_timeout() and wait for receive callback to finish

This works fine unless network device stuff comes in.
The hard_xmit() method of network device is an interrupt,
so I can't use schedule_timeout() to wait for reply.
Tasklets are useless here, because of the same schedule_timeout thing..
So, whatever I tried to do, receive callback is invoked always
after the hard_xmit finishes (the adapter itself replies shortly).

What I really do not understand is why write_urb callback happens during
this interrupt, while read_urb callback does not (dark secrets of usbcore?)...

Does anybody have an idea how to overcome this?


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to