Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jan 2006 14:05:26 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-usb@freebsd.org
Cc:        Robert Bruce <rab@mall.freebsdmall.com>
Subject:   Re: Non-blocking I/O on bulk endpoints
Message-ID:  <200601251405.28115.hselasky@c2i.net>
In-Reply-To: <20060122150236.CF2A11CDCF@mail.freebsdmall.com>
References:  <20060122150236.CF2A11CDCF@mail.freebsdmall.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 22 January 2006 16:02, Robert Bruce wrote:
> If I open a USB endpoint with the O_NONBLOCK bit set, it works
> okay if it is an "interrupt" endpoint, and will return EWOULDBLOCK
> for a read() if there is no data.  But if it is a "bulk" endpoint,
> the read() will block.  So I tried using select() to find out if
> there was data available before trying to read it.  But select()
> seems to work properly only for "interrupt" endpoints.  On a
> "bulk" endpoint, select() always reports that there is data ready
> to be read, even when there is not.
>
> Is there any way to do non-blocking I/O on a bulk endpoint?
>
> I looked at sys/dev/usb/ugen.c, and it looks like non-blocking
> I/O is intentionally left out for bulk endpoints.  So maybe
> there is something that makes it difficult to implement.
>
> I am running FreeBSD 6.0, on an AMD64, if that makes any
> difference.
>
>  -bob

No. Though one might want to have something like it.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601251405.28115.hselasky>