From owner-freebsd-usb@FreeBSD.ORG Sat Mar 26 23:18:55 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A72D116A4CE for ; Sat, 26 Mar 2005 23:18:55 +0000 (GMT) Received: from md1.swissinfo.org (md1.swissinfo.org [146.159.4.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id E565643D39 for ; Sat, 26 Mar 2005 23:18:54 +0000 (GMT) (envelope-from sebastien.b@swissinfo.org) Received: from mail.swissinfo.org ([194.6.181.33]) by md1.swissinfo.org (phad1.swissinfo.org [146.159.6.9]) (MDaemon.PRO.v7.2.1.R) with ESMTP id 29-md50000370154.msg for ; Sun, 27 Mar 2005 00:22:14 +0100 Received: from AAmiens-152-1-36-150.w83-198.abo.wanadoo.fr (83.198.35.150) by mail.swissinfo.org (7.0.020) (authenticated as sebastien.b) id 4153942002C892B9; Sat, 26 Mar 2005 21:58:27 +0100 From: Sebastien B To: ticso@cicely.de Date: Sat, 26 Mar 2005 21:58:31 +0000 User-Agent: KMail/1.8 References: <200503261558.21943.sebastien.b@swissinfo.org> <20050326181317.GE14532@cicely12.cicely.de> In-Reply-To: <20050326181317.GE14532@cicely12.cicely.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503262158.32320.sebastien.b@swissinfo.org> X-Spam-Processed: phad1.swissinfo.org, Sun, 27 Mar 2005 00:22:14 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 194.6.181.33 X-Return-Path: sebastien.b@swissinfo.org X-MDaemon-Deliver-To: freebsd-usb@freebsd.org X-MDAV-Processed: phad1.swissinfo.org, Sun, 27 Mar 2005 00:22:17 +0100 cc: freebsd-usb@freebsd.org Subject: Re: What's the right way to wait for an USB transfer to complete ? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2005 23:18:55 -0000 Hello, > > Locking the mutex in the software interrupt handler causes a kernel panic > > in propagate_priority (it seems to occur only when the mutex is already > > held by another thread, therefore mtx_lock() blocks) : > > > > Fatal trap 12: page fault while in kernel mode > > fault virtual address = 0x24 > > Likely you are using a NULL pointer as mutex. No, it is not NULL, the instruction I believe to have caused the fault is "mtx_lock(&sc->brg_rx.comp_mp)". "&sc->brg_rx.comp_mp" can't be NULL, AFAIK. You can have a look at my code, it's at http://yoshiyo.ath.cx/seb/download/prism54u-bsd-20050326.tar.bz2 See the "bottom halves" section of usb_transport.c > If you want your driver GIANT free that's fine, but don't forget > that calling USB layer requires you to acquire GIANT first. You mean I must hold Giant every time I call any USB function ? I've never seen any driver doing this... Regards, Sebastien From owner-freebsd-usb@FreeBSD.ORG Sat Mar 26 23:33:24 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5519416A4CE for ; Sat, 26 Mar 2005 23:33:24 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7290243D46 for ; Sat, 26 Mar 2005 23:33:23 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2QNXIsf034360 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Sun, 27 Mar 2005 00:33:21 +0100 (CET) (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.10/8.12.10) with ESMTP id j2QNWGVK075776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 27 Mar 2005 00:32:16 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2QNWFF2017833; Sun, 27 Mar 2005 00:32:15 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2QNWFrM017832; Sun, 27 Mar 2005 00:32:15 +0100 (CET) (envelope-from ticso) Date: Sun, 27 Mar 2005 00:32:15 +0100 From: Bernd Walter To: Sebastien B Message-ID: <20050326233214.GM14532@cicely12.cicely.de> References: <200503261558.21943.sebastien.b@swissinfo.org> <20050326181317.GE14532@cicely12.cicely.de> <200503262158.32320.sebastien.b@swissinfo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200503262158.32320.sebastien.b@swissinfo.org> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0091] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: What's the right way to wait for an USB transfer to complete ? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2005 23:33:24 -0000 On Sat, Mar 26, 2005 at 09:58:31PM +0000, Sebastien B wrote: > Hello, > > > > Locking the mutex in the software interrupt handler causes a kernel panic > > > in propagate_priority (it seems to occur only when the mutex is already > > > held by another thread, therefore mtx_lock() blocks) : > > > > > > Fatal trap 12: page fault while in kernel mode > > > fault virtual address = 0x24 > > > > Likely you are using a NULL pointer as mutex. > > No, it is not NULL, the instruction I believe to have caused the fault is > "mtx_lock(&sc->brg_rx.comp_mp)". > "&sc->brg_rx.comp_mp" can't be NULL, AFAIK. > You can have a look at my code, it's at > http://yoshiyo.ath.cx/seb/download/prism54u-bsd-20050326.tar.bz2 > See the "bottom halves" section of usb_transport.c Havn't looked at your code yet, but the panic is by accessing a memory location near address 0, so it's very likely that you are accesing a structure member from a NULL pointer. A stack trace from kernel debugger should easily tell you which function made the access - with the instruction offset inside the function you can also find out the excat instruction causing this. Or you could trigger a crash dump and analyse it. > > If you want your driver GIANT free that's fine, but don't forget > > that calling USB layer requires you to acquire GIANT first. > > You mean I must hold Giant every time I call any USB function ? I've never > seen any driver doing this... Yes - holding GIANT ist required. You don't see this because currently all USB drivers are already entered with GIANT held. .d_flags conating D_NEEDGIANT will enable this for access from userland via devnodes. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Sun Mar 27 14:13:22 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48C9316A4CE for ; Sun, 27 Mar 2005 14:13:22 +0000 (GMT) Received: from md1.swissinfo.org (md1.swissinfo.org [146.159.4.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FDC943D39 for ; Sun, 27 Mar 2005 14:13:21 +0000 (GMT) (envelope-from sebastien.b@swissinfo.org) Received: from mail.swissinfo.org ([194.6.181.33]) by md1.swissinfo.org (phad1.swissinfo.org [146.159.6.9]) (MDaemon.PRO.v7.2.1.R) with ESMTP id 35-md50000370717.msg for ; Sun, 27 Mar 2005 16:16:39 +0200 Received: from AAmiens-152-1-30-30.w83-192.abo.wanadoo.fr (83.192.205.30) by mail.swissinfo.org (7.0.020) (authenticated as sebastien.b) id 4153942002C9FB81; Sun, 27 Mar 2005 16:13:13 +0200 From: Sebastien B To: ticso@cicely.de Date: Sun, 27 Mar 2005 15:13:18 +0000 User-Agent: KMail/1.8 References: <200503261558.21943.sebastien.b@swissinfo.org> <200503262158.32320.sebastien.b@swissinfo.org> <20050326233214.GM14532@cicely12.cicely.de> In-Reply-To: <20050326233214.GM14532@cicely12.cicely.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503271513.18915.sebastien.b@swissinfo.org> X-Spam-Processed: phad1.swissinfo.org, Sun, 27 Mar 2005 16:16:39 +0200 (not processed: message from valid local sender) X-MDRemoteIP: 194.6.181.33 X-Return-Path: sebastien.b@swissinfo.org X-MDaemon-Deliver-To: freebsd-usb@freebsd.org X-MDAV-Processed: phad1.swissinfo.org, Sun, 27 Mar 2005 16:16:45 +0200 cc: freebsd-usb@freebsd.org Subject: Re: What's the right way to wait for an USB transfer to complete ? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2005 14:13:22 -0000 > Havn't looked at your code yet, but the panic is by accessing a > memory location near address 0, so it's very likely that you are > accesing a structure member from a NULL pointer. I've just fixed it. It was not that simple, there was in fact a problem with a recursed mutex used with cv_wait(). Regards, Sebastien From owner-freebsd-usb@FreeBSD.ORG Sun Mar 27 18:41:35 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 559E716A4CE for ; Sun, 27 Mar 2005 18:41:35 +0000 (GMT) Received: from excite.com (nn8.excitenetwork.com [207.159.120.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BD4143D54 for ; Sun, 27 Mar 2005 18:41:35 +0000 (GMT) (envelope-from ddlawrence@excite.com) Received: by xprdmailfe19.nwk.excite.com (Postfix, from userid 110) id 12C56B6E4; Sun, 27 Mar 2005 13:41:30 -0500 (EST) To: freebsd-usb@freebsd.org Received: from [69.156.94.206] by xprdmailfe19.nwk.excite.com via HTTP; Sun, 27 Mar 2005 13:41:30 EST X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: ID = 9a2da4d2845ac560b807482d36426580 From: "Don Lawrence" MIME-Version: 1.0 X-Sender: ddlawrence@excite.com X-Mailer: PHP Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <20050327184130.12C56B6E4@xprdmailfe19.nwk.excite.com> Date: Sun, 27 Mar 2005 13:41:30 -0500 (EST) Subject: compiling usbd X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ddlawrence@excite.com List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2005 18:41:35 -0000 Hi. I have to recompile my usb daemon cuz of a STALLED problem. The C code fix compiled OK I believe, but the executable did not get updated. Anyone have a procedure to recompile & reinstall usbd? thanks......don .. _______________________________________________ Join Excite! - http://www.excite.com The most personalized portal on the Web! From owner-freebsd-usb@FreeBSD.ORG Sun Mar 27 19:29:04 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02F0916A4CE; Sun, 27 Mar 2005 19:29:04 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C73843D31; Sun, 27 Mar 2005 19:29:03 +0000 (GMT) (envelope-from iedowse@FreeBSD.org) Received: from freefall.freebsd.org (iedowse@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2RJT3OE044193; Sun, 27 Mar 2005 19:29:03 GMT (envelope-from iedowse@freefall.freebsd.org) Received: (from iedowse@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2RJT3Sf044189; Sun, 27 Mar 2005 19:29:03 GMT (envelope-from iedowse) Date: Sun, 27 Mar 2005 19:29:03 GMT From: Ian Dowse Message-Id: <200503271929.j2RJT3Sf044189@freefall.freebsd.org> To: toni@soth.at, iedowse@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: kern/63375: [patch] panic: unplugging USB devices panics RELENG_5_2 via devfs vnops X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2005 19:29:04 -0000 Synopsis: [patch] panic: unplugging USB devices panics RELENG_5_2 via devfs vnops State-Changed-From-To: feedback->closed State-Changed-By: iedowse State-Changed-When: Sun Mar 27 19:28:32 GMT 2005 State-Changed-Why: Submitter says that this appears to be fixed. http://www.freebsd.org/cgi/query-pr.cgi?pr=63375 From owner-freebsd-usb@FreeBSD.ORG Sun Mar 27 19:35:38 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF10016A4CE; Sun, 27 Mar 2005 19:35:38 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9126643D39; Sun, 27 Mar 2005 19:35:38 +0000 (GMT) (envelope-from iedowse@FreeBSD.org) Received: from freefall.freebsd.org (iedowse@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2RJZcch046331; Sun, 27 Mar 2005 19:35:38 GMT (envelope-from iedowse@freefall.freebsd.org) Received: (from iedowse@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2RJZcCN046327; Sun, 27 Mar 2005 19:35:38 GMT (envelope-from iedowse) Date: Sun, 27 Mar 2005 19:35:38 GMT From: Ian Dowse Message-Id: <200503271935.j2RJZcCN046327@freefall.freebsd.org> To: x+freebsd-gnats@surf.net, iedowse@FreeBSD.org, ticso@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: kern/59803: [usb] Wrong detection of/panic with Edimax USB 2.0 Cardbus host controller X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2005 19:35:38 -0000 Synopsis: [usb] Wrong detection of/panic with Edimax USB 2.0 Cardbus host controller State-Changed-From-To: open->feedback State-Changed-By: iedowse State-Changed-When: Sun Mar 27 19:32:17 GMT 2005 State-Changed-Why: Does this problem still occur in a more recent -STABLE? Responsible-Changed-From-To: ticso->freebsd-usb Responsible-Changed-By: iedowse Responsible-Changed-When: Sun Mar 27 19:32:17 GMT 2005 Responsible-Changed-Why: Reassign as suggested by ticso@ http://www.freebsd.org/cgi/query-pr.cgi?pr=59803 From owner-freebsd-usb@FreeBSD.ORG Sun Mar 27 19:36:53 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EDC616A4CF; Sun, 27 Mar 2005 19:36:53 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14FF543D1D; Sun, 27 Mar 2005 19:36:53 +0000 (GMT) (envelope-from iedowse@FreeBSD.org) Received: from freefall.freebsd.org (iedowse@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2RJaqdT046394; Sun, 27 Mar 2005 19:36:52 GMT (envelope-from iedowse@freefall.freebsd.org) Received: (from iedowse@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2RJaq1s046390; Sun, 27 Mar 2005 19:36:52 GMT (envelope-from iedowse) Date: Sun, 27 Mar 2005 19:36:52 GMT From: Ian Dowse Message-Id: <200503271936.j2RJaq1s046390@freefall.freebsd.org> To: b.j.casavant@ieee.org, iedowse@FreeBSD.org, ticso@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: kern/55094: [partial patch] Intel USB 2.0 unrecognized X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2005 19:36:53 -0000 Synopsis: [partial patch] Intel USB 2.0 unrecognized State-Changed-From-To: feedback->closed State-Changed-By: iedowse State-Changed-When: Sun Mar 27 19:35:55 GMT 2005 State-Changed-Why: Feedback timed out Responsible-Changed-From-To: ticso->freebsd-usb Responsible-Changed-By: iedowse Responsible-Changed-When: Sun Mar 27 19:35:55 GMT 2005 Responsible-Changed-Why: Reassign http://www.freebsd.org/cgi/query-pr.cgi?pr=55094 From owner-freebsd-usb@FreeBSD.ORG Sun Mar 27 21:01:15 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A81F16A4CE; Sun, 27 Mar 2005 21:01:15 +0000 (GMT) Received: from buitenpost.surfnet.nl (buitenpost.surfnet.nl [192.87.108.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5F4943D1D; Sun, 27 Mar 2005 21:01:14 +0000 (GMT) (envelope-from x+freebsd-gnats@surf.net) Received: from incoming-s.surfnet.nl ([192.87.108.21] helo=localhost) by buitenpost.surfnet.nl with esmtp (Exim 4.50 (FreeBSD)) id 1DFesZ-0001Nk-9Z; Sun, 27 Mar 2005 23:01:03 +0200 Date: Sun, 27 Mar 2005 23:01:10 +0200 (Romance Daylight Time) From: Xander Jansen To: Ian Dowse In-Reply-To: <200503271935.j2RJZcCN046327@freefall.freebsd.org> Message-ID: References: <200503271935.j2RJZcCN046327@freefall.freebsd.org> Organisation: SURFnet bv Address: "Radboudburcht, P.O. Box 19035, 3501 DA Utrecht, NL" Phone: +31 302 305 305 Telefax: +31 302 305 329 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: ticso@FreeBSD.org cc: freebsd-usb@FreeBSD.org Subject: Re: kern/59803: [usb] Wrong detection of/panic with Edimax USB 2.0 Cardbus host controller X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2005 21:01:15 -0000 On Sun, 27 Mar 2005, Ian Dowse wrote: + Synopsis: [usb] Wrong detection of/panic with Edimax USB 2.0 Cardbus host controller + + Does this problem still occur in a more recent -STABLE? It disappeared somewhere between 5.2.1 and 5.3 (see the Sat, 11 Dec 2004 entry in the PR). Should I try a recent -STABLE to see if it re-appeared? Cheers, Xander + http://www.freebsd.org/cgi/query-pr.cgi?pr=59803 From owner-freebsd-usb@FreeBSD.ORG Sun Mar 27 22:30:03 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B63716A4CF for ; Sun, 27 Mar 2005 22:30:03 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 616C743D39 for ; Sun, 27 Mar 2005 22:30:03 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2RMU38G067135 for ; Sun, 27 Mar 2005 22:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2RMU3hM067131; Sun, 27 Mar 2005 22:30:03 GMT (envelope-from gnats) Resent-Date: Sun, 27 Mar 2005 22:30:03 GMT Resent-Message-Id: <200503272230.j2RMU3hM067131@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Adam Kropelin Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 452B216A4CE for ; Sun, 27 Mar 2005 22:24:59 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04F2E43D31 for ; Sun, 27 Mar 2005 22:24:59 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j2RMOwqC038746 for ; Sun, 27 Mar 2005 22:24:58 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j2RMOw6U038745; Sun, 27 Mar 2005 22:24:58 GMT (envelope-from nobody) Message-Id: <200503272224.j2RMOw6U038745@www.freebsd.org> Date: Sun, 27 Mar 2005 22:24:58 GMT From: Adam Kropelin To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: usb/79287: UHCI hang after interrupt transfer X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2005 22:30:03 -0000 >Number: 79287 >Category: usb >Synopsis: UHCI hang after interrupt transfer >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 27 22:30:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Adam Kropelin >Release: 6.0-CURRENT >Organization: >Environment: FreeBSD p3.kroptech.com 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Tue Mar 22 23:25:44 EST 2005 adk0212@p3.kroptech.com:/usr/src/sys/i386/compile/GENERIC.adk i386 >Description: My userspace HID driver (apcupsd) makes extensive use of ugen and the USB_DO_REQUEST ioctl. Some users are experiencing a hang where the driver process becomes unkillable and I've traced the problem to a USB_DO_REQUEST ioctl that never returns. The hang is very intermittent (it can happen after anywhere from tens to thousands of USB transfers) and seems to be timing dependent (enabling USB_DEBUG makes the condition much harder to trigger). I've managed to capture a USB_DEBUG trace that shows the failure condition. After thousands of proper transfers, I see this... kernel: usbd_start_next: pipe=0xc1a83c00, xfer=0 kernel: usb_transfer_complete: pipe=0xc1f6cb80 xfer=0xc1a9d400 status=0 actlen=5 kernel: usb_transfer_complete: repeat=1 new head=0xc1a9d400 kernel: usb0: host controller process error kernel: usb0: host controller halted kernel: usb0 regs: cmd=0080, sts=0031, intr=000f, frnum=0528, flbase=1f2c9000, sof=0040, portsc1=05a5, portsc2=0580 kernel: intrs=43840 kernel: QH(0xc1a93f80) at 1f167f80: hlink=1f167fa2 elink=00000001 kernel: usbd_free_xfer: 0xc1f1c800 kernel: usbd_alloc_xfer() = 0xc1f1c800 kernel: usbd_transfer: xfer=0xc1f1c800, flags=6, pipe=0xc1a83c00, running=0 kernel: usbd_dump_queue: pipe=0xc1a83c00 kernel: usb_allocmem: large alloc 100 kernel: usb_block_allocmem: size=4096 align=1 kernel: usb_block_allocmem: free list size=4096 kernel: usb_insert_transfer: pipe=0xc1a83c00 running=0 timeout=0 kernel: usb_freemem: large free kernel: usb_block_freemem: size=4096 kernel: usbd_free_xfer: 0xc1f1c800 kernel: usbd_alloc_xfer() = 0xc1f1c800 kernel: usbd_transfer: xfer=0xc1f1c800, flags=6, pipe=0xc1a83c00, running=1 kernel: usbd_dump_queue: pipe=0xc1a83c00 kernel: xfer=0xc1f1c800 kernel: usb_allocmem: large alloc 100 kernel: usb_block_allocmem: size=4096 align=1 kernel: usb_block_allocmem: free list size=4096 kernel: usb_insert_transfer: pipe=0xc1a83c00 running=1 timeout=0 kernel: usb_event_thread: woke up kernel: usb_discover ..after which only the usb_event_thread and usb_discover messages continue. I've tested 5.3-RELEASE as well as 6.0-CURRENT. FWIW, OpenBSD and NetBSD exhibit the same hang. Also FWIW, The USB rewrite from Hans Petter Selasky does NOT exhibit the hang. I'm willing to test patches or do whatever level of debugging is required. A lot of users are hitting this hang and I'd like to get them up and running again with something less invasive than a complete subsystem rewrite. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Mon Mar 28 04:39:21 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8099D16A4CE; Mon, 28 Mar 2005 04:39:21 +0000 (GMT) Received: from md1.swissinfo.org (md1.swissinfo.org [146.159.4.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F50543D39; Mon, 28 Mar 2005 04:39:20 +0000 (GMT) (envelope-from sebastien.b@swissinfo.org) Received: from mail.swissinfo.org ([194.6.181.33]) by md1.swissinfo.org (phad1.swissinfo.org [146.159.6.9]) (MDaemon.PRO.v7.2.1.R) with ESMTP id 04-md50000371351.msg; Mon, 28 Mar 2005 06:42:40 +0200 Received: from AAmiens-152-1-46-18.w83-198.abo.wanadoo.fr (83.198.165.18) by mail.swissinfo.org (7.0.020) (authenticated as sebastien.b) id 4153942002CA999C; Sun, 27 Mar 2005 22:18:44 +0200 From: Sebastien B To: Ian Dowse Date: Sun, 27 Mar 2005 22:17:04 +0200 User-Agent: KMail/1.8 References: <200503230251.j2N2pIGL038209@freefall.freebsd.org> In-Reply-To: <200503230251.j2N2pIGL038209@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503272217.04731.sebastien.b@swissinfo.org> X-Spam-Processed: phad1.swissinfo.org, Mon, 28 Mar 2005 06:42:40 +0200 (not processed: message from valid local sender) X-MDRemoteIP: 194.6.181.33 X-Return-Path: sebastien.b@swissinfo.org X-MDAV-Processed: phad1.swissinfo.org, Mon, 28 Mar 2005 06:42:42 +0200 cc: freebsd-usb@FreeBSD.org Subject: Re: usb/78426: Interrupts never come on EHCI pipes X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2005 04:39:21 -0000 > EHCI interrupt pipes were broken and have been fixed now in > 5.x-stable by revision 1.14.2.7 of ehci.c. Ok, I've upgraded my kernel and it works now :) Thanks. From owner-freebsd-usb@FreeBSD.ORG Mon Mar 28 04:57:10 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F243216A4CE for ; Mon, 28 Mar 2005 04:57:10 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1460B43D1F for ; Mon, 28 Mar 2005 04:57:10 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j2S4pmHW072850; Sun, 27 Mar 2005 21:54:22 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 27 Mar 2005 21:52:20 -0700 (MST) Message-Id: <20050327.215220.39144807.imp@bsdimp.com> To: ddlawrence@excite.com From: "M. Warner Losh" In-Reply-To: <20050327184130.12C56B6E4@xprdmailfe19.nwk.excite.com> References: <20050327184130.12C56B6E4@xprdmailfe19.nwk.excite.com> X-Mailer: Mew version 3.3 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-usb@freebsd.org Subject: Re: compiling usbd X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2005 04:57:11 -0000 In message: <20050327184130.12C56B6E4@xprdmailfe19.nwk.excite.com> "Don Lawrence" writes: : Hi. I have to recompile my usb daemon cuz of a STALLED : problem. The C code fix compiled OK I believe, but the : executable did not get updated. : : Anyone have a procedure to recompile & reinstall usbd? usbd doesn't do anything interesting except run unix commands on certain events. I think you are barking up the wrong tree. Warner From owner-freebsd-usb@FreeBSD.ORG Mon Mar 28 11:01:49 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2647A16A4CF for ; Mon, 28 Mar 2005 11:01:49 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFCAF43D4C for ; Mon, 28 Mar 2005 11:01:48 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2SB1meU035579 for ; Mon, 28 Mar 2005 11:01:48 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2SB1mQh035573 for freebsd-usb@freebsd.org; Mon, 28 Mar 2005 11:01:48 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 28 Mar 2005 11:01:48 GMT Message-Id: <200503281101.j2SB1mQh035573@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-usb@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2005 11:01:49 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2002/07/19] kern/40792 usb signals lead to data loss on device ugen o [2002/12/10] kern/46176 usb umass causes kernel panic if device remov o [2002/12/19] i386/46371 usb USB controller cannot be initialized on I f [2003/02/17] kern/48359 usb SiS 5597/8 USB + uscanner breakage f [2003/03/05] kern/48952 usb uscanner0 hangs o [2003/09/26] bin/57255 usb usbd and multi-function devices f [2003/11/29] kern/59803 usb [usb] Wrong detection of/panic with Edima f [2003/12/11] kern/60131 usb [usb] Page fault on disconnect of USB dev s [2003/12/15] kern/60276 usb [usb] Kernel panic when plugging in USB ( f [2004/01/11] kern/61191 usb [usb] panic: USB vs. Serial problems o [2004/01/20] kern/61627 usb [usb] [patch] New USB printer not support o [2004/01/24] kern/61841 usb [boot] 5.2 Boot freeze if memorybird (USB f [2004/01/30] kern/62088 usb [usb] Logitech Cordless/Optical Mouse not f [2004/01/30] kern/62123 usb [usb] LaCie 160GB USB drive umass: BBB re f [2004/02/23] i386/63251 usb [usb] USB stops working after 2nd APM sus f [2004/03/01] kern/63621 usb [usb] USB MemoryStick Reader stalls/crash f [2004/04/07] kern/65292 usb [panic] random page faults (usb-related?) o [2004/04/19] i386/65783 usb [panic] Panic when attaching card reader o [2004/07/13] kern/69006 usb [patch] Apple Cinema Display hangs USB po o [2004/08/30] kern/71155 usb [usb] misbehaving usb-printer hangs proce f [2004/10/11] i386/72497 usb WD USB Disk Panics -stable and 5.2.1 o [2004/10/30] kern/73307 usb Kernel panics on USB disconnect f [2004/11/18] kern/74088 usb ohci ehci uhub: port disabled on connecti f [2005/01/08] usb/75941 usb system halted during booting due to ehci o [2005/01/13] usb/76204 usb panic while using usb attached modem o [2005/01/18] usb/76395 usb USB printer does not work, usbdevs says " o [2005/01/21] usb/76554 usb Panram "yoyo" USB MP3 player causes panic o [2005/01/21] usb/76555 usb PNY USB DISK 2.0 USB thumbdrive causes wo f [2005/01/25] usb/76684 usb Toshiba PDR-M4 camera connected via USB h f [2005/01/26] usb/76727 usb usb printing locks machine f [2005/01/30] usb/76847 usb ukbd panics on boot o [2005/02/06] usb/77184 usb kernel panic on USB device disconnect o [2005/02/09] usb/77294 usb ucom + ulpcom panic o [2005/02/16] usb/77604 usb Sluggish Logitch LX700 USB Mouse o [2005/03/18] usb/78989 usb please add USB keyboard support to instal o [2005/03/22] usb/79140 usb WD Firewire/USB Combo hangs under load on o [2005/03/27] usb/79287 usb UHCI hang after interrupt transfer 37 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/09/30] conf/30929 usb [patch] use usbd to initialize USB ADSL m o [2001/12/09] kern/32652 usb [patch] A new ioctl to uscanner s [2001/12/09] ports/32653 usb Added patches to improve USB scanner supp f [2002/07/24] kern/40948 usb [usb] USB HP CDW8200 does not work o [2002/08/07] kern/41415 usb [usb] [patch] Some USB scanners cannot ta f [2003/02/06] kern/48014 usb [usb] moused fails to correctly identify o [2003/02/16] bin/48342 usb [PATCH] usbd dynamic device list. f [2003/03/19] kern/50110 usb [usb] Astra 2100U scanner being detected o [2003/05/08] kern/51958 usb [usb] [patch] update for urio driver o [2003/05/10] kern/52026 usb [usb] feature request: umass driver suppo f [2003/05/19] bin/52432 usb [sysinstall] drivers.flp won't load with o [2003/06/08] kern/53025 usb [PATCH] ugen does not allow O_NONBLOCK fo f [2003/09/19] kern/56999 usb FreeCom USB CD/RW problem on FreeBSD 5.1 f [2003/11/10] i386/59147 usb [usb] USB active extension cable not reco o [2003/11/11] kern/59169 usb [patch] ulpt is missing read operation o [2003/12/15] kern/60248 usb [patch] Problem with USB printer HP Laser o [2004/01/12] bin/61234 usb [usb] [patch] usbhidaction doesn't suppor f [2004/02/13] kern/62788 usb need quirks for Super Talent Flash USB 2. f [2004/03/04] kern/63779 usb [usb] USB-mass storage (USB to IDE Conver o [2004/03/06] kern/63837 usb [patch] USB: hid_is_collection() only loo o [2004/04/11] kern/65436 usb QUIRK: [patch] to add support for PNY Att o [2004/04/19] kern/65769 usb [usb] Call to tcflush(x, TCIFLUSH) stops f [2004/05/11] kern/66547 usb [usb] Palm Tungsten T USB does not initia o [2004/06/27] kern/68412 usb [usb] [patch] QUIRK: Philips KEY013 USB M o [2004/07/06] i386/68719 usb [usb] USB 2.0 mobil rack+ fat32 performan o [2004/08/16] kern/70523 usb [usb] [patch] umct sending/receiving wron o [2004/08/25] kern/70942 usb [usb] Genius Wireless USB mouse: moused d o [2004/09/06] kern/71416 usb [usb] Cryptoflex e-gate USB token (ugen0) o [2004/09/06] kern/71417 usb [usb] Cryptoflex e-gate USB token (ugen0) o [2004/09/07] kern/71455 usb [usb] Slow USB umass performance of 5.3 o [2004/09/11] kern/71605 usb [usb] [patch] umass doesn't recognize mul o [2004/10/05] kern/72344 usb [usb] [patch] QUIRK: Dane-Elec zMate 512 f [2004/10/06] i386/72380 usb [usb] USB does not work [dual Celeron Abi o [2004/10/23] i386/73056 usb [usb] Sun Microsystems Type 6 USB mouse n f [2004/11/02] i386/73421 usb [usb] USB not recgnized/working on Toshib o [2005/01/07] usb/75928 usb Cytronix SmartMedia card (SMC) reader has o [2005/01/19] usb/76461 usb disklabel of umass(4)-CAM(4)-da(4) not us o [2005/01/27] usb/76732 usb Mouse problems with USB KVM Switch o [2005/02/24] usb/78028 usb The system must tell users information of f [2005/03/03] usb/78371 usb Philips Wearable Audio Player (128) fails o [2005/03/18] usb/78984 usb Creative MUVO umass failure o [2005/03/25] usb/79230 usb Add support for Sitecom USB to serial cab 42 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Mar 28 14:57:20 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F7F816A4CE; Mon, 28 Mar 2005 14:57:20 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0390443D55; Mon, 28 Mar 2005 14:57:20 +0000 (GMT) (envelope-from iedowse@FreeBSD.org) Received: from freefall.freebsd.org (iedowse@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2SEvJWt091375; Mon, 28 Mar 2005 14:57:19 GMT (envelope-from iedowse@freefall.freebsd.org) Received: (from iedowse@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2SEvJZt091371; Mon, 28 Mar 2005 14:57:19 GMT (envelope-from iedowse) Date: Mon, 28 Mar 2005 14:57:19 GMT From: Ian Dowse Message-Id: <200503281457.j2SEvJZt091371@freefall.freebsd.org> To: adwiles@bolton-le-sands.com, iedowse@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: kern/48014: [usb] moused fails to correctly identify usb mouse X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2005 14:57:20 -0000 Synopsis: [usb] moused fails to correctly identify usb mouse State-Changed-From-To: feedback->closed State-Changed-By: iedowse State-Changed-When: Mon Mar 28 14:56:53 GMT 2005 State-Changed-Why: Mail to submitter bounces. http://www.freebsd.org/cgi/query-pr.cgi?pr=48014 From owner-freebsd-usb@FreeBSD.ORG Mon Mar 28 17:51:03 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68F7A16A4CE for ; Mon, 28 Mar 2005 17:51:03 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB9CE43D41 for ; Mon, 28 Mar 2005 17:51:02 +0000 (GMT) (envelope-from mala@hinterbergen.de) Received: from [212.227.126.207] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1DFyOE-0001VR-00 for freebsd-usb@freebsd.org; Mon, 28 Mar 2005 19:51:02 +0200 Received: from [217.230.5.163] (helo=router.hinter.bergen) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1DFyOD-00064j-00 for freebsd-usb@freebsd.org; Mon, 28 Mar 2005 19:51:02 +0200 Received: from ws02.hinter.bergen (ws02.hinter.bergen [192.168.42.12]) by router.hinter.bergen (Postfix) with ESMTP id 5D8C61CF966 for ; Mon, 28 Mar 2005 17:31:32 +0000 (UTC) Received: from ws02.hinter.bergen ([127.0.0.1]) by ws02.hinter.bergen with esmtp (Exim 3.35 #1 (Debian)) id 1DFyMf-0008ED-00 for ; Mon, 28 Mar 2005 17:49:25 +0000 Message-ID: <424843A5.1060602@ws02.hinter.bergen> Date: Mon, 28 Mar 2005 17:49:25 +0000 From: Manuel Tobias Schiller User-Agent: Mozilla Thunderbird 1.0 (X11/20050124) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-usb@freebsd.org X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:2556f92019e74251702a17d2f7e6a8ec Subject: USB printing problem: /dev/ulpt0: device busy X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2005 17:51:03 -0000 Hello everybody, Eugene Rogoza has alerted me to this issue. I can reproduce the behaviour he is talking about on my virtual FreeBSD 5.3 system running under Linux as host OS. Any attempt to access the device file (both /dev/ulpt0 and /dev/unlpt0) fail with the message "Device busy". The FreeBSD kernel does recognize the printer when attached to the USB port, and it correctly associates the ulpt driver with it. This behaviour is quite obviously not due to faulty hardware emulation in the virtual machine as Mr. Rogoza has also experienced it. I'd really like to help to make my driver for Minolta PagePro 1[23][05]0W printers work under FreeBSD, too - even when the printer is connected to a USB port. Any help, hint or idea as to what might cause this behaviour would be greatly appreciated. Manuel Schiller Tue, Mar 1 2005, Eugene Rogoza wrote: > Hello everybody, > > I'm experiencing certain problems with USB printing. I have a Minolta > PagePro 1300W printer connected to USB port. FreeBSD 5.3 recognizes > the printer just fine and creates /dev/ulpt0 and /dev/unlpt0 device > nodes. > > But the simple test like > > echo "test" > /dev/ulpt0 (or /dev/unlpt0) fails with the message >"/dev/ulpt0: device busy". And, respectively, if simple tests fail, > then the complicated printing via ghostscript -> filter -> driver also > doesn't work. > > I suppose some program uses the device already, but I don't know what > it can be - I'm not running lpd (device is busy either with lpd > running or not). > > There isn't really much regarding this problem on the net. Usually > people have their USB printers working. > > Any suggestions are appreciated. > >Eugene Rogoza > From owner-freebsd-usb@FreeBSD.ORG Tue Mar 29 09:21:39 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5D6B16A4CE for ; Tue, 29 Mar 2005 09:21:39 +0000 (GMT) Received: from md2.swissinfo.org (md2.swissinfo.org [146.159.4.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA81743D2F for ; Tue, 29 Mar 2005 09:21:38 +0000 (GMT) (envelope-from sebastien.b@swissinfo.org) Received: from mail.swissinfo.org ([194.6.181.33]) by md2.swissinfo.org (phad2.swissinfo.org [146.159.6.10]) (MDaemon.PRO.v7.2.1.R) with ESMTP id 26-md50000318695.msg for ; Tue, 29 Mar 2005 11:13:05 +0200 Received: from AAmiens-152-1-30-22.w83-192.abo.wanadoo.fr (83.192.205.22) by mail.swissinfo.org (7.0.020) (authenticated as sebastien.b) id 4153942002C9B7B3; Sun, 27 Mar 2005 12:46:58 +0200 From: Sebastien B To: ticso@cicely.de Date: Sun, 27 Mar 2005 11:47:02 +0000 User-Agent: KMail/1.8 References: <200503261558.21943.sebastien.b@swissinfo.org> <200503262158.32320.sebastien.b@swissinfo.org> <20050326233214.GM14532@cicely12.cicely.de> In-Reply-To: <20050326233214.GM14532@cicely12.cicely.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503271147.03573.sebastien.b@swissinfo.org> X-Spam-Processed: phad2.swissinfo.org, Tue, 29 Mar 2005 11:13:05 +0200 (not processed: spam filter disabled) X-MDRemoteIP: 194.6.181.33 X-Return-Path: sebastien.b@swissinfo.org X-MDaemon-Deliver-To: freebsd-usb@freebsd.org X-MDAV-Processed: phad2.swissinfo.org, Tue, 29 Mar 2005 11:21:30 +0200 cc: freebsd-usb@freebsd.org Subject: Re: What's the right way to wait for an USB transfer to complete ? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2005 09:21:39 -0000 Hello, > Havn't looked at your code yet, but the panic is by accessing a > memory location near address 0, so it's very likely that you are > accesing a structure member from a NULL pointer. > A stack trace from kernel debugger should easily tell you which > function made the access Yes, I already did that ; the panic is inside propagate_priority, called by turnstile_wait. Really confusing :-( > > You mean I must hold Giant every time I call any USB function ? I've > > never seen any driver doing this... > > Yes - holding GIANT ist required. > You don't see this because currently all USB drivers are already > entered with GIANT held. Ok, thanks for the info. I'll lock Giant in the software interrupt handlers which access USB, maybe the crash is because of that (race condition damaging kernel structures ?) Regards, Sebastien From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 03:57:56 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB15816A4CE for ; Wed, 30 Mar 2005 03:57:56 +0000 (GMT) Received: from avscan1.sentex.ca (avscan1.sentex.ca [199.212.134.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id E3D2443D1F for ; Wed, 30 Mar 2005 03:57:55 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2U3vs3T030250 for ; Tue, 29 Mar 2005 22:57:54 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan1.sentex.ca ([127.0.0.1]) by localhost (avscan1.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29797-04 for ; Tue, 29 Mar 2005 22:57:54 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2U3vsjr030234 for ; Tue, 29 Mar 2005 22:57:54 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j2U3vmlD021982 for ; Tue, 29 Mar 2005 22:57:48 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Tue, 29 Mar 2005 22:57:23 -0500 To: freebsd-usb@freebsd.org From: Mike Tancsa Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan1b Subject: uplcom / ucom problems on RELENG_5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 03:57:57 -0000 I have been trying out USB serial devices on RELENG_5 to see if they are a workable replacement to PCI cards. Unfortunately, it seems fairly easy to hang such a device. (full dmesg below) I have a 28.8 modem connected to a ucom device Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 2: full speed, power 100 mA, config 1, PL2303 Serial adapter (ATEN/IOGEAR UC232A)(0x2303), Prolific Technology(0x067b), rev 2.02 port 2 powered I start up a ppp session using it with the speed set to 57600. I then start up a ping -s 512 pinging something on the other side. I then kill the connection from the terminal server side to simulate a dialup modem failure. The pings build up to the point where I get "no buffer space available" and then a few dozen putc to a clist with no reserved cblocks putc to a clist with no reserved cblocks putc to a clist with no reserved cblocks putc to a clist with no reserved cblocks putc to a clist with no reserved cblocks putc to a clist with no reserved cblocks putc to a clist with no reserved cblocks fill up the console. At this point, ppp is totally hung, and I cannot kill ppp [releng5-865]# ps -auxwwjl -p 718 USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND PPID PGID SID JOBC UID CPU PRI NI MWCHAN root 718 0.0 0.9 3292 2340 ?? Ds 10:07PM 0:00.97 ppp -ddial papch 1 718 718 0 0 0 -8 0 usbdly [releng5-865]# I need to reboot the box at this point it would seem :( Should I fill a PR ? Or is this a known issue ? ---Mike Copyright (c) 1992-2005 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.4-PRERELEASE #1: Tue Mar 29 21:28:37 EST 2005 mdtancsa@releng5-865.sentex.ca:/usr/obj/usr/src/sys/ptest Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Celeron(R) CPU 2.40GHz (2400.41-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf33 Stepping = 3 Features=0xbfebfbff real memory = 267321344 (254 MB) avail memory = 251940864 (240 MB) ACPI APIC Table: ioapic0 irqs 0-23 on motherboard npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 cpu0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: port 0xd000-0xd007 mem 0xfa000000-0xfa07ffff,0xf0000000-0xf7ffffff irq 16 at devic e 2.0 on pci0 agp0: detected 892k stolen memory agp0: aperture size is 128M uhci0: port 0xc000-0xc01f irq 16 at device 29.0 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xc400-0xc41f irq 19 at device 29.1 on pci0 usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0xc800-0xc81f irq 18 at device 29.2 on pci0 usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered uhci3: port 0xcc00-0xcc1f irq 16 at device 29.3 on pci0 usb3: on uhci3 usb3: USB revision 1.0 uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0xfa080000-0xfa0803ff irq 23 at device 29.7 on pci0 ehci_pci_attach: companion usb0 ehci_pci_attach: companion usb1 ehci_pci_attach: companion usb2 ehci_pci_attach: companion usb3 usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub4: single transaction translator uhub4: 8 ports with 8 removable, self powered pcib1: at device 30.0 on pci0 pci1: on pcib1 rl0: port 0xa000-0xa0ff mem 0xf9000000-0xf90000ff irq 16 at device 4.0 on pci1 miibus0: on rl0 rlphy0: on miibus0 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto rl0: Ethernet address: 00:50:fc:f9:6b:7a pci1: at device 5.0 (no driver attached) fxp0: port 0xa800-0xa83f mem 0xf9001000-0xf9001fff irq 20 at device 8.0 on pci1 miibus1: on fxp0 inphy0: on miibus1 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:01:80:54:b3:b8 puc0: port 0xb000-0xb007,0xac00-0xac07 irq 18 at device 10.0 on pci1 sio4: on puc0 sio4: type 16550A sio4: unable to activate interrupt in fast mode - using normal mode sio5: on puc0 sio5: type 16550A sio5: unable to activate interrupt in fast mode - using normal mode puc1: port 0xb800-0xb807,0xb400-0xb407 irq 18 at device 10.1 on pci1 sio6: on puc1 sio6: type 16550A sio6: unable to activate interrupt in fast mode - using normal mode sio7: on puc1 sio7: type 16550A sio7: unable to activate interrupt in fast mode - using normal mode isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xf000-0xf00f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 pci0: at device 31.3 (no driver attached) acpi_tz0: on acpi0 fdc0: port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A, console sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 orm0: at iomem 0xcc000-0xd3fff,0xc0000-0xc9fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 umass0: LEXAR MEDIA JUMPDRIVE ELITE, rev 2.00/20.00, addr 2 Timecounter "TSC" frequency 2400411330 Hz quality 800 Timecounters tick every 10.000 msec Fast IPsec: Initialized Security Association Processing. ipfw2 initialized, divert disabled, rule-based forwarding disabled, default to accept, logging limited to 31000 packets/entry by de fault ad0: 38166MB [77545/16/63] at ata0-master UDMA100 ucom0: Prolific Technology PL2303 Serial adapter (ATEN/IOGEAR UC232A), rev 1.10/2.02, addr 2 ugen0: Phoenixtec Power UPS USB Interface (V2.00), rev 1.10/0.06, addr 2 umass1: SCM Microsystems Inc. eUSB CompactFlash Adapter, rev 1.10/2.18, addr 3 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 493MB (1010784 512 byte sectors: 64H 32S/T 493C) Mounting root from ufs:/dev/ad0s1a da1 at umass-sim1 bus 1 target 0 lun 0 da1: Removable Direct Access SCSI-2 device da1: 1.000MB/s transfers da1: 61MB (125440 512 byte sectors: 64H 32S/T 61C) -------------------------------------------------------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet since 1994 www.sentex.net Cambridge, Ontario Canada www.sentex.net/mike From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 05:00:17 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7174516A4CE for ; Wed, 30 Mar 2005 05:00:17 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45A5A43D45 for ; Wed, 30 Mar 2005 05:00:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2U50HuP066578 for ; Wed, 30 Mar 2005 05:00:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2U50H0A066577; Wed, 30 Mar 2005 05:00:17 GMT (envelope-from gnats) Date: Wed, 30 Mar 2005 05:00:17 GMT Message-Id: <200503300500.j2U50H0A066577@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Dave Oswell Subject: Re: kern/63837: [patch] USB: hid_is_collection() only looks for the first item X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dave Oswell List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 05:00:17 -0000 The following reply was made to PR kern/63837; it has been noted by GNATS. From: Dave Oswell To: freebsd-gnats-submit@FreeBSD.org, nivit@email.it Cc: Subject: Re: kern/63837: [patch] USB: hid_is_collection() only looks for the first item Date: Tue, 29 Mar 2005 23:51:02 -0500 Used the second mentioned patch to get a Logitech MX700 duo (wireless mouse & keyboard with single 'shared' usb connection) working under FreeBSD 5.3 Thanks, Hope to see a final solution moved into releases! From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 09:24:51 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B5F7D16A4CE for ; Wed, 30 Mar 2005 09:24:51 +0000 (GMT) Received: from mx1.mail.ru (mx1.mail.ru [194.67.23.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38E4943D53 for ; Wed, 30 Mar 2005 09:24:49 +0000 (GMT) (envelope-from bofh@mail.ru) Received: from [195.149.104.100] (port=57879 helo=[10.13.66.9]) by mx1.mail.ru with esmtp id 1DGZRO-000KQ2-00 for freebsd-usb@freebsd.org; Wed, 30 Mar 2005 13:24:46 +0400 Mime-Version: 1.0 (Apple Message framework v619.2) To: freebsd-usb@freebsd.org Message-Id: From: Alexandre Jouravlev Date: Wed, 30 Mar 2005 13:24:43 +0400 X-Mailer: Apple Mail (2.619.2) X-Spam: Not detected Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Ezload problems. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 09:24:51 -0000 Hello, I have usb device, which is based on EZ-USB chip (AN2131QC). I have working firmware for this device which is proved to work under Mac OS X and windows. But when I plug the device into the FreeBSD machine and download firmware with ezdownload utility something strange occurred: the firmware written correctly, but new device doesn't appears on usb bus. The strange things: 1) If I reboot machine after downloading firmware to device, usb stack works correctly with my device. 2) When I remove usb from kernel and make it a kld module, full reload of USB stack does not help! What magic has take place during boot, which helps USB stack to find my device? By the way: trying to unload usb.ko after several attempts leads to kernel trap. Thanks. From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 10:42:07 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC61016A4CE for ; Wed, 30 Mar 2005 10:42:07 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8BAD43D3F for ; Wed, 30 Mar 2005 10:42:06 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2UAg2sf084631 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 30 Mar 2005 12:42:04 +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.10/8.12.10) with ESMTP id j2UAf4VK003991 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Mar 2005 12:41:04 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2UAf3Rx095059; Wed, 30 Mar 2005 12:41:03 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2UAf3M8095058; Wed, 30 Mar 2005 12:41:03 +0200 (CEST) (envelope-from ticso) Date: Wed, 30 Mar 2005 12:41:03 +0200 From: Bernd Walter To: Mike Tancsa Message-ID: <20050330104102.GK33677@cicely12.cicely.de> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: freebsd-usb@freebsd.org Subject: Re: uplcom / ucom problems on RELENG_5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 10:42:07 -0000 On Tue, Mar 29, 2005 at 10:57:23PM -0500, Mike Tancsa wrote: > > I have been trying out USB serial devices on RELENG_5 to see if they are a > workable replacement to PCI cards. Unfortunately, it seems fairly easy to > hang such a device. (full dmesg below) > > I have a 28.8 modem connected to a ucom device > > Controller /dev/usb0: > addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), > Intel(0x0000), rev 1.00 > port 1 addr 2: full speed, power 100 mA, config 1, PL2303 Serial adapter > (ATEN/IOGEAR UC232A)(0x2303), Prolific Technology(0x067b), rev 2.02 > port 2 powered > > > I start up a ppp session using it with the speed set to 57600. I then > start up a ping -s 512 pinging something on the other side. I then kill > the connection from the terminal server side to simulate a dialup modem > failure. The pings build up to the point where I get "no buffer space > available" and then a few dozen > > putc to a clist with no reserved cblocks > putc to a clist with no reserved cblocks > putc to a clist with no reserved cblocks > putc to a clist with no reserved cblocks > putc to a clist with no reserved cblocks > putc to a clist with no reserved cblocks > putc to a clist with no reserved cblocks > > fill up the console. At this point, ppp is totally hung, and I cannot kill > ppp You need a way to notice a connection failure. In case of modem or line failure you should see DCD loss. Does your cabling release DCD, or do you use LQR in your configuration? Have you compared the same configuration with a classical 16550 based serial? -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 10:45:06 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19CB516A4CF for ; Wed, 30 Mar 2005 10:45:06 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49CCD43D58 for ; Wed, 30 Mar 2005 10:45:05 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2UAj2sf084723 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 30 Mar 2005 12:45:03 +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.10/8.12.10) with ESMTP id j2UAiEVK004016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Mar 2005 12:44:14 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2UAiD1l095089; Wed, 30 Mar 2005 12:44:13 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2UAiCvN095088; Wed, 30 Mar 2005 12:44:12 +0200 (CEST) (envelope-from ticso) Date: Wed, 30 Mar 2005 12:44:12 +0200 From: Bernd Walter To: Alexandre Jouravlev Message-ID: <20050330104411.GL33677@cicely12.cicely.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: freebsd-usb@freebsd.org Subject: Re: Ezload problems. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 10:45:06 -0000 On Wed, Mar 30, 2005 at 01:24:43PM +0400, Alexandre Jouravlev wrote: > Hello, I have usb device, which is based on EZ-USB chip (AN2131QC). I > have working firmware for this device which is proved to work under Mac > OS X and windows. > > But when I plug the device into the FreeBSD machine and download > firmware with ezdownload utility something strange occurred: the > firmware written correctly, but new device doesn't appears on usb bus. Do you see a disconnect from the device? > The strange things: > 1) If I reboot machine after downloading firmware to device, usb stack > works correctly with my device. > 2) When I remove usb from kernel and make it a kld module, full reload > of USB stack does not help! What magic has take place during boot, > which helps USB stack to find my device? I don't know, but I could imagine that the host controller isn't completely deconfigured on module unload. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 10:53:02 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1573316A4CE for ; Wed, 30 Mar 2005 10:53:02 +0000 (GMT) Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9BCA43D41 for ; Wed, 30 Mar 2005 10:53:01 +0000 (GMT) (envelope-from bofh@mail.ru) Received: from [195.149.104.100] (port=61736 helo=[10.13.66.9]) by mx2.mail.ru with esmtp id 1DGaol-000MuQ-00; Wed, 30 Mar 2005 14:52:59 +0400 In-Reply-To: <20050330104411.GL33677@cicely12.cicely.de> References: <20050330104411.GL33677@cicely12.cicely.de> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Alexandre Jouravlev Date: Wed, 30 Mar 2005 14:52:56 +0400 To: ticso@cicely.de X-Mailer: Apple Mail (2.619.2) X-Spam: Not detected cc: freebsd-usb@freebsd.org Subject: Re: Ezload problems. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 10:53:02 -0000 On Mar 30, 2005, at 2:44 PM, Bernd Walter wrote: >> But when I plug the device into the FreeBSD machine and download >> firmware with ezdownload utility something strange occurred: the >> firmware written correctly, but new device doesn't appears on usb bus. > > Do you see a disconnect from the device? Yes, I do. The device disconnects from usb and usb stack is know about this. (ugen0: detached.) >> What magic has take place during boot, >> which helps USB stack to find my device? > > I don't know, but I could imagine that the host controller isn't > completely deconfigured on module unload. > Ok, but why does the new device didn't appear in a regular way? From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 11:05:06 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BAD8E16A4CE for ; Wed, 30 Mar 2005 11:05:06 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA7A043D55 for ; Wed, 30 Mar 2005 11:05:05 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2UB52sf085385 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 30 Mar 2005 13:05:04 +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.10/8.12.10) with ESMTP id j2UB4bVK004122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Mar 2005 13:04:38 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2UB4baK095154; Wed, 30 Mar 2005 13:04:37 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2UB4bNc095153; Wed, 30 Mar 2005 13:04:37 +0200 (CEST) (envelope-from ticso) Date: Wed, 30 Mar 2005 13:04:36 +0200 From: Bernd Walter To: Alexandre Jouravlev Message-ID: <20050330110436.GM33677@cicely12.cicely.de> References: <20050330104411.GL33677@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: Ezload problems. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 11:05:06 -0000 On Wed, Mar 30, 2005 at 02:52:56PM +0400, Alexandre Jouravlev wrote: > > On Mar 30, 2005, at 2:44 PM, Bernd Walter wrote: > >>But when I plug the device into the FreeBSD machine and download > >>firmware with ezdownload utility something strange occurred: the > >>firmware written correctly, but new device doesn't appears on usb bus. > > > >Do you see a disconnect from the device? > Yes, I do. The device disconnects from usb and usb stack is know about > this. (ugen0: detached.) > > >>What magic has take place during boot, > >>which helps USB stack to find my device? > > > >I don't know, but I could imagine that the host controller isn't > >completely deconfigured on module unload. > > > > Ok, but why does the new device didn't appear in a regular way? A valid question. I do firmware updates with self build USB hardware. Switching between firmware loader and operating firmware works fine. However - there are some critical points. E.g. you switch firmware by issuing an USB request and if the device disconnects bevor the request is completed things may hang until timeout or even forever. You say that you see the disconnect. In which lock state (ps -axl) are the usb* and ezload processes after the disconnect message? Is there any change if you wait a minute? -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 11:40:42 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8715B16A4CE for ; Wed, 30 Mar 2005 11:40:42 +0000 (GMT) Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A3A843D49 for ; Wed, 30 Mar 2005 11:40:42 +0000 (GMT) (envelope-from bofh@mail.ru) Received: from [195.149.104.100] (port=52839 helo=[10.13.66.9]) by mx2.mail.ru with esmtp id 1DGbYu-000OfL-00; Wed, 30 Mar 2005 15:40:40 +0400 In-Reply-To: <20050330110436.GM33677@cicely12.cicely.de> References: <20050330104411.GL33677@cicely12.cicely.de> <20050330110436.GM33677@cicely12.cicely.de> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <6ea402e33ab5f4d1a9e66c51c5ddc78a@mail.ru> Content-Transfer-Encoding: 7bit From: Alexandre Jouravlev Date: Wed, 30 Mar 2005 15:40:36 +0400 To: ticso@cicely.de X-Mailer: Apple Mail (2.619.2) X-Spam: Not detected cc: freebsd-usb@freebsd.org Subject: Re: Ezload problems. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 11:40:42 -0000 On Mar 30, 2005, at 3:04 PM, Bernd Walter wrote: > > E.g. you switch firmware by issuing an USB request and if the > device disconnects bevor the request is completed things may hang > until timeout or even forever. > Device disconnects normal, as I can see the device after reboot. (At least I think so.) > You say that you see the disconnect. > In which lock state (ps -axl) are the usb* and ezload processes > after the disconnect message? There is no ezdownload process after disconnect message. usb* in different states like usbevt and usbtsk. With USB_DEBUG I can see that download process is completed before disconnection. Hidden flag -r of ezdownload utility also does not help. > Is there any change if you wait a minute? > No change even if I wait for a whole night. From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 11:57:08 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02CCD16A4CE for ; Wed, 30 Mar 2005 11:57:08 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id F25AC43D41 for ; Wed, 30 Mar 2005 11:57:06 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2UBv3sf086694 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 30 Mar 2005 13:57:04 +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.10/8.12.10) with ESMTP id j2UBuUVK004399 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Mar 2005 13:56:31 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2UBuUL2095422; Wed, 30 Mar 2005 13:56:30 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2UBuUCY095421; Wed, 30 Mar 2005 13:56:30 +0200 (CEST) (envelope-from ticso) Date: Wed, 30 Mar 2005 13:56:29 +0200 From: Bernd Walter To: Alexandre Jouravlev Message-ID: <20050330115629.GO33677@cicely12.cicely.de> References: <20050330104411.GL33677@cicely12.cicely.de> <20050330110436.GM33677@cicely12.cicely.de> <6ea402e33ab5f4d1a9e66c51c5ddc78a@mail.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ea402e33ab5f4d1a9e66c51c5ddc78a@mail.ru> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: Ezload problems. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 11:57:08 -0000 On Wed, Mar 30, 2005 at 03:40:36PM +0400, Alexandre Jouravlev wrote: > > On Mar 30, 2005, at 3:04 PM, Bernd Walter wrote: > > > >E.g. you switch firmware by issuing an USB request and if the > >device disconnects bevor the request is completed things may hang > >until timeout or even forever. > > > Device disconnects normal, as I can see the device after reboot. (At > least I think so.) That you see it after reboot is a completely different story. During reboot the device won't receive USB frames requiring the device to suspend and reset USB states when seeing frames again. > >You say that you see the disconnect. > >In which lock state (ps -axl) are the usb* and ezload processes > >after the disconnect message? > > There is no ezdownload process after disconnect message. usb* in > different states like usbevt and usbtsk. With USB_DEBUG I can see that > download process is completed before disconnection. Hidden flag -r of > ezdownload utility also does not help. Try setting hw.usb.uhub.debug=20 befor testing. Would be interesting to see why you see a disconnect event, but no connect. > >Is there any change if you wait a minute? > > > No change even if I wait for a whole night. usbevt and usbtsk are also OK if the system is idle. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 12:11:38 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A767A16A4CE for ; Wed, 30 Mar 2005 12:11:38 +0000 (GMT) Received: from mx1.mail.ru (mx1.mail.ru [194.67.23.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5ED1543D1D for ; Wed, 30 Mar 2005 12:11:38 +0000 (GMT) (envelope-from bofh@mail.ru) Received: from [195.149.104.100] (port=65120 helo=[10.13.66.9]) by mx1.mail.ru with esmtp id 1DGc2o-000Kn9-00; Wed, 30 Mar 2005 16:11:34 +0400 In-Reply-To: <20050330115629.GO33677@cicely12.cicely.de> References: <20050330104411.GL33677@cicely12.cicely.de> <20050330110436.GM33677@cicely12.cicely.de> <6ea402e33ab5f4d1a9e66c51c5ddc78a@mail.ru> <20050330115629.GO33677@cicely12.cicely.de> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <548e4b9dbf2553ebdc2584bee71441a5@mail.ru> Content-Transfer-Encoding: 7bit From: Alexandre Jouravlev Date: Wed, 30 Mar 2005 16:11:27 +0400 To: ticso@cicely.de X-Mailer: Apple Mail (2.619.2) X-Spam: Not detected cc: freebsd-usb@freebsd.org Subject: Re: Ezload problems. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 12:11:38 -0000 > > Try setting hw.usb.uhub.debug=20 befor testing. > Would be interesting to see why you see a disconnect event, > but no connect. > > As I am not skilled usb developer (this is my first usb project ever) I don't understand much in this output. Here is the output of debug session from plugging the device to what happens next: ugen0: Device (no firmware), rev 1.00/1.00, addr 2 uhub_intr: sc=0xc288d790 uhub_explore dev=0xc2af4380 addr=1 uhub_explore: uhub0 port 1 status 0x0100 0x0000 uhub_explore: port=1 !C_CONNECT_STATUS uhub_explore: uhub0 port 2 status 0x0100 0x0003 uhub_explore: C_PORT_ENABLED 0x3 uhub_explore: status change hub=1 port=2 uhub_explore: device addr=2 disappeared on port 2 ugen0: at uhub0 port 2 (addr 2) disconnected ugen0: detached uhub_explore: port=2 !CURRENT_CONNECT_STATUS uhub_intr: sc=0xc288d790 uhub_explore dev=0xc2af4380 addr=1 uhub_explore: uhub0 port 1 status 0x0100 0x0000 uhub_explore: port=1 !C_CONNECT_STATUS uhub_explore: uhub0 port 2 status 0x0101 0x0001 uhub_explore: status change hub=1 port=2 uhub_intr: sc=0xc288d790 uhub_explore dev=0xc2af4380 addr=1 uhub_explore: uhub0 port 1 status 0x0100 0x0010 uhub_explore: port=1 !C_CONNECT_STATUS uhub_explore: uhub0 port 2 status 0x0100 0x0011 uhub_explore: status change hub=1 port=2 uhub_explore: port=2 !CURRENT_CONNECT_STATUS uhub_intr: sc=0xc288d790 And next the following repeated at rate about 2 messages per second: uhub_intr: sc=0xc288d790 uhub_explore dev=0xc2af4380 addr=1 uhub_explore: uhub0 port 1 status 0x0100 0x0010 uhub_explore: port=1 !C_CONNECT_STATUS uhub_explore: uhub0 port 2 status 0x0101 0x0011 uhub_explore: status change hub=1 port=2 From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 12:22:41 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00CF916A4CE for ; Wed, 30 Mar 2005 12:22:41 +0000 (GMT) Received: from avscan1.sentex.ca (avscan1.sentex.ca [199.212.134.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 654A043D2D for ; Wed, 30 Mar 2005 12:22:40 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UCMaA0097903; Wed, 30 Mar 2005 07:22:36 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan1.sentex.ca ([127.0.0.1]) by localhost (avscan1.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 97500-03; Wed, 30 Mar 2005 07:22:36 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UCMaAq097889; Wed, 30 Mar 2005 07:22:36 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UCMTQa023133; Wed, 30 Mar 2005 07:22:29 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050330071753.055388b8@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Wed, 30 Mar 2005 07:22:07 -0500 To: ticso@cicely.de From: Mike Tancsa In-Reply-To: <20050330104102.GK33677@cicely12.cicely.de> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <20050330104102.GK33677@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan1b cc: freebsd-usb@freebsd.org Subject: Re: uplcom / ucom problems on RELENG_5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 12:22:41 -0000 At 05:41 AM 30/03/2005, Bernd Walter wrote: > > putc to a clist with no reserved cblocks > > putc to a clist with no reserved cblocks > > putc to a clist with no reserved cblocks > > putc to a clist with no reserved cblocks > > putc to a clist with no reserved cblocks > > putc to a clist with no reserved cblocks > > putc to a clist with no reserved cblocks > > > > fill up the console. At this point, ppp is totally hung, and I cannot > kill > > ppp > >You need a way to notice a connection failure. >In case of modem or line failure you should see DCD loss. >Does your cabling release DCD, or do you use LQR in your configuration? >Have you compared the same configuration with a classical 16550 based >serial? Hi, PPP does see the loss, the problem is that its totally wedged and cant do anything else. In the case where there is not too much data going across the serial line, the connection dropping has no adverse effect. I have LCP keep alives enbled and it does detect the link going away and does properly redial. However, it seems where there is too much outstanding data things get into trouble. Like I said, at this point I cant even kill -9 ppp. What more information can I provide to help track this problem down ? ---Mike From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 12:37:08 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EBDF116A4CE for ; Wed, 30 Mar 2005 12:37:07 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 651B943D1F for ; Wed, 30 Mar 2005 12:37:07 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2UCb3sf088118 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 30 Mar 2005 14:37:05 +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.10/8.12.10) with ESMTP id j2UCaCVK004639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Mar 2005 14:36:12 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2UCaBax095648; Wed, 30 Mar 2005 14:36:11 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2UCaB0m095647; Wed, 30 Mar 2005 14:36:11 +0200 (CEST) (envelope-from ticso) Date: Wed, 30 Mar 2005 14:36:11 +0200 From: Bernd Walter To: Alexandre Jouravlev Message-ID: <20050330123610.GP33677@cicely12.cicely.de> References: <20050330104411.GL33677@cicely12.cicely.de> <20050330110436.GM33677@cicely12.cicely.de> <6ea402e33ab5f4d1a9e66c51c5ddc78a@mail.ru> <20050330115629.GO33677@cicely12.cicely.de> <548e4b9dbf2553ebdc2584bee71441a5@mail.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <548e4b9dbf2553ebdc2584bee71441a5@mail.ru> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: Ezload problems. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 12:37:08 -0000 On Wed, Mar 30, 2005 at 04:11:27PM +0400, Alexandre Jouravlev wrote: > > > >Try setting hw.usb.uhub.debug=20 befor testing. > >Would be interesting to see why you see a disconnect event, > >but no connect. > > > > > As I am not skilled usb developer (this is my first usb project ever) I > don't understand much in this output. > Here is the output of debug session from plugging the device to what > happens next: > > ugen0: Device (no firmware), rev 1.00/1.00, addr 2 > uhub_intr: sc=0xc288d790 > uhub_explore dev=0xc2af4380 addr=1 > uhub_explore: uhub0 port 1 status 0x0100 0x0000 This is a root hub - things might be different if you use another host controller type or an external hub between. Neverthelesse there is a problem to fix somewhere. > uhub_explore: port=1 !C_CONNECT_STATUS > uhub_explore: uhub0 port 2 status 0x0100 0x0003 > uhub_explore: C_PORT_ENABLED 0x3 > uhub_explore: status change hub=1 port=2 > uhub_explore: device addr=2 disappeared on port 2 > ugen0: at uhub0 port 2 (addr 2) disconnected > ugen0: detached > uhub_explore: port=2 !CURRENT_CONNECT_STATUS > uhub_intr: sc=0xc288d790 > uhub_explore dev=0xc2af4380 addr=1 > uhub_explore: uhub0 port 1 status 0x0100 0x0000 > uhub_explore: port=1 !C_CONNECT_STATUS > uhub_explore: uhub0 port 2 status 0x0101 0x0001 > uhub_explore: status change hub=1 port=2 > uhub_intr: sc=0xc288d790 > uhub_explore dev=0xc2af4380 addr=1 > uhub_explore: uhub0 port 1 status 0x0100 0x0010 > uhub_explore: port=1 !C_CONNECT_STATUS > uhub_explore: uhub0 port 2 status 0x0100 0x0011 > uhub_explore: status change hub=1 port=2 > uhub_explore: port=2 !CURRENT_CONNECT_STATUS > uhub_intr: sc=0xc288d790 I asume the messages don't have much time in between? > And next the following repeated at rate about 2 messages per second: > > uhub_intr: sc=0xc288d790 > uhub_explore dev=0xc2af4380 addr=1 > uhub_explore: uhub0 port 1 status 0x0100 0x0010 > uhub_explore: port=1 !C_CONNECT_STATUS > uhub_explore: uhub0 port 2 status 0x0101 0x0011 > uhub_explore: status change hub=1 port=2 Will have to check the meaning of those states in USB specs. Looks like we ignore it for whatever reason. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 12:50:07 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBFA316A4CE for ; Wed, 30 Mar 2005 12:50:07 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 074C643D2D for ; Wed, 30 Mar 2005 12:50:07 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2UCo3sf088482 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 30 Mar 2005 14:50:05 +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.10/8.12.10) with ESMTP id j2UCnPVK004694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Mar 2005 14:49:25 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2UCnOfB095696; Wed, 30 Mar 2005 14:49:24 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2UCnO2s095695; Wed, 30 Mar 2005 14:49:24 +0200 (CEST) (envelope-from ticso) Date: Wed, 30 Mar 2005 14:49:24 +0200 From: Bernd Walter To: Mike Tancsa Message-ID: <20050330124923.GR33677@cicely12.cicely.de> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <20050330104102.GK33677@cicely12.cicely.de> <6.2.1.2.0.20050330071753.055388b8@64.7.153.2> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.2.1.2.0.20050330071753.055388b8@64.7.153.2> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0019] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: uplcom / ucom problems on RELENG_5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 12:50:07 -0000 On Wed, Mar 30, 2005 at 07:22:07AM -0500, Mike Tancsa wrote: > At 05:41 AM 30/03/2005, Bernd Walter wrote: > >> putc to a clist with no reserved cblocks > >> putc to a clist with no reserved cblocks > >> putc to a clist with no reserved cblocks > >> putc to a clist with no reserved cblocks > >> putc to a clist with no reserved cblocks > >> putc to a clist with no reserved cblocks > >> putc to a clist with no reserved cblocks > >> > >> fill up the console. At this point, ppp is totally hung, and I cannot > >kill > >> ppp > > > >You need a way to notice a connection failure. > >In case of modem or line failure you should see DCD loss. > >Does your cabling release DCD, or do you use LQR in your configuration? > >Have you compared the same configuration with a classical 16550 based > >serial? > > Hi, > PPP does see the loss, the problem is that its totally wedged and > cant do anything else. In the case where there is not too much data going > across the serial line, the connection dropping has no adverse effect. I > have LCP keep alives enbled and it does detect the link going away and does > properly redial. However, it seems where there is too much outstanding > data things get into trouble. That's possible - currently we can't control the transmit/receive buffers inside the USB device. > Like I said, at this point I cant even kill -9 ppp. That fits - the device buffers even survive a reopen of the tty. > What more information can I provide to help track this problem down ? We need to implement complete flushing support for uplcom. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 14:04:18 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2089E16A4CE for ; Wed, 30 Mar 2005 14:04:18 +0000 (GMT) Received: from avscan2.sentex.ca (avscan2.sentex.ca [199.212.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90D1443D46 for ; Wed, 30 Mar 2005 14:04:17 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UE4H0E032694; Wed, 30 Mar 2005 09:04:17 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan2.sentex.ca ([127.0.0.1]) by localhost (avscan2.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32300-05; Wed, 30 Mar 2005 09:04:17 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UE4HI9032658; Wed, 30 Mar 2005 09:04:17 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UE47q2023304; Wed, 30 Mar 2005 09:04:07 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050330085751.03594e08@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Wed, 30 Mar 2005 09:03:36 -0500 To: ticso@cicely.de From: Mike Tancsa In-Reply-To: <20050330124923.GR33677@cicely12.cicely.de> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <20050330104102.GK33677@cicely12.cicely.de> <6.2.1.2.0.20050330071753.055388b8@64.7.153.2> <20050330124923.GR33677@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan2b cc: freebsd-usb@freebsd.org Subject: Re: uplcom / ucom problems on RELENG_5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 14:04:18 -0000 At 07:49 AM 30/03/2005, Bernd Walter wrote: >On Wed, Mar 30, 2005 at 07:22:07AM -0500, Mike Tancsa wrote: > > At 05:41 AM 30/03/2005, Bernd Walter wrote: > > >> putc to a clist with no reserved cblocks > > >> putc to a clist with no reserved cblocks > > >> putc to a clist with no reserved cblocks > > >> putc to a clist with no reserved cblocks > > >> putc to a clist with no reserved cblocks > > >> putc to a clist with no reserved cblocks > > >> putc to a clist with no reserved cblocks > > >> > > >> fill up the console. At this point, ppp is totally hung, and I cannot > > >kill > > >> ppp > > > > > >You need a way to notice a connection failure. > > >In case of modem or line failure you should see DCD loss. > > >Does your cabling release DCD, or do you use LQR in your configuration? > > >Have you compared the same configuration with a classical 16550 based > > >serial? > > > > Hi, > > PPP does see the loss, the problem is that its totally wedged and > > cant do anything else. In the case where there is not too much data going > > across the serial line, the connection dropping has no adverse effect. I > > have LCP keep alives enbled and it does detect the link going away and > does > > properly redial. However, it seems where there is too much outstanding > > data things get into trouble. > >That's possible - currently we can't control the transmit/receive >buffers inside the USB device. > > > What more information can I provide to help track this problem down ? > >We need to implement complete flushing support for uplcom. Hi, Is this problem particular to the uplcom driver ? In other words, if I found a serial adaptor or modem based on uftdi would I avoid this problem ? Thanks, ---Mike From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 14:15:09 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36C0F16A4CE for ; Wed, 30 Mar 2005 14:15:09 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 409FE43D55 for ; Wed, 30 Mar 2005 14:15:08 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2UEF4sf091317 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 30 Mar 2005 16:15:06 +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.10/8.12.10) with ESMTP id j2UEEiVK005232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Mar 2005 16:14:44 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2UEEih0096183; Wed, 30 Mar 2005 16:14:44 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2UEEhcm096182; Wed, 30 Mar 2005 16:14:43 +0200 (CEST) (envelope-from ticso) Date: Wed, 30 Mar 2005 16:14:43 +0200 From: Bernd Walter To: Mike Tancsa Message-ID: <20050330141443.GA33677@cicely12.cicely.de> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <20050330104102.GK33677@cicely12.cicely.de> <6.2.1.2.0.20050330071753.055388b8@64.7.153.2> <20050330124923.GR33677@cicely12.cicely.de> <6.2.1.2.0.20050330085751.03594e08@64.7.153.2> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.2.1.2.0.20050330085751.03594e08@64.7.153.2> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: uplcom / ucom problems on RELENG_5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 14:15:09 -0000 On Wed, Mar 30, 2005 at 09:03:36AM -0500, Mike Tancsa wrote: > At 07:49 AM 30/03/2005, Bernd Walter wrote: > >That's possible - currently we can't control the transmit/receive > >buffers inside the USB device. > > > >> What more information can I provide to help track this problem down ? > > > >We need to implement complete flushing support for uplcom. > > Hi, > Is this problem particular to the uplcom driver ? In other > words, if I found a serial adaptor or modem based on uftdi would I avoid > this problem ? I don't know for all drivers, but the current uftdi(4) share this problem and likely most/all others too. I have some plans with uftdi driver enhancements so chances are better that this will be fixed with FTDI devices any time soon. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 14:23:52 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2058C16A4CE for ; Wed, 30 Mar 2005 14:23:52 +0000 (GMT) Received: from avscan2.sentex.ca (avscan2.sentex.ca [199.212.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id B490D43D5A for ; Wed, 30 Mar 2005 14:23:51 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UENngj037820; Wed, 30 Mar 2005 09:23:49 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan2.sentex.ca ([127.0.0.1]) by localhost (avscan2.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 37531-04; Wed, 30 Mar 2005 09:23:49 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UENnbD037785; Wed, 30 Mar 2005 09:23:49 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UENhQV023379; Wed, 30 Mar 2005 09:23:43 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050330092200.047a7928@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Wed, 30 Mar 2005 09:23:03 -0500 To: ticso@cicely.de From: Mike Tancsa In-Reply-To: <20050330141443.GA33677@cicely12.cicely.de> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <20050330104102.GK33677@cicely12.cicely.de> <6.2.1.2.0.20050330071753.055388b8@64.7.153.2> <20050330124923.GR33677@cicely12.cicely.de> <6.2.1.2.0.20050330085751.03594e08@64.7.153.2> <20050330141443.GA33677@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan2b cc: freebsd-usb@freebsd.org Subject: Re: uplcom / ucom problems on RELENG_5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 14:23:52 -0000 At 09:14 AM 30/03/2005, Bernd Walter wrote: >I don't know for all drivers, but the current uftdi(4) share this >problem and likely most/all others too. >I have some plans with uftdi driver enhancements so chances are >better that this will be fixed with FTDI devices any time soon. Thanks for the info. In the mean time, is there a way to avoid wedging the device ? And if it does get wedged, is there a way to unwedge it without resorting to rebooting ? ---Mike From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 14:39:08 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC38E16A4CE for ; Wed, 30 Mar 2005 14:39:08 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCA5043D4C for ; Wed, 30 Mar 2005 14:39:07 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2UEd4sf092153 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 30 Mar 2005 16:39:06 +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.10/8.12.10) with ESMTP id j2UEcbVK005360 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Mar 2005 16:38:38 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2UEcbBZ096303; Wed, 30 Mar 2005 16:38:37 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2UEcbuE096302; Wed, 30 Mar 2005 16:38:37 +0200 (CEST) (envelope-from ticso) Date: Wed, 30 Mar 2005 16:38:37 +0200 From: Bernd Walter To: Mike Tancsa Message-ID: <20050330143836.GB33677@cicely12.cicely.de> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <20050330104102.GK33677@cicely12.cicely.de> <6.2.1.2.0.20050330071753.055388b8@64.7.153.2> <20050330124923.GR33677@cicely12.cicely.de> <6.2.1.2.0.20050330085751.03594e08@64.7.153.2> <20050330141443.GA33677@cicely12.cicely.de> <6.2.1.2.0.20050330092200.047a7928@64.7.153.2> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.2.1.2.0.20050330092200.047a7928@64.7.153.2> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: uplcom / ucom problems on RELENG_5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 14:39:08 -0000 On Wed, Mar 30, 2005 at 09:23:03AM -0500, Mike Tancsa wrote: > At 09:14 AM 30/03/2005, Bernd Walter wrote: > > >I don't know for all drivers, but the current uftdi(4) share this > >problem and likely most/all others too. > >I have some plans with uftdi driver enhancements so chances are > >better that this will be fixed with FTDI devices any time soon. > > Thanks for the info. In the mean time, is there a way to avoid wedging the > device ? And if it does get wedged, is there a way to unwedge it without > resorting to rebooting ? So far I only know about reconnecting, which likely isn't an acceptable workaround for you. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 14:55:12 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE7C416A4CE for ; Wed, 30 Mar 2005 14:55:12 +0000 (GMT) Received: from avscan2.sentex.ca (avscan2.sentex.ca [199.212.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D10343D3F for ; Wed, 30 Mar 2005 14:55:12 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UEtAeV045946; Wed, 30 Mar 2005 09:55:10 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan2.sentex.ca ([127.0.0.1]) by localhost (avscan2.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 45224-10; Wed, 30 Mar 2005 09:55:09 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UEt9YD045920; Wed, 30 Mar 2005 09:55:09 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UEt3l5023555; Wed, 30 Mar 2005 09:55:04 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050330094120.02fca188@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Wed, 30 Mar 2005 09:54:03 -0500 To: ticso@cicely.de From: Mike Tancsa In-Reply-To: <20050330143836.GB33677@cicely12.cicely.de> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <20050330104102.GK33677@cicely12.cicely.de> <6.2.1.2.0.20050330071753.055388b8@64.7.153.2> <20050330124923.GR33677@cicely12.cicely.de> <6.2.1.2.0.20050330085751.03594e08@64.7.153.2> <20050330141443.GA33677@cicely12.cicely.de> <6.2.1.2.0.20050330092200.047a7928@64.7.153.2> <20050330143836.GB33677@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan2b cc: freebsd-usb@freebsd.org Subject: Re: uplcom / ucom problems on RELENG_5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 14:55:12 -0000 At 09:38 AM 30/03/2005, Bernd Walter wrote: > > Thanks for the info. In the mean time, is there a way to avoid wedging > the > > device ? And if it does get wedged, is there a way to unwedge it without > > resorting to rebooting ? > >So far I only know about reconnecting, which likely isn't an >acceptable workaround for you. Thanks, you mean reconnecting the USB device ? Sadly no, that wont work for us when the unit is 80km away :( Or is there a way to do this programtically? ---Mike From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 14:55:18 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0853616A4CE for ; Wed, 30 Mar 2005 14:55:18 +0000 (GMT) Received: from mx3.mail.ru (mx3.mail.ru [194.67.23.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id AECF143D1D for ; Wed, 30 Mar 2005 14:55:15 +0000 (GMT) (envelope-from bofh@mail.ru) Received: from [195.149.104.100] (port=32428 helo=[10.13.66.9]) by mx3.mail.ru with esmtp id 1DGebC-0001Op-00 for freebsd-usb@freebsd.org; Wed, 30 Mar 2005 18:55:14 +0400 Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: <20050330135543.GY33677@cicely12.cicely.de> References: <20050330110436.GM33677@cicely12.cicely.de> <6ea402e33ab5f4d1a9e66c51c5ddc78a@mail.ru> <20050330115629.GO33677@cicely12.cicely.de> <548e4b9dbf2553ebdc2584bee71441a5@mail.ru> <20050330123610.GP33677@cicely12.cicely.de> <6907f6ccfb41b4bee1edb019c4de2f86@mail.ru> <20050330125340.GT33677@cicely12.cicely.de> <4e6a2cd61a7240bb30175facbe679b84@mail.ru> <20050330133349.GV33677@cicely12.cicely.de> <956de90bcfcaaccca5f3380e07d82b90@mail.ru> <20050330135543.GY33677@cicely12.cicely.de> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Alexandre Jouravlev Date: Wed, 30 Mar 2005 18:55:12 +0400 To: freebsd-usb@freebsd.org X-Mailer: Apple Mail (2.619.2) X-Spam: Not detected Subject: Re: Ezload problems. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 14:55:18 -0000 My problem: after downloading firmware to the EZ-USB based device with ezdownload it doesn't appears back on usb bus. My solution: In file /usr/src/sys/dev/usb/usb.h there are lines: #if 0 /* These are the values from the spec. */ Changing from 0 to 1 does help me. Specifications rulez! :) Thanks to Bernd Walter! Our conversation on this topic helps me a lot. From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 15:39:16 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F3D216A4CE for ; Wed, 30 Mar 2005 15:39:16 +0000 (GMT) Received: from avscan2.sentex.ca (avscan2.sentex.ca [199.212.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1669843D53 for ; Wed, 30 Mar 2005 15:39:16 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UFdDMe058062; Wed, 30 Mar 2005 10:39:13 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan2.sentex.ca ([127.0.0.1]) by localhost (avscan2.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 57843-03; Wed, 30 Mar 2005 10:39:13 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UFdD3M058020; Wed, 30 Mar 2005 10:39:13 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UFd7vC023784; Wed, 30 Mar 2005 10:39:07 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050330103630.047abfa8@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Wed, 30 Mar 2005 10:37:40 -0500 To: ticso@cicely.de From: Mike Tancsa In-Reply-To: <6.2.1.2.0.20050330094120.02fca188@64.7.153.2> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <20050330104102.GK33677@cicely12.cicely.de> <6.2.1.2.0.20050330071753.055388b8@64.7.153.2> <20050330124923.GR33677@cicely12.cicely.de> <6.2.1.2.0.20050330085751.03594e08@64.7.153.2> <20050330141443.GA33677@cicely12.cicely.de> <6.2.1.2.0.20050330092200.047a7928@64.7.153.2> <20050330143836.GB33677@cicely12.cicely.de> <6.2.1.2.0.20050330094120.02fca188@64.7.153.2> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan2b cc: freebsd-usb@freebsd.org Subject: Re: uplcom / ucom problems on RELENG_5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 15:39:16 -0000 At 09:54 AM 30/03/2005, Mike Tancsa wrote: >>So far I only know about reconnecting, which likely isn't an >>acceptable workaround for you. > >Thanks, you mean reconnecting the USB device ? Sadly no, that wont work >for us when the unit is 80km away :( Or is there a way to do this >programtically? I wonder if "set choked" in ppp might be tuned a bit to avoid this issue. Time to experiment a bit. ---Mike From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 21:04:21 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 742F616A4CE for ; Wed, 30 Mar 2005 21:04:21 +0000 (GMT) Received: from avscan1.sentex.ca (avscan1.sentex.ca [199.212.134.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0478743D2F for ; Wed, 30 Mar 2005 21:04:21 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UL4IJO035839; Wed, 30 Mar 2005 16:04:18 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan1.sentex.ca ([127.0.0.1]) by localhost (avscan1.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 35632-03; Wed, 30 Mar 2005 16:04:17 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UL4Hdu035819; Wed, 30 Mar 2005 16:04:17 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j2UL4BPt024641; Wed, 30 Mar 2005 16:04:11 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050330145628.053abc68@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Wed, 30 Mar 2005 16:02:56 -0500 To: ticso@cicely.de From: Mike Tancsa In-Reply-To: <6.2.1.2.0.20050330103630.047abfa8@64.7.153.2> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <20050330104102.GK33677@cicely12.cicely.de> <6.2.1.2.0.20050330071753.055388b8@64.7.153.2> <20050330124923.GR33677@cicely12.cicely.de> <6.2.1.2.0.20050330085751.03594e08@64.7.153.2> <20050330141443.GA33677@cicely12.cicely.de> <6.2.1.2.0.20050330092200.047a7928@64.7.153.2> <20050330143836.GB33677@cicely12.cicely.de> <6.2.1.2.0.20050330094120.02fca188@64.7.153.2> <6.2.1.2.0.20050330103630.047abfa8@64.7.153.2> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan1b cc: freebsd-usb@freebsd.org Subject: Re: uplcom / ucom problems on RELENG_5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 21:04:21 -0000 At 10:37 AM 30/03/2005, Mike Tancsa wrote: >At 09:54 AM 30/03/2005, Mike Tancsa wrote: > >>>So far I only know about reconnecting, which likely isn't an >>>acceptable workaround for you. >> >>Thanks, you mean reconnecting the USB device ? Sadly no, that wont work >>for us when the unit is 80km away :( Or is there a way to do this >>programtically? > >I wonder if "set choked" in ppp might be tuned a bit to avoid this >issue. Time to experiment a bit. So far so good. If I change add "set choked 10", I am not able to hang the usb port like I was before. The value is quite a change from the default 120 seconds, but still 10 seconds to transmit (for my application anyways which is a modem backup if the DSL fails) is adequate. I am going to let it run 48hrs to see if it still stable. On one device, I am running just continuous pings, and I am kicking off the connection every 10 min from the terminal server. On another machine, I am running it with random bursts of data and kicking it off every 5min. ---Mike From owner-freebsd-usb@FreeBSD.ORG Wed Mar 30 21:49:50 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C8EDA16A4CE for ; Wed, 30 Mar 2005 21:49:50 +0000 (GMT) Received: from avscan1.sentex.ca (avscan1.sentex.ca [199.212.134.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C02443D46 for ; Wed, 30 Mar 2005 21:49:50 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2ULnnYm047936 for ; Wed, 30 Mar 2005 16:49:49 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan1.sentex.ca ([127.0.0.1]) by localhost (avscan1.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 47643-04 for ; Wed, 30 Mar 2005 16:49:49 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2ULnm3h047902 for ; Wed, 30 Mar 2005 16:49:48 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j2ULnhL2024840 for ; Wed, 30 Mar 2005 16:49:43 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050330164430.03571820@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Wed, 30 Mar 2005 16:49:06 -0500 To: freebsd-usb@freebsd.org From: Mike Tancsa Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan1b Subject: FreeBSD supported USB modem reccomendations X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 21:49:50 -0000 What USB modems do people recommend for RELENG_5 ? I tried a couple from my local supplier, and neither are recognized :( Both come up as ugen devices port 2 addr 3: full speed, power 150 mA, config 1, V.92 Modem with USB Interface(0x1234), Conexant Systems, Inc.(0x0572), rev 0.01 Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 2: full speed, power 100 mA, config 1, USB Communicator(0x7554), STMicroelectronics(0x0483), rev 2.00 ---Mike -------------------------------------------------------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet since 1994 www.sentex.net Cambridge, Ontario Canada www.sentex.net/mike From owner-freebsd-usb@FreeBSD.ORG Thu Mar 31 11:36:20 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CA1916A4CE for ; Thu, 31 Mar 2005 11:36:20 +0000 (GMT) Received: from mail.r.caley.org.uk (82-41-208-48.cable.ubr12.edin.blueyonder.co.uk [82.41.208.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D93E43D64 for ; Thu, 31 Mar 2005 11:36:19 +0000 (GMT) (envelope-from rjc@caley.org.uk) Received: from pele.r.caley.org.uk (pele.r.caley.org.uk [10.0.0.12]) by mail.r.caley.org.uk (8.13.3/8.13.3) with ESMTP id j2VBaHRs040470 for ; Thu, 31 Mar 2005 12:36:17 +0100 (BST) (envelope-from rjc@caley.org.uk) Received: from pele.r.caley.org.uk (localhost [127.0.0.1]) by pele.r.caley.org.uk (8.13.3/8.13.3) with ESMTP id j2VBaG4v014364 for ; Thu, 31 Mar 2005 12:36:17 +0100 (BST) (envelope-from rjc@pele.r.caley.org.uk) Received: (from rjc@localhost) by pele.r.caley.org.uk (8.13.3/8.13.3/Submit) id j2VBaGI6014363 for freebsd-usb@freebsd.org; Thu, 31 Mar 2005 12:36:16 +0100 (BST) (envelope-from rjc) Date: Thu, 31 Mar 2005 12:36:16 +0100 (BST) Message-Id: <200503311136.j2VBaGI6014363@pele.r.caley.org.uk> From: Richard Caley To: freebsd-usb@freebsd.org X-Dragon: Yevaud Organisation: Interactive Information Ltd. Subject: USB Modems X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 11:36:20 -0000 I want to add a USB modem to a FreeBSD 5.* machine. So, I built a kernel with ucom and umodem in it. I have tried one I bought a while ago for use with windows, it is identified as STMicroelectronics Communicator and gets set up as ugen0. I thought I should get a ucom or umodem device? Is this a dead end? I notice that this device name is in the usbdevs file in the source, so maybe someone has done something with it somewhere? There is only one product in the little table in umodem.c so maybe this is just not a useful driver and I should be looking somewhere lese, but I can't spot any clues. If there is no way forward with that one, can someone reccomend a usb voice modem which I can buy and expect to work with FreeBSD 5.3+? -- rjc@interactive.co.uk _O_ |< From owner-freebsd-usb@FreeBSD.ORG Thu Mar 31 12:30:22 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B89FB16A4CE for ; Thu, 31 Mar 2005 12:30:22 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7E1043D55 for ; Thu, 31 Mar 2005 12:30:21 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2VCUGsf039926 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 31 Mar 2005 14:30:19 +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.10/8.12.10) with ESMTP id j2VCU9hs012776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 31 Mar 2005 14:30:09 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2VCU87B002642; Thu, 31 Mar 2005 14:30:08 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2VCU86m002641; Thu, 31 Mar 2005 14:30:08 +0200 (CEST) (envelope-from ticso) Date: Thu, 31 Mar 2005 14:30:08 +0200 From: Bernd Walter To: Richard Caley Message-ID: <20050331123008.GC2072@cicely12.cicely.de> References: <200503311136.j2VBaGI6014363@pele.r.caley.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200503311136.j2VBaGI6014363@pele.r.caley.org.uk> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-1.5 required=3.0 tests=BAYES_01 autolearn=no version=2.64 X-Spam-Report: * -1.5 BAYES_01 BODY: Bayesian spam probability is 1 to 10% * [score: 0.0136] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: freebsd-usb@freebsd.org Subject: Re: USB Modems X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 12:30:22 -0000 On Thu, Mar 31, 2005 at 12:36:16PM +0100, Richard Caley wrote: > > > I want to add a USB modem to a FreeBSD 5.* machine. > > So, I built a kernel with ucom and umodem in it. > > I have tried one I bought a while ago for use with windows, it is > identified as STMicroelectronics Communicator and gets set up as > ugen0. I thought I should get a ucom or umodem device? > > Is this a dead end? I notice that this device name is in the usbdevs > file in the source, so maybe someone has done something with it > somewhere? There is only one product in the little table in umodem.c > so maybe this is just not a useful driver and I should be looking > somewhere lese, but I can't spot any clues. umodem should take every device that claims to be compatible with umodem AT class protocol specification. I don't think it makes much sense to build a tty without AT command set. Unfortunately vendors don't tell anything about the protocols they use. First chance to find out is by connecting the device and ask it. A more up to date list of known good devices in the manpage would be great. I think the exceptional device is umodem conform but to stupid to tell. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Thu Mar 31 12:51:16 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 47B2D16A4CE for ; Thu, 31 Mar 2005 12:51:16 +0000 (GMT) Received: from avscan1.sentex.ca (avscan1.sentex.ca [199.212.134.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7169E43D54 for ; Thu, 31 Mar 2005 12:51:15 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2VCp7UT086532; Thu, 31 Mar 2005 07:51:07 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan1.sentex.ca ([127.0.0.1]) by localhost (avscan1.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 86017-07; Thu, 31 Mar 2005 07:51:07 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2VCp7vl086500; Thu, 31 Mar 2005 07:51:07 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j2VCp0I2026723; Thu, 31 Mar 2005 07:51:00 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050331074641.04f72eb8@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Thu, 31 Mar 2005 07:49:58 -0500 To: ticso@cicely.de From: Mike Tancsa In-Reply-To: <6.2.1.2.0.20050330145628.053abc68@64.7.153.2> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <20050330104102.GK33677@cicely12.cicely.de> <6.2.1.2.0.20050330071753.055388b8@64.7.153.2> <20050330124923.GR33677@cicely12.cicely.de> <6.2.1.2.0.20050330085751.03594e08@64.7.153.2> <20050330141443.GA33677@cicely12.cicely.de> <6.2.1.2.0.20050330092200.047a7928@64.7.153.2> <20050330143836.GB33677@cicely12.cicely.de> <6.2.1.2.0.20050330094120.02fca188@64.7.153.2> <6.2.1.2.0.20050330103630.047abfa8@64.7.153.2> <6.2.1.2.0.20050330145628.053abc68@64.7.153.2> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan1b cc: freebsd-usb@freebsd.org Subject: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 12:51:16 -0000 Unfortunately the box coredumped overnight putc to a clist with no reserved cblocks putc to a clist with no reserved cblocks putc to a clist with no reserved cblocks putc to a clist with no reserved cblocks panic: uhci_abort_xfer: not in process context Uptime: 6h55m12s Dumping 254 MB 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 Dump complete Automatic reboot in 15 seconds - press a key on the console to abort Rebooting... Console: serial port [releng5-865]# kgdb kernel.debug /var/crash/vmcore.5 [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so:= =20 Undefined symbol "ps_pglobal_lookup"] GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain= conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd". #0 doadump () at pcpu.h:159 159 __asm __volatile("movl %%fs:0,%0" : "=3Dr" (td)); (kgdb) bt full #0 doadump () at pcpu.h:159 No locals. #1 0xc051fa5e in boot (howto=3D260) at ../../../kern/kern_shutdown.c:410 first_buf_printf =3D 1 #2 0xc051fcf4 in panic (fmt=3D0xc06fc4ee "uhci_abort_xfer: not in process= =20 context") at ../../../kern/kern_shutdown.c:566 td =3D (struct thread *) 0xc1502000 bootopt =3D 260 newpanic =3D 0 ap =3D 0xc1502000 "\020\aP=C1 =E9O=C1" buf =3D "uhci_abort_xfer: not in process context", '\0' #3 0xc04c5c47 in uhci_abort_xfer (xfer=3D0xc183ed00,=20 status=3DUSBD_NORMAL_COMPLETION) at ../../../dev/usb/uhci.c:1958 uxfer =3D (struct uhci_xfer *) 0xc183ed00 ii =3D (uhci_intr_info_t *) 0xc183ed6c upipe =3D (struct uhci_pipe *) 0xc19c7e00 sc =3D (uhci_softc_t *) 0xc15b8000 std =3D (uhci_soft_td_t *) 0x0 #4 0xc04c5bc9 in uhci_device_bulk_abort (xfer=3D0xc183ed00) at=20 ../../../dev/usb/uhci.c:1921 No locals. #5 0xc04d2ebb in usbd_ar_pipe (pipe=3D0xc19c7e00) at=20 ../../../dev/usb/usbdi.c:762 xfer =3D 0x0 #6 0xc04d2c1f in usbd_abort_pipe (pipe=3D0xc19c7e00) at=20 ../../../dev/usb/usbdi.c:556 err =3D USBD_NORMAL_COMPLETION #7 0xc04c3cf5 in ucomstopread (sc=3D0x0) at ../../../dev/usb/ucom.c:1160 No locals. #8 0xc04c38ba in ucomstop (tp=3D0xc171c000, flag=3D1) at=20 ../../../dev/usb/ucom.c:934 sc =3D (struct ucom_softc *) 0xc1754c00 #9 0xc054b393 in ttyflush (tp=3D0xc171c000, rw=3D1) at= ../../../kern/tty.c:1420 No locals. #10 0xc054974d in ttyinput (c=3D26, tp=3D0xc171c000) at= ../../../kern/tty.c:445 iflag =3D 11010 lflag =3D 1483 cc =3D (cc_t *) 0xc171c0b4=20 "\004=FF=FF\177\027\025\022\b\003\034\032\031\021\023\026\017\001" i =3D 0 err =3D 0 #11 0xc04c3be5 in ucomreadcb (xfer=3D0xc183ed00, p=3D0xc1754c00,=20 status=3DUSBD_NORMAL_COMPLETION) at linedisc.h:122 sc =3D (struct ucom_softc *) 0xc1754c00 tp =3D (struct tty *) 0xc171c000 err =3D USBD_NORMAL_COMPLETION cc =3D 69 cp =3D ( u_char *) 0xc175f099 "\032\033\034\035\036\037=20 !\"#$%&'()*+,-./0123456789:;<=3D>?@ABCDEFGHIJKLMNOPQRSTUV\021=20 ~~=FF}#=C0BCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abc" lostcc =3D 0 #12 0xc04d2ffc in usb_transfer_complete (xfer=3D0xc183ed00) at=20 ../../../dev/usb/usbdi.c:851 pipe =3D 0xc19c7e00 dmap =3D (usb_dma_t *) 0xc183ed3c ---Type to continue, or q to quit--- sync =3D 0 erred =3D 0 repeat =3D 0 polling =3D 0 #13 0xc04c54af in uhci_idone (ii=3D0x0) at ../../../dev/usb/uhci.c:1500 xfer =3D 0xc183ed00 upipe =3D (struct uhci_pipe *) 0xc19c7e00 std =3D (uhci_soft_td_t *) 0x0 status =3D 0 nstatus =3D 0 actlen =3D 222 #14 0xc04c538c in uhci_check_intr (sc=3D0xc15b8000, ii=3D0xc183ed6c) at=20 ../../../dev/usb/uhci.c:1375 std =3D (uhci_soft_td_t *) 0x0 lstd =3D (uhci_soft_td_t *) 0xc15e8f20 status =3D 0 #15 0xc04c52de in uhci_softintr (v=3D0xc15b8000) at= ../../../dev/usb/uhci.c:1305 sc =3D (uhci_softc_t *) 0xc15b8000 ii =3D (uhci_intr_info_t *) 0x0 nextii =3D (uhci_intr_info_t *) 0xc199d26c #16 0xc04d0499 in usb_schedsoftintr (bus=3D0x0) at= ../../../dev/usb/usb.c:864 No locals. #17 0xc04c52ab in uhci_intr1 (sc=3D0xc15b8000) at= ../../../dev/usb/uhci.c:1275 status =3D 1 ack =3D 1 #18 0xc04c513c in uhci_intr (arg=3D0xc15b8000) at= ../../../dev/usb/uhci.c:1190 sc =3D (uhci_softc_t *) 0x0 #19 0xc050c371 in ithread_loop (arg=3D0xc14f7580) at=20 ../../../kern/kern_intr.c:547 ithd =3D (struct ithd *) 0xc14f7580 ih =3D (struct intrhand *) 0xc15df680 td =3D (struct thread *) 0xc1502000 p =3D (struct proc *) 0xc1500710 count =3D 0 warming =3D 0 warned =3D 0 #20 0xc050b604 in fork_exit (callout=3D0xc050c220 ,=20 arg=3D0xc14f7580, frame=3D0xcbca3d48) at ../../../kern/kern_fork.c:790 p =3D (struct proc *) 0xc1500710 td =3D (struct thread *) 0x0 #21 0xc06a2afc in fork_trampoline () at ../../../i386/i386/exception.s:209 No locals. (kgdb) At 04:02 PM 30/03/2005, Mike Tancsa wrote: >At 10:37 AM 30/03/2005, Mike Tancsa wrote: >>At 09:54 AM 30/03/2005, Mike Tancsa wrote: >> >>>>So far I only know about reconnecting, which likely isn't an >>>>acceptable workaround for you. >>> >>>Thanks, you mean reconnecting the USB device ? Sadly no, that wont work= =20 >>>for us when the unit is 80km away :( Or is there a way to do this=20 >>>programtically? >> >>I wonder if "set choked" in ppp might be tuned a bit to avoid this=20 >>issue. Time to experiment a bit. > >So far so good. If I change add "set choked 10", I am not able to hang=20 >the usb port like I was before. > >The value is quite a change from the default 120 seconds, but still 10=20 >seconds to transmit (for my application anyways which is a modem backup if= =20 >the DSL fails) is adequate. I am going to let it run 48hrs to see if it=20 >still stable. On one device, I am running just continuous pings, and I am= =20 >kicking off the connection every 10 min from the terminal server. On=20 >another machine, I am running it with random bursts of data and kicking it= =20 >off every 5min. > > ---Mike From owner-freebsd-usb@FreeBSD.ORG Thu Mar 31 17:45:30 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A53516A4CE for ; Thu, 31 Mar 2005 17:45:30 +0000 (GMT) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60CF843D58 for ; Thu, 31 Mar 2005 17:45:29 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-216-39-167.daxnet.no ([193.216.39.167] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 4.2.9) with ESMTP id 332161062; Thu, 31 Mar 2005 19:45:27 +0200 From: Hans Petter Selasky To: Mike Tancsa , ticso@cicely.de, freebsd-usb@freebsd.org Date: Thu, 31 Mar 2005 19:46:18 +0200 User-Agent: KMail/1.7 References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <6.2.1.2.0.20050330145628.053abc68@64.7.153.2> <6.2.1.2.0.20050331074641.04f72eb8@64.7.153.2> In-Reply-To: <6.2.1.2.0.20050331074641.04f72eb8@64.7.153.2> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503311946.23151.hselasky@c2i.net> Subject: Re: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hselasky@c2i.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 17:45:30 -0000 On Thursday 31 March 2005 14:49, Mike Tancsa wrote: > Unfortunately the box coredumped overnight > > > putc to a clist with no reserved cblocks > putc to a clist with no reserved cblocks > putc to a clist with no reserved cblocks > putc to a clist with no reserved cblocks > panic: uhci_abort_xfer: not in process context > Uptime: 6h55m12s > Dumping 254 MB > 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 > Dump complete > Automatic reboot in 15 seconds - press a key on the console to abort > Rebooting... If you are using FreeBSD5.x/6.x my USB driver will most likely fix your problem. The problem is that that the abort function, which can sleep, is called from the interrupt handler, which cannot sleep. My USB driver will allow this. This is a design problem in the existing USB system. When one is designing a driver, it is very convenient if USB-transfers can be stopped/started from the callback of another USB-transfer. For example when one has got a modem and the modem receives the hangup signal, then it can stop the USB-data-transfers right away, not having to spawn another thread for it, which will lead to race conditions. Download the three files below into a new directory and type "make install" (to uninstall type "make deinstall") http://home.c2i.net/hselasky/isdn4bsd/privat/usb/Makefile http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.diff.bz2 http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.tar.bz2 Yours --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Mar 31 19:27:05 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 385CB16A4CE for ; Thu, 31 Mar 2005 19:27:05 +0000 (GMT) Received: from avscan1.sentex.ca (avscan1.sentex.ca [199.212.134.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id C04C043D45 for ; Thu, 31 Mar 2005 19:27:04 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2VJR1FJ096799; Thu, 31 Mar 2005 14:27:01 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan1.sentex.ca ([127.0.0.1]) by localhost (avscan1.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 96418-03; Thu, 31 Mar 2005 14:27:01 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2VJR1pk096794; Thu, 31 Mar 2005 14:27:01 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j2VJQtam027977; Thu, 31 Mar 2005 14:26:55 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050331133331.04d109d0@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Thu, 31 Mar 2005 14:25:28 -0500 To: freebsd-usb@freebsd.org From: Mike Tancsa Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan1b Subject: uftdi serial adaptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 19:27:05 -0000 I got a couple of USB to rs232 Serial adaptors from bytrunner today to try out, and they dont seem to be recognized usbdevs -v shows port 2 addr 2: full speed, power 90 mA, config 1, USB FAST SERIAL ADAPTER(0x6010), FTDI(0x0403), rev 5.00 and it defaults to ugen [hifn]# kldstat Id Refs Address Size Name 1 7 0xc0400000 4b4564 kernel 2 1 0xc08b5000 326c uftdi.ko 3 2 0xc08b9000 36e8 ucom.ko 4 16 0xc08bd000 61d48 acpi.ko [hifn]# This is HEAD from March 30th. Is there an easy way to hack in support for this variant ? Or is it a totally different device that requires a different driver ? ---Mike -------------------------------------------------------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet since 1994 www.sentex.net Cambridge, Ontario Canada www.sentex.net/mike From owner-freebsd-usb@FreeBSD.ORG Thu Mar 31 19:36:56 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A22616A4CF for ; Thu, 31 Mar 2005 19:36:56 +0000 (GMT) Received: from ss.eunet.cz (ss.eunet.cz [193.85.228.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3BF4143D5E for ; Thu, 31 Mar 2005 19:36:55 +0000 (GMT) (envelope-from mime@traveller.cz) Received: from localhost.i.cz (ss.eunet.cz [193.85.228.13]) by ss.eunet.cz (8.13.1/8.13.1) with ESMTP id j2VJaq90044932; Thu, 31 Mar 2005 21:36:53 +0200 (CEST) (envelope-from mime@traveller.cz) From: Michal Mertl To: freebsd-usb@freebsd.org Content-Type: text/plain Date: Thu, 31 Mar 2005 21:36:51 +0200 Message-Id: <1112297812.656.9.camel@genius2.i.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: Re: USB memory stick problems with error "Medium not present" (patch) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 19:36:56 -0000 Hello, while trying to help someone else I found message from Dan Olson who had problem with Kingston DataTraveller Elite 1GB similar to mine. I've already written about the issue but nobody with a clue replied. http://lists.freebsd.org/pipermail/freebsd-current/2005-March/047827.html Anyways there's a patch in my referenced email which _WON'T_ work for you but with slight changes it should help you. As stated there this isn't probably a real solution but just a workaround. If you show me the output of 'usbdevs -v' with your stick plugged in I can send you an updated patch. Michal From owner-freebsd-usb@FreeBSD.ORG Thu Mar 31 20:24:25 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48AB016A4CE for ; Thu, 31 Mar 2005 20:24:25 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CBE943D58 for ; Thu, 31 Mar 2005 20:24:24 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2VKOKsf053156 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 31 Mar 2005 22:24:22 +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.10/8.12.10) with ESMTP id j2VKNlhs015593 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 31 Mar 2005 22:23:48 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2VKNlKD004981; Thu, 31 Mar 2005 22:23:47 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2VKNlGC004980; Thu, 31 Mar 2005 22:23:47 +0200 (CEST) (envelope-from ticso) Date: Thu, 31 Mar 2005 22:23:46 +0200 From: Bernd Walter To: Mike Tancsa Message-ID: <20050331202346.GH2072@cicely12.cicely.de> References: <6.2.1.2.0.20050331133331.04d109d0@64.7.153.2> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.2.1.2.0.20050331133331.04d109d0@64.7.153.2> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: freebsd-usb@freebsd.org Subject: Re: uftdi serial adaptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 20:24:25 -0000 On Thu, Mar 31, 2005 at 02:25:28PM -0500, Mike Tancsa wrote: > I got a couple of USB to rs232 Serial adaptors from bytrunner today to try > out, and they dont seem to be recognized > > usbdevs -v shows > port 2 addr 2: full speed, power 90 mA, config 1, USB FAST SERIAL > ADAPTER(0x6010), FTDI(0x0403), rev 5.00 The FT232AM and FT232BM have product ID 0x6001. Maybe a typo when programming the config eeprom. You can rewrite the config eeprom from the adapter with misc/ftdi-eeprom - or with FTDIs own version for Windows from their site www.ftdichip.com. Or is this a twin port device? In this case it may be one of the newer FT2232 chips. We don't have special support for this variant yet, but it would be great if you have one, so I have someone to do tests. Do you know the chip type inside the adapter? > and it defaults to ugen > > [hifn]# kldstat > Id Refs Address Size Name > 1 7 0xc0400000 4b4564 kernel > 2 1 0xc08b5000 326c uftdi.ko > 3 2 0xc08b9000 36e8 ucom.ko > 4 16 0xc08bd000 61d48 acpi.ko > [hifn]# > > This is HEAD from March 30th. Is there an easy way to hack in support for > this variant ? Or is it a totally different device that requires a > different driver ? FTDI devices share the same driver layout. There are additional features in newwer chips, but they have always been backward compatible. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Thu Mar 31 20:41:56 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 977C116A4CE for ; Thu, 31 Mar 2005 20:41:56 +0000 (GMT) Received: from avscan2.sentex.ca (avscan2.sentex.ca [199.212.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B41843D2F for ; Thu, 31 Mar 2005 20:41:56 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j2VKfsxd093528; Thu, 31 Mar 2005 15:41:54 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan2.sentex.ca ([127.0.0.1]) by localhost (avscan2.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 93317-03; Thu, 31 Mar 2005 15:41:54 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j2VKfrYx093499; Thu, 31 Mar 2005 15:41:54 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j2VKfkY5028282; Thu, 31 Mar 2005 15:41:46 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050331152926.0385c7d0@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Thu, 31 Mar 2005 15:41:32 -0500 To: ticso@cicely.de From: Mike Tancsa In-Reply-To: <20050331202346.GH2072@cicely12.cicely.de> References: <6.2.1.2.0.20050331133331.04d109d0@64.7.153.2> <20050331202346.GH2072@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan2b cc: freebsd-usb@freebsd.org Subject: Re: uftdi serial adaptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 20:41:56 -0000 At 03:23 PM 31/03/2005, Bernd Walter wrote: >On Thu, Mar 31, 2005 at 02:25:28PM -0500, Mike Tancsa wrote: > > I got a couple of USB to rs232 Serial adaptors from bytrunner today to try > > out, and they dont seem to be recognized > > > > usbdevs -v shows > > port 2 addr 2: full speed, power 90 mA, config 1, USB FAST SERIAL > > ADAPTER(0x6010), FTDI(0x0403), rev 5.00 > >The FT232AM and FT232BM have product ID 0x6001. >Maybe a typo when programming the config eeprom. >You can rewrite the config eeprom from the adapter with >misc/ftdi-eeprom - or with FTDIs own version for Windows from their >site . > >Or is this a twin port device? Hi, It is indeed a twin port device. http://www.byterunner.com/byterunner/new_frontpage=usbcom USB-2COM and USB-2COM-PL >In this case it may be one of the newer FT2232 chips. >We don't have special support for this variant yet, but it would be >great if you have one, so I have someone to do tests. > >Do you know the chip type inside the adapter? It says on the chip FT2232C 3704 >FTDI devices share the same driver layout. >There are additional features in newwer chips, but they have always >been backward compatible. I can send you one as well ---Mike From owner-freebsd-usb@FreeBSD.ORG Thu Mar 31 21:06:04 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 256BA16A4CE for ; Thu, 31 Mar 2005 21:06:04 +0000 (GMT) Received: from cenn.mc.mpls.visi.com (cenn.mc.mpls.visi.com [208.42.156.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB88143D5A for ; Thu, 31 Mar 2005 21:06:03 +0000 (GMT) (envelope-from danolson@visi.com) Received: from [192.168.240.220] (danolson.dsl.visi.com [209.98.225.50]) by cenn.mc.mpls.visi.com (Postfix) with ESMTP id 0BF5681E9; Thu, 31 Mar 2005 15:06:03 -0600 (CST) Message-ID: <424C663C.6090408@visi.com> Date: Thu, 31 Mar 2005 15:06:04 -0600 From: Dan Olson User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050326) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <1112297812.656.9.camel@genius2.i.cz> In-Reply-To: <1112297812.656.9.camel@genius2.i.cz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: Michal Mertl Subject: Re: USB memory stick problems with error "Medium not present" (patch) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 21:06:04 -0000 Michal Mertl wrote: > Hello, > > while trying to help someone else I found message from Dan Olson who had > problem with Kingston DataTraveller Elite 1GB similar to mine. > > I've already written about the issue but nobody with a clue replied. > > http://lists.freebsd.org/pipermail/freebsd-current/2005-March/047827.html > > Anyways there's a patch in my referenced email which _WON'T_ work for > you but with slight changes it should help you. As stated there this > isn't probably a real solution but just a workaround. > > If you show me the output of 'usbdevs -v' with your stick plugged in I > can send you an updated patch. > > Michal > > Hello Michal, Here is my output of usbdevs -v. Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb2: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb3: addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered port 3 powered port 4 addr 2: high speed, power 140 mA, config 1, DT Elite HS 2.0(0x0015), Kingston(0x08ec), rev 2.00 port 5 powered port 6 powered For what its worth, earlier this week I found a work around. By doing a 'cat /dev/null > /dev/da0' the /dev/da0s1 appears and is mountable/readable/writable. Thanks much Dan Olson From owner-freebsd-usb@FreeBSD.ORG Thu Mar 31 21:16:27 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3773F16A4CE for ; Thu, 31 Mar 2005 21:16:27 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 788F243D5F for ; Thu, 31 Mar 2005 21:16:26 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2VLGMsf054475 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 31 Mar 2005 23:16: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.10/8.12.10) with ESMTP id j2VLFGhs015891 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 31 Mar 2005 23:15:17 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2VLFGOL005265; Thu, 31 Mar 2005 23:15:16 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2VLFGW8005264; Thu, 31 Mar 2005 23:15:16 +0200 (CEST) (envelope-from ticso) Date: Thu, 31 Mar 2005 23:15:16 +0200 From: Bernd Walter To: Mike Tancsa Message-ID: <20050331211515.GJ2072@cicely12.cicely.de> References: <6.2.1.2.0.20050331133331.04d109d0@64.7.153.2> <20050331202346.GH2072@cicely12.cicely.de> <6.2.1.2.0.20050331152926.0385c7d0@64.7.153.2> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.2.1.2.0.20050331152926.0385c7d0@64.7.153.2> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: uftdi serial adaptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 21:16:27 -0000 On Thu, Mar 31, 2005 at 03:41:32PM -0500, Mike Tancsa wrote: > It says on the chip > FT2232C > 3704 Great - we have a tester ;-) And sorry - I did know about this chip and should have warned you. > >FTDI devices share the same driver layout. > >There are additional features in newwer chips, but they have always > >been backward compatible. > > > I can send you one as well I don't think it is required to have one here. And shipping to germany is expensive anyway. In the mean time you could add the product ID to uftdi.c. It is very likely that you get one port running by this. Will try setup a patch during the WE. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Thu Mar 31 21:22:36 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 892BB16A4CE for ; Thu, 31 Mar 2005 21:22:36 +0000 (GMT) Received: from avscan1.sentex.ca (avscan1.sentex.ca [199.212.134.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA97F43D1F for ; Thu, 31 Mar 2005 21:22:35 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2VLMXrU028836; Thu, 31 Mar 2005 16:22:33 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan1.sentex.ca ([127.0.0.1]) by localhost (avscan1.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28005-09; Thu, 31 Mar 2005 16:22:32 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j2VLMWDk028808; Thu, 31 Mar 2005 16:22:32 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j2VLMPh8028436; Thu, 31 Mar 2005 16:22:26 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050331161947.047c6bf0@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Thu, 31 Mar 2005 16:21:42 -0500 To: hselasky@c2i.net, freebsd-usb@freebsd.org From: Mike Tancsa In-Reply-To: <200503311946.23151.hselasky@c2i.net> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <6.2.1.2.0.20050330145628.053abc68@64.7.153.2> <6.2.1.2.0.20050331074641.04f72eb8@64.7.153.2> <200503311946.23151.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan1b Subject: Re: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 21:22:36 -0000 At 12:46 PM 31/03/2005, Hans Petter Selasky wrote: >On Thursday 31 March 2005 14:49, Mike Tancsa wrote: > > Unfortunately the box coredumped overnight > > > > > > putc to a clist with no reserved cblocks > > putc to a clist with no reserved cblocks > > putc to a clist with no reserved cblocks > > putc to a clist with no reserved cblocks > > panic: uhci_abort_xfer: not in process context > > Uptime: 6h55m12s > > Dumping 254 MB > > 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 > > Dump complete > > Automatic reboot in 15 seconds - press a key on the console to abort > > Rebooting... > >If you are using FreeBSD5.x/6.x my USB driver will most likely fix your >problem. The problem is that that the abort function, which can sleep, is >called from the interrupt handler, which cannot sleep. My USB driver will >allow this. This is a design problem in the existing USB system. Hi, Everything patches and seems to compile OK. However, I cannot talk to the ucom based serial adaptor I was using before [releng5-865]# usbdevs -v | grep -v err Controller /dev/usb0: addr 127: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb1: addr 126: full speed, power 100 mA, config 1, PL2303 Serial adapter (ATEN/IOGEAR UC232A)(0x2303), Prolific Technology(0x067b), rev 2.02 addr 127: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 126: full speed, power 100 mA, config 1, PL2303 Serial adapter (ATEN/IOGEAR UC232A)(0x2303), Prolific Technology(0x067b), rev 2.02 port 2 powered Controller /dev/usb2: addr 127: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb3: addr 127: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered [releng5-865]# This is a RELENG_5 box from this morning. ---Mike From owner-freebsd-usb@FreeBSD.ORG Thu Mar 31 23:30:08 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E788116A4CE for ; Thu, 31 Mar 2005 23:30:08 +0000 (GMT) Received: from ss.eunet.cz (ss.eunet.cz [193.85.228.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2862E43D31 for ; Thu, 31 Mar 2005 23:30:08 +0000 (GMT) (envelope-from mime@traveller.cz) Received: from localhost.i.cz (ss.eunet.cz [193.85.228.13]) by ss.eunet.cz (8.13.1/8.13.1) with ESMTP id j2VNU6Kc079412; Fri, 1 Apr 2005 01:30:06 +0200 (CEST) (envelope-from mime@traveller.cz) From: Michal Mertl To: Dan Olson In-Reply-To: <424C663C.6090408@visi.com> References: <1112297812.656.9.camel@genius2.i.cz> <424C663C.6090408@visi.com> Content-Type: text/plain Date: Fri, 01 Apr 2005 01:30:05 +0200 Message-Id: <1112311805.17726.6.camel@genius2.i.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit cc: freebsd-usb@freebsd.org Subject: Re: USB memory stick problems with error "Medium not present" (patch) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 23:30:09 -0000 Dan Olson wrote: > Michal Mertl wrote: > > Hello, > > > > while trying to help someone else I found message from Dan Olson who had > > problem with Kingston DataTraveller Elite 1GB similar to mine. > > > > I've already written about the issue but nobody with a clue replied. > > > > http://lists.freebsd.org/pipermail/freebsd-current/2005-March/047827.html > > > > Anyways there's a patch in my referenced email which _WON'T_ work for > > you but with slight changes it should help you. As stated there this > > isn't probably a real solution but just a workaround. > > > > If you show me the output of 'usbdevs -v' with your stick plugged in I > > can send you an updated patch. > > > > Michal > > > > > > Hello Michal, > > Here is my output of usbdevs -v. > > Controller /dev/usb0: > addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), > Intel(0x0000), rev 1.00 > port 1 powered > port 2 powered > Controller /dev/usb1: > addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), > Intel(0x0000), rev 1.00 > port 1 powered > port 2 powered > Controller /dev/usb2: > addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), > Intel(0x0000), rev 1.00 > port 1 powered > port 2 powered > Controller /dev/usb3: > addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), > Intel(0x0000), rev 1.00 > port 1 powered > port 2 powered > port 3 powered > port 4 addr 2: high speed, power 140 mA, config 1, DT Elite HS > 2.0(0x0015), Kingston(0x08ec), rev 2.00 > port 5 powered > port 6 powered OK. Device ID is in fact the same like in my USB stick so the patch should work for you. Mine is sold by Dell. The real manufacturer of both is I believ some company cold M-Systems. > For what its worth, earlier this week I found a work around. By doing a > 'cat /dev/null > /dev/da0' the /dev/da0s1 appears and is > mountable/readable/writable. I noticed someone mentioning this on the lists and wanted to try it with my problematic stick. I've done it now and it works with it too. > Thanks much > > Dan Olson > > > From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 00:58:43 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7388D16A4CF for ; Fri, 1 Apr 2005 00:58:43 +0000 (GMT) Received: from avscan2.sentex.ca (avscan2.sentex.ca [199.212.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id E114943D49 for ; Fri, 1 Apr 2005 00:58:42 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j310wfcB040858; Thu, 31 Mar 2005 19:58:41 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan2.sentex.ca ([127.0.0.1]) by localhost (avscan2.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 40301-05; Thu, 31 Mar 2005 19:58:41 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j310wfmC040834; Thu, 31 Mar 2005 19:58:41 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j310wXDr028918; Thu, 31 Mar 2005 19:58:33 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050331195044.037f52b0@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Thu, 31 Mar 2005 19:58:19 -0500 To: ticso@cicely.de From: Mike Tancsa In-Reply-To: <20050331211515.GJ2072@cicely12.cicely.de> References: <6.2.1.2.0.20050331133331.04d109d0@64.7.153.2> <20050331202346.GH2072@cicely12.cicely.de> <6.2.1.2.0.20050331152926.0385c7d0@64.7.153.2> <20050331211515.GJ2072@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan2b cc: freebsd-usb@freebsd.org Subject: Re: uftdi serial adaptors (small patch) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 00:58:43 -0000 At 04:15 PM 31/03/2005, Bernd Walter wrote: >On Thu, Mar 31, 2005 at 03:41:32PM -0500, Mike Tancsa wrote: > > It says on the chip > > FT2232C > > 3704 > >Great - we have a tester ;-) >And sorry - I did know about this chip and should have warned >you. hehe, no worries. These days I am used to products being totally different inside despite the name on the outside in short periods of time. > > >FTDI devices share the same driver layout. > > >There are additional features in newwer chips, but they have always > > >been backward compatible. > > > > > > I can send you one as well >In the mean time you could add the product ID to uftdi.c. >It is very likely that you get one port running by this. >Will try setup a patch during the WE. Yup, my initial twidling seems to get it to work. [releng5-865]# diff -c usbdevs.prev usbdevs *** usbdevs.prev Thu Mar 31 17:21:09 2005 --- usbdevs Thu Mar 31 17:24:33 2005 *************** *** 704,709 **** --- 704,710 ---- /* Future Technology Devices products */ product FTDI SERIAL_8U100AX 0x8372 8U100AX Serial converter product FTDI SERIAL_8U232AM 0x6001 8U232AM Serial converter + product FTDI SERIAL_2232C 0x6010 Dual port Serial converter /* Fuji photo products */ product FUJIPHOTO MASS0100 0x0100 Mass Storage [releng5-865]# [releng5-865]# diff -c uftdi.c.prev uftdi.c *** uftdi.c.prev Thu Mar 31 17:21:15 2005 --- uftdi.c Thu Mar 31 17:24:20 2005 *************** *** 154,159 **** --- 154,160 ---- if (uaa->vendor == USB_VENDOR_FTDI && (uaa->product == USB_PRODUCT_FTDI_SERIAL_8U100AX || uaa->product == USB_PRODUCT_FTDI_SERIAL_8U232AM || + uaa->product == USB_PRODUCT_FTDI_SERIAL_2232C || uaa->product == USB_PRODUCT_FTDI_SEMC_DSS20 || uaa->product == USB_PRODUCT_FTDI_CFA_631 || uaa->product == USB_PRODUCT_FTDI_CFA_632 || *************** *** 226,231 **** --- 227,233 ---- break; case USB_PRODUCT_FTDI_SEMC_DSS20: case USB_PRODUCT_FTDI_SERIAL_8U232AM: + case USB_PRODUCT_FTDI_SERIAL_2232C: case USB_PRODUCT_FTDI_CFA_631: case USB_PRODUCT_FTDI_CFA_632: case USB_PRODUCT_FTDI_CFA_633: [releng5-865]# [releng5-865]# usbdevs -v Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 2: full speed, power 90 mA, config 1, USB FAST SERIAL ADAPTER(0x6010), FTDI(0x0403), rev 5.00 port 2 powered Controller /dev/usb2: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb3: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered [releng5-865]# [releng5-865]# dmesg | grep uco ucom0: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 2 [releng5-865]# However, this only shows up as one serial port where as this is a dual model. But it seems to work so far in that my modem connection is working. ---Mike ---Mike From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 14:31:06 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C14716A4CE for ; Fri, 1 Apr 2005 14:31:06 +0000 (GMT) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3400643D41 for ; Fri, 1 Apr 2005 14:31:05 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-217-232-5.daxnet.no ([193.217.232.5] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 4.2.9) with ESMTP id 135180358; Fri, 01 Apr 2005 16:31:03 +0200 From: Hans Petter Selasky To: Mike Tancsa Date: Fri, 1 Apr 2005 16:31:50 +0200 User-Agent: KMail/1.7 References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <200503311946.23151.hselasky@c2i.net> <6.2.1.2.0.20050331161947.047c6bf0@64.7.153.2> In-Reply-To: <6.2.1.2.0.20050331161947.047c6bf0@64.7.153.2> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504011631.51760.hselasky@c2i.net> cc: freebsd-usb@freebsd.org Subject: Re: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hselasky@c2i.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 14:31:06 -0000 On Thursday 31 March 2005 23:21, Mike Tancsa wrote: > At 12:46 PM 31/03/2005, Hans Petter Selasky wrote: > >On Thursday 31 March 2005 14:49, Mike Tancsa wrote: > Hi, > Everything patches and seems to compile OK. However, I cannot > talk to the ucom based serial adaptor I was using before > > [releng5-865]# usbdevs -v | grep -v err > Controller /dev/usb0: > addr 127: full speed, self powered, config 1, UHCI root hub(0x0000), > Intel(0x0000), rev 1.00 > port 1 powered > port 2 powered > Controller /dev/usb1: > addr 126: full speed, power 100 mA, config 1, PL2303 Serial adapter > (ATEN/IOGEAR UC232A)(0x2303), Prolific Technology(0x067b), rev 2.02 > addr 127: full speed, self powered, config 1, UHCI root hub(0x0000), > Intel(0x0000), rev 1.00 > port 1 addr 126: full speed, power 100 mA, config 1, PL2303 Serial > adapter (ATEN/IOGEAR UC232A)(0x2303), Prolific Technology(0x067b), rev 2.02 > port 2 powered What dmsg appears when you attach your device? If "ugen", then make sure you have got "device ucom" and "device uplcom", in the kernel config file. If you are loading "ucom"/"uplcom" from modules, make sure that those modules are re-compiled. Else try to enable debugging and see what happens: sysctl hw.usb.uplcom.debug=15 sysctl hw.usb.ucom.debug=15 and sysctl hw.usb.debug=15 Yours --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 14:50:54 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81CF816A4CE for ; Fri, 1 Apr 2005 14:50:54 +0000 (GMT) Received: from avscan2.sentex.ca (avscan2.sentex.ca [199.212.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0E6343D54 for ; Fri, 1 Apr 2005 14:50:53 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j31EopPE061689; Fri, 1 Apr 2005 09:50:51 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan2.sentex.ca ([127.0.0.1]) by localhost (avscan2.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 61234-04; Fri, 1 Apr 2005 09:50:51 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j31EooEU061642; Fri, 1 Apr 2005 09:50:50 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j31Eogph031003; Fri, 1 Apr 2005 09:50:42 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050401093603.03253ad0@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Fri, 01 Apr 2005 09:50:16 -0500 To: hselasky@c2i.net From: Mike Tancsa In-Reply-To: <200504011631.51760.hselasky@c2i.net> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <200503311946.23151.hselasky@c2i.net> <6.2.1.2.0.20050331161947.047c6bf0@64.7.153.2> <200504011631.51760.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan2b cc: freebsd-usb@freebsd.org Subject: Re: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 14:50:54 -0000 At 09:31 AM 01/04/2005, Hans Petter Selasky wrote: >What dmsg appears when you attach your device? If "ugen", then make sure you >have got "device ucom" and "device uplcom", in the kernel config file. If you >are loading "ucom"/"uplcom" from modules, make sure that those modules are >re-compiled. Else try to enable debugging and see what happens: Hi, It was showing up as a ucom device. Also, the patches no longer apply cleanly after the MFCs that were done yesterday afternoon. I also have a CURRENT box I can test against if thats easier to try against. Do you know if the patches apply cleanly on it ? Here it is on RELENG_5 as of this morning (bzcat new_usb_1_5_4.diff.bz2 | patch -N -l -d /usr/src) || echo -n Hmm... Looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** sys/i386/include/bus_at386.h.ref Wed Oct 20 21:32:58 2004 |--- sys/i386/include/bus_at386.h Sat Nov 11 11:11:00 2000 -------------------------- Patching file sys/i386/include/bus_at386.h using Plan A... Hunk #1 failed at 67. Hunk #2 succeeded at 293. Hunk #3 succeeded at 303. Hunk #4 succeeded at 329. Hunk #5 succeeded at 339. Hunk #6 succeeded at 365. Hunk #7 succeeded at 375. Hunk #8 succeeded at 421. Hunk #9 succeeded at 432. Hunk #10 succeeded at 474. Hunk #11 succeeded at 485. Hunk #12 succeeded at 527. Hunk #13 succeeded at 538. Hunk #14 succeeded at 686. Hunk #15 succeeded at 696. Hunk #16 succeeded at 722. Hunk #17 succeeded at 732. Hunk #18 succeeded at 758. Hunk #19 succeeded at 768. Hunk #20 succeeded at 815. Hunk #21 succeeded at 826. Hunk #22 succeeded at 868. Hunk #23 succeeded at 879. Hunk #24 succeeded at 921. Hunk #25 succeeded at 932. 1 out of 25 hunks failed--saving rejects to sys/i386/include/bus_at386.h.rej Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** sys/dev/usb/ukbd.c.ref Wed Nov 17 18:56:27 2004 |--- sys/dev/usb/ukbd.c Tue Feb 8 16:32:43 2005 -------------------------- Patching file sys/dev/usb/ukbd.c using Plan A... Hunk #1 succeeded at 53 (offset -1 lines). Hunk #2 succeeded at 238 (offset -1 lines). Hunk #3 succeeded at 685 (offset -1 lines). Hunk #4 succeeded at 693 (offset -1 lines). Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** sys/dev/usb/umass.c.ref Wed Nov 17 18:56:27 2004 |--- sys/dev/usb/umass.c Thu Dec 2 12:39:51 2004 -------------------------- Patching file sys/dev/usb/umass.c using Plan A... Hunk #1 succeeded at 110. Hunk #2 failed at 929. Hunk #3 succeeded at 1198 (offset 19 lines). 1 out of 3 hunks failed--saving rejects to sys/dev/usb/umass.c.rej Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** sys/dev/usb/umodem.c.ref Wed Nov 17 18:56:27 2004 |--- sys/dev/usb/umodem.c Wed Nov 17 18:07:39 2004 -------------------------- Patching file sys/dev/usb/umodem.c using Plan A... Hunk #1 succeeded at 83. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** sys/dev/usb/uvisor.c.ref Wed Nov 17 18:56:27 2004 |--- sys/dev/usb/uvisor.c Wed Nov 17 18:08:05 2004 -------------------------- Patching file sys/dev/usb/uvisor.c using Plan A... Hunk #1 succeeded at 62. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** sys/dev/usb/ucycom.c.ref Sat Jan 8 16:06:02 2005 |--- sys/dev/usb/ucycom.c Sat Jan 8 16:06:24 2005 -------------------------- Patching file sys/dev/usb/ucycom.c using Plan A... Hunk #1 failed at 46. 1 out of 1 hunks failed--saving rejects to sys/dev/usb/ucycom.c.rej Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** sys/dev/usb/hid.c.ref Wed Nov 17 19:57:23 2004 |--- sys/dev/usb/hid.c Wed Nov 17 19:58:38 2004 -------------------------- Patching file sys/dev/usb/hid.c using Plan A... Hunk #1 succeeded at 55. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** sys/dev/usb/usb_quirks.c.ref Wed Nov 17 19:59:07 2004 |--- sys/dev/usb/usb_quirks.c Wed Nov 17 19:59:20 2004 -------------------------- Patching file sys/dev/usb/usb_quirks.c using Plan A... Hunk #1 succeeded at 48. done touch /usr/src/sys/dev/usb/usbdevs touch /usr/src/sys/dev/usb2/* (([ ! -f /usr/src/sys/dev/usb/usbhid.h ] || (cat /usr/src/sys/dev/usb/usbhid.h | grep "include " > /dev/null)) && (cp /usr/src/sys/dev/usb2/usb_hid_copy.h /usr/src/sys/dev/usb/usbhid.h)) || echo -n rm -f /usr/include/dev/usb2/* || echo -n cp -v /usr/src/sys/dev/usb2/*h /usr/include/dev/usb2/ || echo -n /usr/src/sys/dev/usb2/ehci.h -> /usr/include/dev/usb2/ehci.h /usr/src/sys/dev/usb2/usb_quirks.h -> /usr/include/dev/usb2/usb_quirks.h /usr/src/sys/dev/usb2/usb_port.h -> /usr/include/dev/usb2/usb_port.h /usr/src/sys/dev/usb2/usb_hid_copy.h -> /usr/include/dev/usb2/usb_hid_copy.h /usr/src/sys/dev/usb2/usb_hid.h -> /usr/include/dev/usb2/usb_hid.h /usr/src/sys/dev/usb2/usb.h -> /usr/include/dev/usb2/usb.h /usr/src/sys/dev/usb2/uhci.h -> /usr/include/dev/usb2/uhci.h /usr/src/sys/dev/usb2/ohci.h -> /usr/include/dev/usb2/ohci.h /usr/src/sys/dev/usb2/hid.h -> /usr/include/dev/usb2/hid.h /usr/src/sys/dev/usb2/usb_subr.h -> /usr/include/dev/usb2/usb_subr.h cat /usr/src/include/Makefile | sed -e s/" dev\/usb2 "/""/g | sed -e s/"LSUBDIRS="/"LSUBDIRS= dev\/usb2 "/g > tempfile cat tempfile > /usr/src/include/Makefile cat /usr/src/sys/conf/kmod.mk | sed -e s/"@\/dev\/usb\/usbdevs -h"/"@\/dev\/usb\/usbdevs"/g | sed -e s/"@\/dev\/usb\/usbdevs -d"/"@\/dev\/usb\/usbdevs"/g > tempfile cat tempfile > /usr/src/sys/conf/kmod.mk [releng5-865]# ---Mike From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 15:04:18 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80D8B16A4CE for ; Fri, 1 Apr 2005 15:04:18 +0000 (GMT) Received: from mail.r.caley.org.uk (82-41-208-48.cable.ubr12.edin.blueyonder.co.uk [82.41.208.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F88B43D49 for ; Fri, 1 Apr 2005 15:04:17 +0000 (GMT) (envelope-from rjc@caley.org.uk) Received: from pele.r.caley.org.uk (pele.r.caley.org.uk [10.0.0.12]) by mail.r.caley.org.uk (8.13.3/8.13.3) with ESMTP id j31F4EIi073496; Fri, 1 Apr 2005 16:04:14 +0100 (BST) (envelope-from rjc@caley.org.uk) Received: from pele.r.caley.org.uk (localhost [127.0.0.1]) by pele.r.caley.org.uk (8.13.3/8.13.3) with ESMTP id j31F4EH3000718; Fri, 1 Apr 2005 16:04:14 +0100 (BST) (envelope-from rjc@pele.r.caley.org.uk) Received: (from rjc@localhost) by pele.r.caley.org.uk (8.13.3/8.13.3/Submit) id j31F4DUv000717; Fri, 1 Apr 2005 16:04:13 +0100 (BST) (envelope-from rjc) Date: Fri, 1 Apr 2005 16:04:13 +0100 (BST) Message-Id: <200504011504.j31F4DUv000717@pele.r.caley.org.uk> From: Richard Caley To: ticso@cicely.de In-Reply-To: Bernd Walter's message of Thu, 31 Mar 2005 14:30:08 +0200 References: <20050331123008.GC2072@cicely12.cicely.de> X-Dragon: Yevaud Organisation: Interactive Information Ltd. cc: freebsd-usb@freebsd.org Subject: Re: USB Modems X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 15:04:18 -0000 > I don't think it makes much sense to build a tty without AT command set. Looks like a substantial number of the USB modems are exactly that. I even found a customer comment on an online shop that the current USR one is a Winmodem. Argh! I had always had them down as a worthwhile company. I haven't found ANY recent comment anywhere on the Web or Usenet from someone who is sucessfully using a USB modem which I can find for sale with BSD or Linux. There is a Zoom one which is advertised as being Mac compatable. I wonder if that means it's real or they just have Mac software to drive a pretended one. -- rjc@interactive.co.uk _O_ |< From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 15:42:05 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1921016A4CE for ; Fri, 1 Apr 2005 15:42:05 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5426D43D1F for ; Fri, 1 Apr 2005 15:42:04 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j31FdC9K004131; Fri, 1 Apr 2005 08:39:12 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 01 Apr 2005 08:39:24 -0700 (MST) Message-Id: <20050401.083924.40995198.imp@bsdimp.com> To: rjc@interactive.co.uk From: "M. Warner Losh" In-Reply-To: <200504011504.j31F4DUv000717@pele.r.caley.org.uk> References: <20050331123008.GC2072@cicely12.cicely.de> <200504011504.j31F4DUv000717@pele.r.caley.org.uk> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: USB Modems X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 15:42:05 -0000 In message: <200504011504.j31F4DUv000717@pele.r.caley.org.uk> Richard Caley writes: : I haven't found ANY recent comment anywhere on the Web or Usenet from : someone who is sucessfully using a USB modem which I can find for sale : with BSD or Linux. My cell phones (Sanyo CP-4900 and RL-4920) both show up as a umodem and work flawlessly. Warner From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 16:12:40 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 44B4916A4CE for ; Fri, 1 Apr 2005 16:12:40 +0000 (GMT) Received: from avscan2.sentex.ca (avscan2.sentex.ca [199.212.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4AA443D1F for ; Fri, 1 Apr 2005 16:12:39 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j31GCbJp085330; Fri, 1 Apr 2005 11:12:37 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan2.sentex.ca ([127.0.0.1]) by localhost (avscan2.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 85119-03; Fri, 1 Apr 2005 11:12:37 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j31GCad4085307; Fri, 1 Apr 2005 11:12:37 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j31GCUH6031353; Fri, 1 Apr 2005 11:12:30 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050401111048.04026928@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Fri, 01 Apr 2005 11:12:01 -0500 To: "M. Warner Losh" From: Mike Tancsa In-Reply-To: <20050401.083924.40995198.imp@bsdimp.com> References: <20050331123008.GC2072@cicely12.cicely.de> <200504011504.j31F4DUv000717@pele.r.caley.org.uk> <20050401.083924.40995198.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan2b cc: freebsd-usb@freebsd.org Subject: Re: USB Modems X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 16:12:40 -0000 At 10:39 AM 01/04/2005, M. Warner Losh wrote: >In message: <200504011504.j31F4DUv000717@pele.r.caley.org.uk> > Richard Caley writes: >: I haven't found ANY recent comment anywhere on the Web or Usenet from >: someone who is sucessfully using a USB modem which I can find for sale >: with BSD or Linux. > >My cell phones (Sanyo CP-4900 and RL-4920) both show up as a umodem >and work flawlessly. What underlying drivers do they use ? Also, do you have anything special configured in ppp ? ---Mike From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 16:26:41 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1679C16A4CE for ; Fri, 1 Apr 2005 16:26:41 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B7C443D49 for ; Fri, 1 Apr 2005 16:26:40 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j31GOME9004661; Fri, 1 Apr 2005 09:24:22 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 01 Apr 2005 09:24:33 -0700 (MST) Message-Id: <20050401.092433.108769012.imp@bsdimp.com> To: mike@sentex.net From: "M. Warner Losh" In-Reply-To: <6.2.1.2.0.20050401111048.04026928@64.7.153.2> References: <200504011504.j31F4DUv000717@pele.r.caley.org.uk> <20050401.083924.40995198.imp@bsdimp.com> <6.2.1.2.0.20050401111048.04026928@64.7.153.2> X-Mailer: Mew version 3.3 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-usb@freebsd.org Subject: Re: USB Modems X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 16:26:41 -0000 In message: <6.2.1.2.0.20050401111048.04026928@64.7.153.2> Mike Tancsa writes: : At 10:39 AM 01/04/2005, M. Warner Losh wrote: : >In message: <200504011504.j31F4DUv000717@pele.r.caley.org.uk> : > Richard Caley writes: : >: I haven't found ANY recent comment anywhere on the Web or Usenet from : >: someone who is sucessfully using a USB modem which I can find for sale : >: with BSD or Linux. : > : >My cell phones (Sanyo CP-4900 and RL-4920) both show up as a umodem : >and work flawlessly. : : What underlying drivers do they use ? Also, do you have anything special : configured in ppp ? umodem, like I said. ppp is bog simple: sprint: set device /dev/ttyU0 set speed 230400 set phone "#777" set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ \"\" AT OK-AT-OK ATE1Q0 OK AT+IFC=2,2 OK AT+IPR=230400 OK \\dATD\\T TIMEOUT 100 CONNECT" add default HISADDR # Add a (sticky) default route Warner From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 16:55:41 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4A1E16A4CE for ; Fri, 1 Apr 2005 16:55:41 +0000 (GMT) Received: from avscan2.sentex.ca (avscan2.sentex.ca [199.212.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60B5E43D31 for ; Fri, 1 Apr 2005 16:55:41 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j31GtZx7097791; Fri, 1 Apr 2005 11:55:40 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan2.sentex.ca ([127.0.0.1]) by localhost (avscan2.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 97479-02; Fri, 1 Apr 2005 11:55:35 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j31GtZX6097615; Fri, 1 Apr 2005 11:55:35 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j31GtSjx031552; Fri, 1 Apr 2005 11:55:28 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050401114917.04ec24a0@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Fri, 01 Apr 2005 11:55:00 -0500 To: "M. Warner Losh" From: Mike Tancsa In-Reply-To: <20050401.092433.108769012.imp@bsdimp.com> References: <200504011504.j31F4DUv000717@pele.r.caley.org.uk> <20050401.083924.40995198.imp@bsdimp.com> <6.2.1.2.0.20050401111048.04026928@64.7.153.2> <20050401.092433.108769012.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan2b cc: freebsd-usb@freebsd.org Subject: Re: USB Modems X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 16:55:41 -0000 At 11:24 AM 01/04/2005, M. Warner Losh wrote: > set device /dev/ttyU0 Hmmm... This seems to be the issue for me, HEAD vs RELENG_5. With my RELENG_5 machine, I can panic it fairly quickly. So far on my one HEAD box, doing the same test in http://www.freebsd.org/cgi/query-pr.cgi?pr=79420 Does not panic / crash the box like it does in RELENG_5. ---Mike From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 19:34:09 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF50116A4CE for ; Fri, 1 Apr 2005 19:34:09 +0000 (GMT) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF4D343D54 for ; Fri, 1 Apr 2005 19:34:08 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-217-229-134.daxnet.no ([193.217.229.134] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 4.2.9) with ESMTP id 333054779; Fri, 01 Apr 2005 21:34:06 +0200 From: Hans Petter Selasky To: Mike Tancsa Date: Fri, 1 Apr 2005 21:35:06 +0200 User-Agent: KMail/1.7 References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <200504011631.51760.hselasky@c2i.net> <6.2.1.2.0.20050401093603.03253ad0@64.7.153.2> In-Reply-To: <6.2.1.2.0.20050401093603.03253ad0@64.7.153.2> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200504012135.07798.hselasky@c2i.net> cc: freebsd-usb@freebsd.org Subject: Re: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hselasky@c2i.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 19:34:09 -0000 On Friday 01 April 2005 16:50, Mike Tancsa wrote: > At 09:31 AM 01/04/2005, Hans Petter Selasky wrote: > >What dmsg appears when you attach your device? If "ugen", then make sure > > you have got "device ucom" and "device uplcom", in the kernel config > > file. If you are loading "ucom"/"uplcom" from modules, make sure that > > those modules are re-compiled. Else try to enable debugging and see what > > happens: > > Hi, > It was showing up as a ucom device. Also, the patches no longer > apply cleanly after the MFCs that were done yesterday afternoon. I also > have a CURRENT box I can test against if thats easier to try against. Do > you know if the patches apply cleanly on it ? > Some patches will fail, but that is OK until further. I am not sure if the driver will install cleanly with 6-current. Last time I checked was in February. Yours --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 19:45:09 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61BBB16A4CE for ; Fri, 1 Apr 2005 19:45:09 +0000 (GMT) Received: from md1.swissinfo.org (md1.swissinfo.org [146.159.4.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8285343D39 for ; Fri, 1 Apr 2005 19:45:08 +0000 (GMT) (envelope-from sebastien.b@swissinfo.org) Received: from mail.swissinfo.org ([194.6.181.33]) by md1.swissinfo.org (phad1.swissinfo.org [146.159.6.9]) (MDaemon.PRO.v7.2.1.R) with ESMTP id 20-md50000378135.msg for ; Fri, 01 Apr 2005 21:41:54 +0200 Received: from AAmiens-152-1-45-158.w83-198.abo.wanadoo.fr (83.198.164.158) by mail.swissinfo.org (7.0.020) (authenticated as sebastien.b) id 4153942002DECB89; Fri, 1 Apr 2005 21:45:01 +0200 From: Sebastien B To: freebsd-usb@freebsd.org Date: Fri, 1 Apr 2005 21:44:10 +0200 User-Agent: KMail/1.8 References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <6.2.1.2.0.20050331074641.04f72eb8@64.7.153.2> <200503311946.23151.hselasky@c2i.net> In-Reply-To: <200503311946.23151.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504012144.11468.sebastien.b@swissinfo.org> X-Spam-Processed: phad1.swissinfo.org, Fri, 01 Apr 2005 21:41:54 +0200 (not processed: message from valid local sender) X-MDRemoteIP: 194.6.181.33 X-Return-Path: sebastien.b@swissinfo.org X-MDaemon-Deliver-To: freebsd-usb@freebsd.org X-MDAV-Processed: phad1.swissinfo.org, Fri, 01 Apr 2005 21:41:58 +0200 Subject: Re: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 19:45:09 -0000 > When one is designing a driver, it is very convenient if USB-transfers can > be stopped/started from the callback of another USB-transfer. I have run exactly into the same trouble by calling usbd_bulk_transfer() from a software interrupt handler (scheduled to run from the context of the start procedure of a network interface in order to send packets). The kernel panics with "ehci_abort_xfer: not in process context" a few while after the transfer. Is it the same problem ? Is a software interrupt handler unsuitable for the abort xfer function ? How can I fix it, by using a task queue instead of a software interrupt handler ? Regards, Sebastien From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 21:16:56 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB64116A4CE for ; Fri, 1 Apr 2005 21:16:56 +0000 (GMT) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28CF243D31 for ; Fri, 1 Apr 2005 21:16:56 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-217-228-195.daxnet.no ([193.217.228.195] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 4.2.9) with ESMTP id 135480545; Fri, 01 Apr 2005 23:16:54 +0200 From: Hans Petter Selasky To: Sebastien B Date: Fri, 1 Apr 2005 23:17:53 +0200 User-Agent: KMail/1.7 References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <200503311946.23151.hselasky@c2i.net> <200504012144.11468.sebastien.b@swissinfo.org> In-Reply-To: <200504012144.11468.sebastien.b@swissinfo.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504012317.54966.hselasky@c2i.net> cc: freebsd-usb@freebsd.org Subject: Re: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hselasky@c2i.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 21:16:57 -0000 On Friday 01 April 2005 21:44, Sebastien B wrote: > > When one is designing a driver, it is very convenient if USB-transfers > > can be stopped/started from the callback of another USB-transfer. > > I have run exactly into the same trouble by calling usbd_bulk_transfer() > from a software interrupt handler (scheduled to run from the context of the > start procedure of a network interface in order to send packets). The > kernel panics with "ehci_abort_xfer: not in process context" a few while > after the transfer. Is it the same problem ? Is a software interrupt > handler unsuitable for the abort xfer function ? How can I fix it, by using > a task queue instead of a software interrupt handler ? > Regards, > Sebastien With the existing USB driver you cannot call usbd_abort_pipe() nor usbd_bulk_transfer(), from an interrupt context or callback, because those functions will sleep. You can call usbd_transfer(), if the transfer is not synchronous. But the panic is a bug, and it might be because the ehci_abort_xfer() function is called from the transfer's timeout function? The solution is to use DELAY() instead of tsleep() and usb_delay_ms(). Yours --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 21:32:45 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 867E016A4CF; Fri, 1 Apr 2005 21:32:45 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id A001F43D1D; Fri, 1 Apr 2005 21:32:44 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j31LWasf018687 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 1 Apr 2005 23:32:39 +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.10/8.12.10) with ESMTP id j31LVehs024325 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 1 Apr 2005 23:31:40 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j31LVdWQ071789; Fri, 1 Apr 2005 23:31:39 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j31LVdoj071788; Fri, 1 Apr 2005 23:31:39 +0200 (CEST) (envelope-from ticso) Date: Fri, 1 Apr 2005 23:31:39 +0200 From: Bernd Walter To: Hans Petter Selasky , iedowse@freebsd.org Message-ID: <20050401213138.GQ2072@cicely12.cicely.de> References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <200503311946.23151.hselasky@c2i.net> <200504012144.11468.sebastien.b@swissinfo.org> <200504012317.54966.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200504012317.54966.hselasky@c2i.net> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0022] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: Sebastien B cc: freebsd-usb@freebsd.org Subject: Re: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 21:32:45 -0000 On Fri, Apr 01, 2005 at 11:17:53PM +0200, Hans Petter Selasky wrote: > On Friday 01 April 2005 21:44, Sebastien B wrote: > > > When one is designing a driver, it is very convenient if USB-transfers > > > can be stopped/started from the callback of another USB-transfer. > > > > I have run exactly into the same trouble by calling usbd_bulk_transfer() > > from a software interrupt handler (scheduled to run from the context of the > > start procedure of a network interface in order to send packets). The > > kernel panics with "ehci_abort_xfer: not in process context" a few while > > after the transfer. Is it the same problem ? Is a software interrupt > > handler unsuitable for the abort xfer function ? How can I fix it, by using > > a task queue instead of a software interrupt handler ? > > Regards, > > Sebastien > > With the existing USB driver you cannot call usbd_abort_pipe() nor > usbd_bulk_transfer(), from an interrupt context or callback, because those > functions will sleep. You can call usbd_transfer(), if the transfer is not > synchronous. this is not really true. Under 5.x only fast interrupt handlers are running in interrupt context. It should be perfectly OK to sleep in a callback function. > But the panic is a bug, and it might be because the ehci_abort_xfer() function > is called from the transfer's timeout function? Likely something in this line. AFAIK timer events are directly called from the interrupt handler. > The solution is to use DELAY() instead of tsleep() and usb_delay_ms(). This is wrong either way - wasting cycles in interrupt context is bad. IMO the timeout function should trigger a softint doing the real job. Maybe Ian has an idea about this - he did a lot in respect to timeout and aborting xfers lately and should be familar with this point. To be shure it still exists you should verify with latest code. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 22:06:08 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 399F516A4CE; Fri, 1 Apr 2005 22:06:08 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6C7343D55; Fri, 1 Apr 2005 22:06:07 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j31M2sw7033984; Fri, 1 Apr 2005 15:02:54 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 01 Apr 2005 15:02:54 -0700 (MST) Message-Id: <20050401.150254.74727545.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely12.cicely.de From: Warner Losh In-Reply-To: <20050401213138.GQ2072@cicely12.cicely.de> References: <200504012144.11468.sebastien.b@swissinfo.org> <200504012317.54966.hselasky@c2i.net> <20050401213138.GQ2072@cicely12.cicely.de> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: sebastien.b@swissinfo.org cc: freebsd-usb@FreeBSD.ORG cc: iedowse@FreeBSD.ORG Subject: Re: panic: uhci_abort_xfer: not in process context X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 22:06:08 -0000 > > The solution is to use DELAY() instead of tsleep() and usb_delay_ms(). > > This is wrong either way - wasting cycles in interrupt context is bad. > IMO the timeout function should trigger a softint doing the real job. > Maybe Ian has an idea about this - he did a lot in respect to timeout > and aborting xfers lately and should be familar with this point. > To be shure it still exists you should verify with latest code. I have a set of patches that convert the bridge interrupt routines into a taskqueue. I did that so that we can mark them as non-giant holding ISRs. This would be a reasonable context to do things like sleeping from. However, you'd want to avoid that as much as possible because sleeping for one request would block all the others in the queue.... Warner From owner-freebsd-usb@FreeBSD.ORG Sat Apr 2 05:40:06 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 970DB16A4CE for ; Sat, 2 Apr 2005 05:40:06 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4694B43D39 for ; Sat, 2 Apr 2005 05:40:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j325e6Mj067837 for ; Sat, 2 Apr 2005 05:40:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j325e619067836; Sat, 2 Apr 2005 05:40:06 GMT (envelope-from gnats) Resent-Date: Sat, 2 Apr 2005 05:40:06 GMT Resent-Message-Id: <200504020540.j325e619067836@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Anthony Ginepro Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7636E16A4CE for ; Sat, 2 Apr 2005 05:37:59 +0000 (GMT) Received: from renaissance.homeip.net (m197.net81-67-151.noos.fr [81.67.151.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id D685543D48 for ; Sat, 2 Apr 2005 05:37:58 +0000 (GMT) (envelope-from rapiere@renaissance.homeip.net) Received: from renaissance.homeip.net (localhost [127.0.0.1]) by renaissance.homeip.net (Postfix) with ESMTP id 45A70206E for ; Sat, 2 Apr 2005 07:37:57 +0200 (CEST) Received: (from rapiere@localhost) by renaissance.homeip.net (8.13.3/8.13.1/Submit) id j325buK8001163; Sat, 2 Apr 2005 07:37:56 +0200 (CEST) (envelope-from rapiere) Message-Id: <200504020537.j325buK8001163@renaissance.homeip.net> Date: Sat, 2 Apr 2005 07:37:56 +0200 (CEST) From: Anthony Ginepro To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: usb/79436: Panic: ohci_abort_xfer: not in process context X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Anthony Ginepro List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 05:40:06 -0000 >Number: 79436 >Category: usb >Synopsis: Panic: ohci_abort_xfer: not in process context >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Apr 02 05:40:05 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Anthony Ginepro >Release: FreeBSD 5.4-PRERELEASE i386 >Organization: >Environment: System: FreeBSD renaissance.homeip.net 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #2: Fri Apr 1 19:46:23 CEST 2005 rapiere@renaissance.homeip.net:/usr/obj/usr/src/sys/CUSTOM_20050323 i386 Palm T3 >Description: When plugging T3 in craddle, the kernel panics in a few seconds after (due to some action in ppp), it either get caught in one of this panic strings: - ohci_abort_xfer: not in process context - page fault Here is the backtrace got from coredump : #0 doadump () at pcpu.h:159 #1 0xc066b695 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:410 #2 0xc066bd5f in panic (fmt=0xc08a3f48 "%s") at /usr/src/sys/kern/kern_shutdown.c:566 #3 0xc085913a in trap_fatal (frame=0xeafa2a94, eva=36) at /usr/src/sys/i386/i386/trap.c:809 #4 0xc08593c8 in trap_pfault (frame=0xeafa2a94, usermode=0, eva=36) at /usr/src/sys/i386/i386/trap.c:727 #5 0xc0859797 in trap (frame= {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = 0, tf_esi = -1035738880, tf_ebp = -352703744, tf_isp = -352703808, tf_ebx = -1027336832, tf_edx = 0, tf_ecx = -1034872960, tf_eax = 741973904, tf_trapno = 12, tf_err = 0, tf_eip = -1067549854, tf_cs = 8, tf_eflags = 66054, tf_esp = -1034866688, tf_ss = 20}) at /usr/src/sys/i386/i386/trap.c:417 #6 0xc084841a in calltrap () at /usr/src/sys/i386/i386/exception.s:140 #7 0x00000018 in ?? () #8 0x00000010 in ?? () #9 0x00000010 in ?? () #10 0x00000000 in ?? () #11 0xc243e100 in ?? () #12 0xeafa2b00 in ?? () #13 0xeafa2ac0 in ?? () #14 0xc2c41580 in ?? () #15 0x00000000 in ?? () #16 0xc2511780 in ?? () #17 0x2c399f90 in ?? () #18 0x0000000c in ?? () #19 0x00000000 in ?? () #20 0xc05e7b62 in ohci_abort_xfer (xfer=0xc243e100, status=USBD_NORMAL_COMPLETION) at /usr/src/sys/dev/usb/ohci.c:2353 #21 0xc05fbf52 in usbd_abort_pipe (pipe=0xc2c41580) at /usr/src/sys/dev/usb/usbdi.c:762 #22 0xc0ab6461 in ?? () #23 0xc2c41580 in ?? () #24 0x00000000 in ?? () #25 0x00000059 in ?? () #26 0xc0ab7214 in ?? () #27 0x00000064 in ?? () #28 0xc2de8400 in ?? () #29 0xeafa2b48 in ?? () #30 0xc0ab6590 in ?? () #31 0xc2de8400 in ?? () #32 0x00000003 in ?? () #33 0xc2eb8738 in ?? () #34 0x00000004 in ?? () #35 0xeafa2b7c in ?? () #36 0xc0624bc1 in spec_close (ap=0xc2de8400) at /usr/src/sys/fs/specfs/spec_vnops.c:637 >How-To-Repeat: Here are the lines in /etc/usbd.conf : device "Palm Handheld Device" devname "ucom0" vendor 0x0830 product 0x0060 attach "/usr/sbin/ppp -background -unit0 palm; /etc/rc.d/named restart" detach "/bin/sh /root/close-palm.sh" in /boot/loader.conf : # palmt3 cradle uvisor_load="YES" >Fix: Don't ever plug T3, however won't be so nice for synchronization. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Sat Apr 2 09:02:12 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D00416A4CE for ; Sat, 2 Apr 2005 09:02:12 +0000 (GMT) Received: from md1.swissinfo.org (md1.swissinfo.org [146.159.4.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 656FD43D48 for ; Sat, 2 Apr 2005 09:02:11 +0000 (GMT) (envelope-from sebastien.b@swissinfo.org) Received: from mail.swissinfo.org ([194.6.181.33]) by md1.swissinfo.org (phad1.swissinfo.org [146.159.6.9]) (MDaemon.PRO.v7.2.1.R) with ESMTP id 42-md50000378823.msg for ; Sat, 02 Apr 2005 10:58:55 +0200 Received: from AAmiens-152-1-7-241.w83-192.abo.wanadoo.fr (83.192.68.241) by mail.swissinfo.org (7.0.020) (authenticated as sebastien.b) id 4153942002E02EC0; Sat, 2 Apr 2005 11:02:00 +0200 From: Sebastien B To: freebsd-usb@freebsd.org, hselasky@c2i.net Date: Sat, 2 Apr 2005 11:01:10 +0200 User-Agent: KMail/1.8 References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <200504012144.11468.sebastien.b@swissinfo.org> <200504012317.54966.hselasky@c2i.net> In-Reply-To: <200504012317.54966.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504021101.11602.sebastien.b@swissinfo.org> X-Spam-Processed: phad1.swissinfo.org, Sat, 02 Apr 2005 10:58:55 +0200 (not processed: message from valid local sender) X-MDRemoteIP: 194.6.181.33 X-Return-Path: sebastien.b@swissinfo.org X-MDaemon-Deliver-To: freebsd-usb@freebsd.org X-MDAV-Processed: phad1.swissinfo.org, Sat, 02 Apr 2005 10:59:01 +0200 Subject: Re: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 09:02:12 -0000 > > The > > kernel panics with "ehci_abort_xfer: not in process context" a few while > > after the transfer. Is it the same problem ? Is a software interrupt > > handler unsuitable for the abort xfer function ? How can I fix it, by > > using a task queue instead of a software interrupt handler ? > > Regards, > > Sebastien > > With the existing USB driver you cannot call usbd_abort_pipe() nor > usbd_bulk_transfer(), from an interrupt context or callback, because those > functions will sleep. Does a software interrupt handler run in interrupt context ? And what about task queue threads ? Anyway, it doesn't crash while my software interrupt handler is running, but later in the "usbtask" thread. > You can call usbd_transfer(), if the transfer is not > synchronous. But it is. To send network packets, I must perform two USB transfers on two different endpoints, and I must wait for the first one to complete before initiating the second. From owner-freebsd-usb@FreeBSD.ORG Sat Apr 2 10:37:00 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B97DC16A4CE; Sat, 2 Apr 2005 10:37:00 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DD7C43D55; Sat, 2 Apr 2005 10:37:00 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j32Aamsf039054 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Sat, 2 Apr 2005 12:36:49 +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.10/8.12.10) with ESMTP id j32AaWhs028653 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Apr 2005 12:36:33 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j32AaWdN028651; Sat, 2 Apr 2005 12:36:32 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j32AaPJ5028650; Sat, 2 Apr 2005 12:36:25 +0200 (CEST) (envelope-from ticso) Date: Sat, 2 Apr 2005 12:36:25 +0200 From: Bernd Walter To: Warner Losh Message-ID: <20050402103624.GS2072@cicely12.cicely.de> References: <200504012144.11468.sebastien.b@swissinfo.org> <200504012317.54966.hselasky@c2i.net> <20050401213138.GQ2072@cicely12.cicely.de> <20050401.150254.74727545.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050401.150254.74727545.imp@bsdimp.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0010] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: ticso@cicely12.cicely.de cc: sebastien.b@swissinfo.org cc: iedowse@FreeBSD.ORG cc: ticso@cicely.de cc: freebsd-usb@FreeBSD.ORG Subject: Re: panic: uhci_abort_xfer: not in process context X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 10:37:00 -0000 On Fri, Apr 01, 2005 at 03:02:54PM -0700, Warner Losh wrote: > > > The solution is to use DELAY() instead of tsleep() and usb_delay_ms(). > > > > This is wrong either way - wasting cycles in interrupt context is bad. > > IMO the timeout function should trigger a softint doing the real job. > > Maybe Ian has an idea about this - he did a lot in respect to timeout > > and aborting xfers lately and should be familar with this point. > > To be shure it still exists you should verify with latest code. > > I have a set of patches that convert the bridge interrupt routines > into a taskqueue. I did that so that we can mark them as non-giant > holding ISRs. This would be a reasonable context to do things like > sleeping from. However, you'd want to avoid that as much as possible > because sleeping for one request would block all the others in the > queue.... bridge = host controller? Sounds interesting. But I also don't understand the panic either. Timeouts seem to be handled but usbtask already, but this isn't a timeout anyway. It is aborting the receive xfer on ucom close and this is triggered by a userland close(2) call - no interrupt. In ohci.c it does: if (xfer->device->bus->intr_context || !curproc) panic("ohci_abort_xfer: not in process context"); OK - this one is from ohci, but they are all the same. intr_context is raised on interrupt handler start and decreased later. It seems that there is an artifical limitation that we are not allowed to sleep when processing USB interrupts. If one really goes to sleep a userland call might come in and has this variable raised. I don't know why it enforces not to be in interrupt context, maybe because of the long delays required to take an abort. But in this case it triggers wrong. In the meantime it should be safe not to check the intr_context part. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Sat Apr 2 11:16:06 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AA3216A4CE for ; Sat, 2 Apr 2005 11:16:06 +0000 (GMT) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C4FB43D31 for ; Sat, 2 Apr 2005 11:16:05 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-217-228-17.daxnet.no ([193.217.228.17] verified) by mailfe03.swip.net (CommuniGate Pro SMTP 4.2.9) with ESMTP id 136272821; Sat, 02 Apr 2005 13:16:03 +0200 From: Hans Petter Selasky To: Sebastien B Date: Sat, 2 Apr 2005 13:16:55 +0200 User-Agent: KMail/1.7 References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <200504012317.54966.hselasky@c2i.net> <200504021101.11602.sebastien.b@swissinfo.org> In-Reply-To: <200504021101.11602.sebastien.b@swissinfo.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504021316.59434.hselasky@c2i.net> cc: freebsd-usb@freebsd.org Subject: Re: panic: uhci_abort_xfer: not in process context X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hselasky@c2i.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 11:16:06 -0000 On Saturday 02 April 2005 11:01, Sebastien B wrote: > > > The > > > kernel panics with "ehci_abort_xfer: not in process context" a few > > > while after the transfer. Is it the same problem ? Is a software > > > interrupt handler unsuitable for the abort xfer function ? How can I > > > fix it, by using a task queue instead of a software interrupt handler ? > > > Regards, > > > Sebastien > > > > With the existing USB driver you cannot call usbd_abort_pipe() nor > > usbd_bulk_transfer(), from an interrupt context or callback, because > > those functions will sleep. > > Does a software interrupt handler run in interrupt context? > And what about task queue threads ? > Anyway, it doesn't crash while my software interrupt handler is running, > but later in the "usbtask" thread. The problem is that the USB-callback() must return, in order to have other USB-callbacks() called, because the callbacks are called in serial from the same thread. While you are in the callback you are blocking "the USB system". In my USB driver I have introduced a transfer flag called "USBD_USE_POLLING" that will allow this. When one starts a transfer from a callback with this flag set, it will poll the interrupt handler until the transfer is finished. This will block the USB-system for less than 1 ms. Using this flag can save some code and complexity. But the best solution is to "chain" transfers, having the callback of a transfer call the start routine of the next transfer. > > > You can call usbd_transfer(), if the transfer is not > > synchronous. > > But it is. To send network packets, I must perform two USB transfers on two > different endpoints, and I must wait for the first one to complete before > initiating the second. What you need to do is to allocate two [non synchronous] transfers besides from the data transfer. The callback of the first transfer starts the second transfer. The callback of the second transfer starts the data transfer. Then you need to make a flag so that the first transfer is not started again, before the data transfer has been started. Also you need to make sure that these extra transfers are aborted at device attach. Yours --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Apr 2 13:16:49 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 293E916A4CE for ; Sat, 2 Apr 2005 13:16:49 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 1EE7C43D49 for ; Sat, 2 Apr 2005 13:16:48 +0000 (GMT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 2 Apr 2005 14:16:41 +0100 (BST) To: Mike Tancsa In-Reply-To: Your message of "Thu, 31 Mar 2005 07:49:58 CDT." <6.2.1.2.0.20050331074641.04f72eb8@64.7.153.2> Date: Sat, 02 Apr 2005 14:16:39 +0100 From: Ian Dowse Message-ID: <200504021416.aa22417@salmon.maths.tcd.ie> cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 13:16:49 -0000 In message <6.2.1.2.0.20050331074641.04f72eb8@64.7.153.2>, Mike Tancsa writes: >panic: uhci_abort_xfer: not in process context ... >#6 0xc04d2c1f in usbd_abort_pipe (pipe=0xc19c7e00) >#7 0xc04c3cf5 in ucomstopread (sc=0x0) >#8 0xc04c38ba in ucomstop (tp=0xc171c000, flag=1) >#9 0xc054b393 in ttyflush (tp=0xc171c000, rw=1) >#10 0xc054974d in ttyinput (c=26, tp=0xc171c000) In this case I wonder if the transfer needs to be aborted at all, since it is just restarted immediately afterwards. Mike, maybe you could try the following patch? Sorry, I haven't tested this, so I may be missing something obvious. Ian Index: dev/usb/ucom.c =================================================================== RCS file: /dump/FreeBSD-CVS/src/sys/dev/usb/ucom.c,v retrieving revision 1.51.2.2 diff -u -r1.51.2.2 ucom.c --- dev/usb/ucom.c 30 Jan 2005 01:00:10 -0000 1.51.2.2 +++ dev/usb/ucom.c 2 Apr 2005 13:10:27 -0000 @@ -929,11 +929,13 @@ DPRINTF(("ucomstop: %d\n", flag)); +#if 0 if (flag & FREAD) { DPRINTF(("ucomstop: read\n")); ucomstopread(sc); ucomstartread(sc); } +#endif if (flag & FWRITE) { DPRINTF(("ucomstop: write\n")); From owner-freebsd-usb@FreeBSD.ORG Sat Apr 2 14:29:44 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D153C16A4CE for ; Sat, 2 Apr 2005 14:29:44 +0000 (GMT) Received: from avscan2.sentex.ca (avscan2.sentex.ca [199.212.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D63143D1D for ; Sat, 2 Apr 2005 14:29:44 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j32ETeDx088173; Sat, 2 Apr 2005 09:29:40 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan2.sentex.ca ([127.0.0.1]) by localhost (avscan2.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 88041-02; Sat, 2 Apr 2005 09:29:40 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan2.sentex.ca (8.12.11/8.12.11) with ESMTP id j32ETegK088168; Sat, 2 Apr 2005 09:29:40 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id j32ETXQv034493; Sat, 2 Apr 2005 09:29:33 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050402092137.06bfe450@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Sat, 02 Apr 2005 09:28:32 -0500 To: Ian Dowse From: Mike Tancsa In-Reply-To: <200504021416.aa22417@salmon.maths.tcd.ie> References: <200504021416.aa22417@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan2b cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: panic: uhci_abort_xfer: not in process context (was Re: uplcom / ucom problems on RELENG_5) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 14:29:45 -0000 At 08:16 AM 02/04/2005, Ian Dowse wrote: >In message <6.2.1.2.0.20050331074641.04f72eb8@64.7.153.2>, Mike Tancsa writes: > >panic: uhci_abort_xfer: not in process context >... > >#6 0xc04d2c1f in usbd_abort_pipe (pipe=0xc19c7e00) > >#7 0xc04c3cf5 in ucomstopread (sc=0x0) > >#8 0xc04c38ba in ucomstop (tp=0xc171c000, flag=1) > >#9 0xc054b393 in ttyflush (tp=0xc171c000, rw=1) > >#10 0xc054974d in ttyinput (c=26, tp=0xc171c000) > >In this case I wonder if the transfer needs to be aborted at all, >since it is just restarted immediately afterwards. Mike, maybe you >could try the following patch? Sorry, I haven't tested this, so I >may be missing something obvious. Yes, for sure I will try. One other note, I have been hammering away on a HEAD box for 36hrs now and no panic and even better, NO lockups on the USB serial port. The hardware is a little different, but I dont think that is the issue. [hifn]% dmesg Copyright (c) 1992-2005 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.0-CURRENT #0: Fri Apr 1 02:20:32 EST 2005 mdtancsa@hifn.sentex.net:/usr/obj/usr/src/sys/recycle Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Celeron(TM) CPU 1000MHz (1002.28-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x6b1 Stepping = 1 Features=0x383f9ff real memory = 528416768 (503 MB) avail memory = 507805696 (484 MB) npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 cpu0: on acpi0 acpi_throttle0: on cpu0 acpi_button0: on acpi0 acpi_button1: on acpi0 pcib0: port 0xcf8-0xcff,0x4000-0x407f,0x4080-0x40ff,0x5000-0x500f,0x6000-0x607f on acpi0 pci_link0: irq 12 on acpi0 pci_link1: irq 11 on acpi0 pci_link2: irq 10 on acpi0 pci_link3: irq 5 on acpi0 pci0: on pcib0 agp0: mem 0xe0000000-0xe3ffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at device 0.0 (no driver attached) isab0: at device 7.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xc000-0xc00f at device 7.1 on pci0 ata0: on atapci0 ata1: on atapci0 uhci0: port 0xc400-0xc41f irq 5 at device 7.2 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xc800-0xc81f irq 5 at device 7.3 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered pci0: at device 7.4 (no driver attached) pci0: at device 7.5 (no driver attached) hifn0 mem 0xe810a000-0xe810afff,0xe8108000-0xe8109fff,0xe8100000-0xe8107fff irq 12 at device 9.0 on pci0 hifn0: Hifn 7955, rev 0, 32KB dram, pll=0x800 fxp0: port 0xdc00-0xdc1f mem 0xe810b000-0xe810bfff,0xe8000000-0xe80fffff irq 11 at device 10.0 on pci0 miibus0: on fxp0 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:a0:c9:5e:e2:94 rl0: port 0xe000-0xe0ff mem 0xe810c000-0xe810c0ff irq 10 at device 15.0 on pci0 miibus1: on rl0 rlphy0: on miibus1 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto rl0: Ethernet address: 00:50:fc:c8:29:94 rl1: port 0xe400-0xe4ff mem 0xe810d000-0xe810d0ff irq 11 at device 17.0 on pci0 miibus2: on rl1 rlphy1: on miibus2 rlphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto rl1: Ethernet address: 00:01:80:0d:c0:d1 fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A, console sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A ppc0: port 0x378-0x37f irq 7 on acpi0 ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 orm0: at iomem 0xc0000-0xcbfff on isa0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ucom0: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 2 Timecounter "TSC" frequency 1002277712 Hz quality 800 Timecounters tick every 1.000 msec Fast IPsec: Initialized Security Association Processing. ipfw2 initialized, divert loadable, rule-based forwarding enabled, default to accept, logging limited to 100 packets/entry by default ad0: 38166MB at ata0-master UDMA100 ATA PseudoRAID loaded Trying to mount root from ufs:/dev/ad0s1a rl0: link state changed to DOWN [hifn]% This is also with the uftdi driver [hifn]# usbdevs -v Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x0000), rev 1.00 port 1 powered port 2 addr 2: full speed, power 90 mA, config 1, USB FAST SERIAL ADAPTER(0x6010), FTDI(0x0403), rev 5.00 Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x0000), rev 1.00 port 1 powered port 2 powered [hifn]# >Ian > >Index: dev/usb/ucom.c >=================================================================== >RCS file: /dump/FreeBSD-CVS/src/sys/dev/usb/ucom.c,v >retrieving revision 1.51.2.2 >diff -u -r1.51.2.2 ucom.c >--- dev/usb/ucom.c 30 Jan 2005 01:00:10 -0000 1.51.2.2 >+++ dev/usb/ucom.c 2 Apr 2005 13:10:27 -0000 >@@ -929,11 +929,13 @@ > > DPRINTF(("ucomstop: %d\n", flag)); > >+#if 0 > if (flag & FREAD) { > DPRINTF(("ucomstop: read\n")); > ucomstopread(sc); > ucomstartread(sc); > } >+#endif > > if (flag & FWRITE) { > DPRINTF(("ucomstop: write\n")); From owner-freebsd-usb@FreeBSD.ORG Sat Apr 2 15:33:01 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F68116A58B for ; Sat, 2 Apr 2005 15:33:01 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 7F14D43D55 for ; Sat, 2 Apr 2005 15:33:00 +0000 (GMT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 2 Apr 2005 16:32:52 +0100 (BST) To: ticso@cicely.de In-Reply-To: Your message of "Sat, 02 Apr 2005 12:36:25 +0200." <20050402103624.GS2072@cicely12.cicely.de> Date: Sat, 02 Apr 2005 16:32:50 +0100 From: Ian Dowse Message-ID: <200504021632.aa50758@salmon.maths.tcd.ie> cc: ticso@cicely12.cicely.de cc: iedowse@maths.tcd.ie cc: sebastien.b@swissinfo.org cc: freebsd-usb@FreeBSD.ORG Subject: Re: panic: uhci_abort_xfer: not in process context X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 15:33:01 -0000 In message <20050402103624.GS2072@cicely12.cicely.de>, Bernd Walter writes: >In ohci.c it does: > if (xfer->device->bus->intr_context || !curproc) > panic("ohci_abort_xfer: not in process context"); >OK - this one is from ohci, but they are all the same. >intr_context is raised on interrupt handler start and decreased later. >It seems that there is an artifical limitation that we are not allowed >to sleep when processing USB interrupts. >If one really goes to sleep a userland call might come in and has >this variable raised. >I don't know why it enforces not to be in interrupt context, maybe >because of the long delays required to take an abort. >But in this case it triggers wrong. >In the meantime it should be safe not to check the intr_context part. Just a few general comments on this: Event processing systems can be either synchronous (blocking) or asynchronous (callback based). It is easy to make efficient use of an asynchronous system from synchronous code, but to do the reverse without holding up other requests you need to perform each blocking operation in a separate thread. That's why underlying event systems tend to be asynchronous. Mixing the two models improperly, such as allowing blocking from callbacks, results in something much worse than either model on its own: events may be delayed waiting for other unrelated events, and you open up a new class of race conditions by losing the normal atomicity of asynchronous event processing. We should give driver writers the option of using either event model, as for many drivers it is much simpler to write them using the synchronous model. For example, most USB drivers could set up one thread per USB pipe (and maybe one per-device thread) and then just do everything synchronously. A typical USB network driver would have one pipe's thread always blocking on an input pipe. There might be some extra things that the taskqueue code could do to make it easier to implement such threads. It would be possible to implement an asynchronous version of usbd_abort_pipe() that invokes a callback on completion. That seems like a good idea, as it would allow us to handle the cases where we need to initiate the abort from a callback. We can add an #ifdef DIAGNOSTIC check to usb_transfer_complete() to catch callbacks that sleep, by doing something along the lines of the `dont_sleep_in_callout' approach in kern_timeout.c. In summary: non-blocking: good! blocking: good! blocking from non-blocking contexts: bad! Ian From owner-freebsd-usb@FreeBSD.ORG Sat Apr 2 17:20:56 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A068616A4CE for ; Sat, 2 Apr 2005 17:20:56 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE15443D1D for ; Sat, 2 Apr 2005 17:20:55 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j32HKmsf047716 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Sat, 2 Apr 2005 19:20:51 +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.10/8.12.10) with ESMTP id j32HJfhs030786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Apr 2005 19:19:41 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j32HJeIh030528; Sat, 2 Apr 2005 19:19:40 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j32HJex3030527; Sat, 2 Apr 2005 19:19:40 +0200 (CEST) (envelope-from ticso) Date: Sat, 2 Apr 2005 19:19:39 +0200 From: Bernd Walter To: Ian Dowse Message-ID: <20050402171938.GU2072@cicely12.cicely.de> References: <20050402103624.GS2072@cicely12.cicely.de> <200504021632.aa50758@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200504021632.aa50758@salmon.maths.tcd.ie> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: ticso@cicely12.cicely.de cc: freebsd-usb@freebsd.org cc: sebastien.b@swissinfo.org cc: ticso@cicely.de Subject: Re: panic: uhci_abort_xfer: not in process context X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 17:20:56 -0000 On Sat, Apr 02, 2005 at 04:32:50PM +0100, Ian Dowse wrote: > Just a few general comments on this: [...] > In summary: > non-blocking: good! > blocking: good! > blocking from non-blocking contexts: bad! I fully agree with you - in general. You see the inetrrupt routine as non-blocking context. Fine - abort_xfer is bad as it blocks for a long time - agreed. But we need any kind of syncronisation with top half. Although taking a mutex may block I don't consider it bad as it should not be hold for long time and therefor waiting a long time is unlikely. Allowing to wait for a Mutex in the bottom half is the whole reason we have interrupt threads. But that is the current problem - we are not even allowed to take a Mutex, just because intr_context isn't safe. The panic was triggered by a userland call that was claimed to be in interrupt context. OK - I was wrong in that it was not close, but that doesn't change anything with the basic problem: The panic triggered when it shouldn't. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Sat Apr 2 18:02:28 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB25616A4CE for ; Sat, 2 Apr 2005 18:02:28 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 05AD643D41 for ; Sat, 2 Apr 2005 18:02:28 +0000 (GMT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 2 Apr 2005 19:02:19 +0100 (BST) To: ticso@cicely.de In-Reply-To: Your message of "Sat, 02 Apr 2005 19:19:39 +0200." <20050402171938.GU2072@cicely12.cicely.de> Date: Sat, 02 Apr 2005 19:02:18 +0100 From: Ian Dowse Message-ID: <200504021902.aa86365@salmon.maths.tcd.ie> cc: ticso@cicely12.cicely.de cc: iedowse@maths.tcd.ie cc: sebastien.b@swissinfo.org cc: freebsd-usb@freebsd.org Subject: Re: panic: uhci_abort_xfer: not in process context X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 18:02:29 -0000 In message <20050402171938.GU2072@cicely12.cicely.de>, Bernd Walter writes: >I fully agree with you - in general. >You see the inetrrupt routine as non-blocking context. >Fine - abort_xfer is bad as it blocks for a long time - agreed. >But we need any kind of syncronisation with top half. >Although taking a mutex may block I don't consider it bad as it should >not be hold for long time and therefor waiting a long time is unlikely. >Allowing to wait for a Mutex in the bottom half is the whole reason we >have interrupt threads. >But that is the current problem - we are not even allowed to take >a Mutex, just because intr_context isn't safe. >The panic was triggered by a userland call that was claimed to be in >interrupt context. >OK - I was wrong in that it was not close, but that doesn't change >anything with the basic problem: >The panic triggered when it shouldn't. Maybe I'm misunderstanding the cause of some of these panics, so correct me if this sounds wrong. There seem to be two ways for the "not in process context" panic to occur. One is where usbd_abort_pipe() is called directly from an interrupt thread. The other way is for a callback to be called from interrupt thread and that callback sleeps. This allows other threads to enter the USB code with intr_context > 0, so the panic can be incorrectly triggered. In both cases, the bug is that a callback function is sleeping and allowing other threads to run. I'm not sure I understand your comments about locking mutexes though. It is fine for a callback function to acquire a mutex, because acquiring a mutex is not really sleeping, because currently held locks are not dropped even if the mutex cannot be acquired immediately. For example, the USB system will hold Giant at the time that the interrupt thread is calling completion callbacks. Even if one of those callbacks needs to acquire another mutex that is currently locked, Giant will not be dropped while that mutex is acquired, so no other threads can enter the USB code. The problem is limited to tsleep/msleep where all mutexes are dropped. A more specific statement of the original comments would be that callbacks in asynchronous event systems should not call tsleep or msleep, no matter what the calling context is. Ian From owner-freebsd-usb@FreeBSD.ORG Sat Apr 2 20:08:54 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70F9D16A4CF for ; Sat, 2 Apr 2005 20:08:54 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9588643D2D for ; Sat, 2 Apr 2005 20:08:53 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j32K8msf052047 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Sat, 2 Apr 2005 22:08:50 +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.10/8.12.10) with ESMTP id j32K7whs031811 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Apr 2005 22:07:58 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j32K7vRh031261; Sat, 2 Apr 2005 22:07:57 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j32K7uQ4031260; Sat, 2 Apr 2005 22:07:56 +0200 (CEST) (envelope-from ticso) Date: Sat, 2 Apr 2005 22:07:56 +0200 From: Bernd Walter To: Ian Dowse Message-ID: <20050402200756.GV2072@cicely12.cicely.de> References: <20050402171938.GU2072@cicely12.cicely.de> <200504021902.aa86365@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200504021902.aa86365@salmon.maths.tcd.ie> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-0.9 required=3.0 tests=BAYES_30 autolearn=no version=2.64 X-Spam-Report: * -0.9 BAYES_30 BODY: Bayesian spam probability is 30 to 40% * [score: 0.3353] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: ticso@cicely12.cicely.de cc: sebastien.b@swissinfo.org cc: ticso@cicely.de cc: freebsd-usb@freebsd.org Subject: Re: panic: uhci_abort_xfer: not in process context X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 20:08:54 -0000 On Sat, Apr 02, 2005 at 07:02:18PM +0100, Ian Dowse wrote: > In message <20050402171938.GU2072@cicely12.cicely.de>, Bernd Walter writes: > >I fully agree with you - in general. > >You see the inetrrupt routine as non-blocking context. > >Fine - abort_xfer is bad as it blocks for a long time - agreed. > >But we need any kind of syncronisation with top half. > >Although taking a mutex may block I don't consider it bad as it should > >not be hold for long time and therefor waiting a long time is unlikely. > >Allowing to wait for a Mutex in the bottom half is the whole reason we > >have interrupt threads. > >But that is the current problem - we are not even allowed to take > >a Mutex, just because intr_context isn't safe. > >The panic was triggered by a userland call that was claimed to be in > >interrupt context. > >OK - I was wrong in that it was not close, but that doesn't change > >anything with the basic problem: > >The panic triggered when it shouldn't. > > Maybe I'm misunderstanding the cause of some of these panics, so > correct me if this sounds wrong. There seem to be two ways for the > "not in process context" panic to occur. One is where usbd_abort_pipe() > is called directly from an interrupt thread. The other way is for > a callback to be called from interrupt thread and that callback > sleeps. This allows other threads to enter the USB code with > intr_context > 0, so the panic can be incorrectly triggered. > > In both cases, the bug is that a callback function is sleeping and > allowing other threads to run. I'm not sure I understand your > comments about locking mutexes though. It is fine for a callback > function to acquire a mutex, because acquiring a mutex is not really > sleeping, because currently held locks are not dropped even if the > mutex cannot be acquired immediately. For example, the USB system > will hold Giant at the time that the interrupt thread is calling > completion callbacks. Even if one of those callbacks needs to acquire > another mutex that is currently locked, Giant will not be dropped > while that mutex is acquired, so no other threads can enter the USB > code. The problem is limited to tsleep/msleep where all mutexes are > dropped. > > A more specific statement of the original comments would be that > callbacks in asynchronous event systems should not call tsleep or > msleep, no matter what the calling context is. Yes - you are right - my fault. I missread the panic - in fact it is called from a callback, and I somehow asumed that mtx_lock could release GIANT. The panic is justified. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-usb@FreeBSD.ORG Sat Apr 2 20:22:03 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78D2116A4CE for ; Sat, 2 Apr 2005 20:22:03 +0000 (GMT) Received: from md1.swissinfo.org (md1.swissinfo.org [146.159.4.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9004D43D2F for ; Sat, 2 Apr 2005 20:22:01 +0000 (GMT) (envelope-from sebastien.b@swissinfo.org) Received: from mail.swissinfo.org ([194.6.181.33]) by md1.swissinfo.org (phad1.swissinfo.org [146.159.6.9]) (MDaemon.PRO.v7.2.1.R) with ESMTP id 02-md50000379598.msg for ; Sat, 02 Apr 2005 22:18:41 +0200 Received: from AAmiens-152-1-35-123.w83-198.abo.wanadoo.fr (83.198.34.123) by mail.swissinfo.org (7.0.020) (authenticated as sebastien.b) id 4153942002E19647; Sat, 2 Apr 2005 22:21:46 +0200 From: Sebastien B To: hselasky@c2i.net Date: Sat, 2 Apr 2005 22:20:48 +0200 User-Agent: KMail/1.8 References: <6.2.1.2.0.20050329222822.04f7c500@64.7.153.2> <200504021101.11602.sebastien.b@swissinfo.org> <200504021316.59434.hselasky@c2i.net> In-Reply-To: <200504021316.59434.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504022220.49835.sebastien.b@swissinfo.org> X-Spam-Processed: phad1.swissinfo.org, Sat, 02 Apr 2005 22:18:41 +0200 (not processed: message from valid local sender) X-MDRemoteIP: 194.6.181.33 X-Return-Path: sebastien.b@swissinfo.org X-MDaemon-Deliver-To: freebsd-usb@freebsd.org X-MDAV-Processed: phad1.swissinfo.org, Sat, 02 Apr 2005 22:18:45 +0200 cc: freebsd-usb@freebsd.org Subject: Re: panic: uhci_abort_xfer: not in process context X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 20:22:03 -0000 > > > You can call usbd_transfer(), if the transfer is not > > > synchronous. > > > > But it is. To send network packets, I must perform two USB transfers on > > two different endpoints, and I must wait for the first one to complete > > before initiating the second. > > What you need to do is to allocate two [non synchronous] transfers besides > from the data transfer. The callback of the first transfer starts the > second transfer. The callback of the second transfer starts the data > transfer. Then you need to make a flag so that the first transfer is not > started again, before the data transfer has been started. This requires a quite complex locking mechanism by comparison to scheduling a software interrupt handler. Why is using a software interrupt handler and synchronous transfers wrong ? I've disabled the timeout in usbd_bulk_transfer() and it does not panic anymore. So this is indeed the timeout function which causes the panic when it is called.