From owner-freebsd-usb@FreeBSD.ORG Sat Jul 9 12:35:50 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org 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 4A6FB16A41C for ; Sat, 9 Jul 2005 12:35:50 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id B812143D49 for ; Sat, 9 Jul 2005 12:35:49 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: gvlK0tOCzrqh9CPROFOFPw== Received: from mp-216-41-201.daxnet.no ([193.216.41.201] verified) by mailfe02.swip.net (CommuniGate Pro SMTP 4.3.4) with ESMTP id 404937323; Sat, 09 Jul 2005 14:35:47 +0200 From: Hans Petter Selasky To: Stefan Walter Date: Sat, 9 Jul 2005 14:36:43 +0200 User-Agent: KMail/1.7 References: <20050626091628.775DD3A1D@kyuzo.dunkelkammer.void> <200507041918.47258.hselasky@c2i.net> <20050706173604.GA812@kyuzo.dunkelkammer.void> In-Reply-To: <20050706173604.GA812@kyuzo.dunkelkammer.void> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507091436.44489.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: usb/82660: EHCI: I/O stuck in state 'physrd'/panic X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 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, 09 Jul 2005 12:35:50 -0000 On Wednesday 06 July 2005 19:36, Stefan Walter wrote: > Hans Petter Selasky, 04.07.05, 19:18h CEST: > > > http://www.gegenunendlich.de/stuff/ehci/umass-messages-complete-transfe > > >r.bz2 > > > > To me it seems that there is something wrong with your flash disk. Though > > it can be that the "CBW" structure is not initialized correctly, but I am > > not the right person to tell about that. At least your flash disk takes > > the "CBW" command, but times out on the following BULK-in transfer. > > I don't think it's the USB stick, as the device works fine with ehci at my > notebook (Intel chipset). Furthermore, I could now reproduce the problem > with an external USB HD enclosure, too. Ok, lets have a look at the EHCI driver and see what is going on. I'm not sure how to do this with the official USB driver, but if you could have installed my USB driver again, and replace the function "ehci_timeout()" in the file "/sys/dev/usb2/_ehci.c" with the following: static void ehci_timeout(struct usbd_xfer *xfer) { ehci_softc_t *sc = xfer->usb_sc; struct mtx *priv_mtx; DPRINTF(("xfer=%p\n", xfer)); mtx_lock(&sc->sc_bus.mtx); if(!xfer->finish_list) { u_int8_t status = 0; int old_debug = ehcidebug; ehcidebug = 15; if(xfer->pipe->methods == &ehci_device_bulk_methods) { printf("%s: checking transfer %p: \n", __FUNCTION__, xfer); status = ehci_check_transfer(xfer); } else { /* this should not happen */ printf("%s: not bulk (cannot check transfer %p)\n", __FUNCTION__, xfer); } if(status == 0) { /* transfer is transferred */ ehci_device_done(xfer, USBD_TIMEOUT); } else { printf("%s: timed out transfer was finished!\n", __FUNCTION__); } ehcidebug = old_debug; /* call callback */ xfer->finish_list = &xfer; priv_mtx = xfer->priv_mtx; /* change lock */ mtx_unlock(&sc->sc_bus.mtx); mtx_lock(priv_mtx); if(xfer) { /* call callback */ __usbd_callback(xfer); } /* else already called back */ mtx_unlock(priv_mtx); } else { mtx_unlock(&sc->sc_bus.mtx); } return; } And then compile a new kernel and/or modules. Your device was USB 2.0, right, else you have to do something similar to /sys/dev/usb2/_uhci.c if the device is USB 1.X. Just leave all debugging flags off, and then try to reproduce the error [one or more times] and post the dmsg that appears. --HPS