From owner-freebsd-hardware Mon Apr 15 11:48:20 2002 Delivered-To: freebsd-hardware@freebsd.org Received: from van-laarhoven.org (ap-z-5ab8.adsl.wanadoo.nl [212.129.218.184]) by hub.freebsd.org (Postfix) with SMTP id A443B37B416 for ; Mon, 15 Apr 2002 11:48:15 -0700 (PDT) Received: (qmail 61475 invoked from network); 15 Apr 2002 18:48:12 -0000 Received: from heather.van-laarhoven.org (10.66.0.2) by uitsmijter.van-laarhoven.org with SMTP; 15 Apr 2002 18:48:12 -0000 Date: Mon, 15 Apr 2002 20:48:12 +0200 (CEST) From: Nick Hibma To: Peter Haight Cc: "hardware@freebsd.org" Subject: Re: Reading from the USB ugen device. In-Reply-To: <200204151747.g3FHlPRg037046@wartch.sapros.com> Message-ID: <20020415204427.P26630-100000@heather.van-laarhoven.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > >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