From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 25 12:34:05 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 1C0C137B401 for ; Wed, 25 Jun 2003 12:34:05 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 541E443FBF for ; Wed, 25 Jun 2003 12:34:04 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (harmony.village.org [10.0.0.6]) by harmony.village.org (8.12.8/8.12.3) with ESMTP id h5PJXuE1053443; Wed, 25 Jun 2003 13:33:57 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 25 Jun 2003 13:33:52 -0600 (MDT) Message-Id: <20030625.133352.08453169.imp@bsdimp.com> To: louie@TransSys.COM From: "M. Warner Losh" In-Reply-To: <200306251858.h5PIwSW8017536@whizzo.transsys.com> References: <20030625.101549.78767546.imp@bsdimp.com> <200306251858.h5PIwSW8017536@whizzo.transsys.com> X-Mailer: Mew version 2.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2003 19:34:05 -0000 In message: <200306251858.h5PIwSW8017536@whizzo.transsys.com> "Louis A. Mamakos" writes: : 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. I thought that ucom does do that. It uses ttypoll as its polling function, and seems to insert data into the tty structure on an interrupt basis. That is hidden a little bit by the usb driver structure. In the middle of ucomopen we call ucomstartread which posts a read onto the bulk in pipe. This read fires a callback when it is 'finished' which the processes the data. So I think that maybe that transfer is never completing. Warner