USB, select/poll for ucom

Bernd Walter ticso at cicely12.cicely.de
Wed Jun 25 21:17:43 PDT 2003


On Wed, Jun 25, 2003 at 02:58:28PM -0400, Louis A. Mamakos wrote:
> 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.

ugen can't preread from the device because it has to be generic.
And without the appilication to call read(2) it has absolutely no clue
about the number of bytes that can be read without harming the device.
There are many devices out there where the number of bytes that you
request do matter.

ucom is different - it has a device specific driver that knows the
hardware and starts receiving bytes from the hardware once the
application opens the device.

-- 
B.Walter                   BWCT                http://www.bwct.de
ticso at bwct.de                                  info at bwct.de



More information about the freebsd-hackers mailing list