USB, select/poll for ucom
M. Warner Losh
imp at bsdimp.com
Wed Jun 25 12:34:05 PDT 2003
In message: <200306251858.h5PIwSW8017536 at whizzo.transsys.com>
"Louis A. Mamakos" <louie at TransSys.COM> writes:
: I think the problem is that the USB hardware doesn't try to read data
: from the peripheral until the user-mode code does a read(2) system
: call. I had this problem with the ugen device. I would guess that
: the ucom/umodem devices could use the tty clist infrastructure as
: the intermediate buffer for data to be stuck into absent the user
: application doing a read.
I thought that ucom does do that. It uses ttypoll as its polling
function, and seems to insert data into the tty structure on an
interrupt basis. That is hidden a little bit by the usb driver
structure. In the middle of ucomopen we call ucomstartread which
posts a read onto the bulk in pipe. This read fires a callback when
it is 'finished' which the processes the data. So I think that maybe
that transfer is never completing.
Warner
More information about the freebsd-hackers
mailing list