From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 11 07:58:37 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F3631065675 for ; Tue, 11 Aug 2009 07:58:37 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.swipnet.se [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id 26CD18FC31 for ; Tue, 11 Aug 2009 07:58:36 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=hlIU1J3LQChSjWV/CGRL5g==:17 a=6I5d2MoRAAAA:8 a=tuOmyfi0SiQLfp7mNtIA:9 a=gNV9LsW15rBxnngIxHoA:7 a=U4xBdnc4W93rB-pnAuyZxJ6JOTMA:4 Received: from [193.217.167.6] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 551756136; Tue, 11 Aug 2009 08:58:34 +0200 From: Hans Petter Selasky To: Krassimir Slavchev Date: Tue, 11 Aug 2009 08:58:41 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <4A8006F3.5020800@bulinfo.net> <200908101527.32952.hselasky@c2i.net> <4A810A62.1070408@bulinfo.net> In-Reply-To: <4A810A62.1070408@bulinfo.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908110858.41835.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Help with device drivers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2009 07:58:37 -0000 On Tuesday 11 August 2009 08:06:26 Krassimir Slavchev wrote: > Hans Petter Selasky wrote: > > On Monday 10 August 2009 13:39:31 Krassimir Slavchev wrote: > >> If I try to open the device from userland with: > >> fd = open("/dev/xxx0", O_RDWR) it fails because open() tries to open the > >> device for reading first and then for writing. > > > > There is a bug in the code. If you open using read+write flags, then the > > FIFO open routine is called two times. The RD+WR check should be moved to > > the ioctl routine. > > > > http://perforce.freebsd.org/chv.cgi?CH=167171 > > Thanks! > > It seems that sys/dev/usb/storage/urio.c should be fixed too? > > Best Regards > > > --HPS You are right! http://perforce.freebsd.org/chv.cgi?CH=167199 --HPS