From owner-freebsd-usb@FreeBSD.ORG Wed Feb 10 09:35:34 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B091F1065670 for ; Wed, 10 Feb 2010 09:35:34 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 414B18FC0C for ; Wed, 10 Feb 2010 09:35:33 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=DgVIUaT0IhsA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=oW3G-zxDXa5-wjd4qEMA:9 a=y4EraxICI-h1BOt_mS7iovZjqSUA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 1339851477; Wed, 10 Feb 2010 10:35:29 +0100 From: Hans Petter Selasky To: "Daniel O'Connor" Date: Wed, 10 Feb 2010 10:33:57 +0100 User-Agent: KMail/1.12.4 (FreeBSD/8.0-STABLE; KDE/4.3.4; amd64; ; ) References: <201002101738.30753.doconnor@gsoft.com.au> <201002100923.20377.hselasky@c2i.net> <201002102001.37306.doconnor@gsoft.com.au> In-Reply-To: <201002102001.37306.doconnor@gsoft.com.au> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201002101033.57575.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: usb_interrupt_read blocks "forever" sometimes X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 09:35:34 -0000 On Wednesday 10 February 2010 10:31:28 Daniel O'Connor wrote: > On Wed, 10 Feb 2010, Hans Petter Selasky wrote: > > I would not recommend using signals with libusb. It is not portable. > > Currently signals are ignored. What you would have to do, is to use > > OK. > > > the timeout argument which you are doing, and have a timekeeper > > variable somewhere, or create another thread. Still, when using the > > timeout there is a chance you can loose data. > > The problem is that the timeout seems to be ignored sometimes - that is > the only reason I was playing with alarm() at all. > > I have the timeout set to 100 (milliseconds?) yet I find if I restart > the program every now and then it will get stuck on the first read. > Could you enable debugging for the Host Controller responsible for your device: sysctl hw.ehci.debug=15 sysctl hw.ohci.debug=15 sysctl hw.uhci.debug=15 --HPS