From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 25 05:27:32 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 7728A37B401 for ; Wed, 25 Jun 2003 05:27:32 -0700 (PDT) Received: from cs.huji.ac.il (cs.huji.ac.il [132.65.16.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF18843FE1 for ; Wed, 25 Jun 2003 05:27:31 -0700 (PDT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32] ident=danny) by cs.huji.ac.il with esmtp id 19V9N4-000CpW-00; Wed, 25 Jun 2003 15:27:30 +0300 X-Mailer: exmh version 2.6.3 04/04/2003 with nmh-1.0.4 To: ticso@cicely.de In-Reply-To: Message from Bernd Walter <20030625120837.GC52854@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 25 Jun 2003 15:27:30 +0300 From: Danny Braniss Message-Id: 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 12:27:32 -0000 > On Wed, Jun 25, 2003 at 01:13:56PM +0300, Danny Braniss wrote: > > hi, > > while trying to port an application that works with tty to uplcom/ucom, > > (and it doesn't work :-), and looking at the kernel sources and > > trying to figure out USB, i think that select(2)/poll(2) will not work, > > correct? > > I've seen Problemes with non 8n1 communications and I've also seen > problems because most USB adapters only deliver 5.5V to the lines. > I never noticed any select/poll problems and I don't think we have any > because this is handled in common code at tty level. > > If you have any condition that shows something different please let > us know. > i turned debug on and i could not see any calls to ucomread, the program calls select(...) - but select does not initiate anything, it justs waits to be woken when something is received (in the case of reading), now, unless im wrong - which well could be :-), the read in this case must be started - usb is a master/slave protocol, and this is not happening. if(select(fdset,...)) { if(FD_ISSET(ifd, fdset)) read(ifd, ... ... } danny PS: im using 5.1-current, and im trying to get a Towitoko smartcard reader to work.