I am in the process of writing a device driver for a device which is a
combination vacuum flourescent display and ir receiver. The driver is
functional, but has some problems.
The device has a single configuration, and single interface with 2 endpoints.
The endpoints are transfer type "interrupt".
My open routine allocates 2 urb's (one for each endpoint, in and out) and
fills them with usb_fill_int_urb. I have an "in" callback routine and an
"out" callback routine.
I can read ir byte codes from the device and write characters to the display
including control codes which position subsequent character writes, clear
the display and set brightness.
My problem is that I cannot seem to reuse the out urb. When my write_callback
routine is called, the urb->status is 0, but another write to the device
blocks and the urb->status is thereafter -EINPROGRESS. If in my callback
routine I usb_unlink_urb, usb_free_urb and then usb_alloc_urb(0) and
re-initialize the structure, everything behaves correctly.
After each successful write, I have to release and then re-allocate the
out urb. Shouldn't I be able to reuse it? If so, does anyone have any
helpful hints as to what might be going on here?
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
To unsubscribe, use the last form field at: