Date: Mon, 15 Apr 2002 20:48:12 +0200 (CEST) From: Nick Hibma <n_hibma@van-laarhoven.org> To: Peter Haight <peterh@sapros.com> Cc: "hardware@freebsd.org" <hardware@freebsd.org> Subject: Re: Reading from the USB ugen device. Message-ID: <20020415204427.P26630-100000@heather.van-laarhoven.org> In-Reply-To: <200204151747.g3FHlPRg037046@wartch.sapros.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> >No. If you read 64 bytes in 64 bytes with short_XFER switched on you > >will be reading 64 bytes and then 0 bytes. This should have beenL If you read 64 byte reads with SHORT_XFER on you will be reading 64 bytes and then 0 bytes. > Ok. But why does this happen: > > read(3, 0x8091800, 1024) > read -1 bytes If you print the errno at that point I can tell you. But probably the errno is ETIMEDOUT, which means that the device told us that there is no data, so it NACKed the transfer until we got bored. > At that same point in the protocol if I do: > read(3, 0x8091800, 64) > read 64 bytes > > I would expect: > read(3, 0x8091800, 1024) > read 64 bytes I don't know why it reads 64 instead of 1024 bytes. Most probably the author of the program assumes that he has to do the chunking that is automatically done by the uhci controller driver. Or maybe I misunderstood your question. Nick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020415204427.P26630-100000>