From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 25 21:17:43 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75C8537B401 for ; Wed, 25 Jun 2003 21:17:43 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32C4443FDD for ; Wed, 25 Jun 2003 21:17:42 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) by srv1.cosmo-project.de (8.12.9/8.12.9) with ESMTP id h5Q4HMhR095017 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 26 Jun 2003 06:17:25 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.9/8.12.9) with ESMTP id h5Q4HLDn042735 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 26 Jun 2003 06:17:21 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.9/8.12.9) with ESMTP id h5Q4HKgt062483; Thu, 26 Jun 2003 06:17:20 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.9/8.12.9/Submit) id h5Q4HJZ5062482; Thu, 26 Jun 2003 06:17:19 +0200 (CEST) Date: Thu, 26 Jun 2003 06:17:18 +0200 From: Bernd Walter To: "Louis A. Mamakos" Message-ID: <20030626041717.GA62147@cicely12.cicely.de> References: <20030625.101549.78767546.imp@bsdimp.com> <200306251858.h5PIwSW8017536@whizzo.transsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306251858.h5PIwSW8017536@whizzo.transsys.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: freebsd-hackers@freebsd.org Subject: Re: USB, select/poll for ucom X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2003 04:17:43 -0000 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@bwct.de info@bwct.de