From owner-freebsd-usb@FreeBSD.ORG Mon Aug 8 23:55:20 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 8E01016A41F for ; Mon, 8 Aug 2005 23:55:20 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.swip.net [212.247.155.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9EB243D49 for ; Mon, 8 Aug 2005 23:55:19 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: gvlK0tOCzrqh9CPROFOFPw== Received: from mp-217-200-221.daxnet.no ([193.217.200.221] verified) by mailfe16.swip.net (CommuniGate Pro SMTP 4.3.4) with ESMTP id 5191790; Tue, 09 Aug 2005 01:55:17 +0200 From: Hans Petter Selasky To: Maksim Yevmenkin Date: Tue, 9 Aug 2005 01:56:08 +0200 User-Agent: KMail/1.7 References: <200508082323.51881.hselasky@c2i.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200508090156.09985.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: weird usb problem 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: Mon, 08 Aug 2005 23:55:20 -0000 On Tuesday 09 August 2005 00:51, Maksim Yevmenkin wrote: > [...] > > > > it seems that usb does even detect that device is plugged > > > or something broken in discovery. > > > > See my PR on this issue. This should have been fixed a long time ago, b= ut > > I have not commit rights :-( > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dusb/79656 > > well, i looked at the PR but i do not see any patches :( all it says > > > > >Fix: > > ehci_pcd_enable() must call ehci_pcd() to catch up missed interrupts > > ohci_rhsc_enable() must call ohci_rhsc() to catch up missed interrupts > > > > could you please submit the patch? i can test and commit it for you. > > > If you want, try out the following and see if the problem dissappears: > > > > 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 > > that seems like a lot of changes. i tried it and one of the patches > failed completely. are all these changes required to fix the problem? No, don't worry about the patches failing. As long as it compiles it should= be=20 OK. You find "ehci_pcd_enable()" in "/sys/dev/usb2/_ehci.c" (my driver) and in= =20 "/sys/dev/usb/ehci.c" (old driver). You find "ohci_rhsc_enable()" in "/sys/dev/usb2/_ohci.c" (my driver) and in= =20 "/sys/dev/usb/ohci.c" (old driver). I'm not sure how this patch would look for the "old USB driver", but basica= lly=20 you need to finish the root interrupt transfer, that again will wakeup the= =20 explore thread. Also you need to clear the PCD/RHSC status bits, to make su= re=20 that the PCD/RHSC interrupt does not stop. =46rom a quick glimpse, you need to add something like=20 "ehci_pcd(sc, sc->sc_intrxfer);" after "ehci_pcd_able(sc, 1);". In the middle you have to add something like this: /* acknowledge any PCD interrupt */ EOWRITE4(sc, EHCI_USBSTS, EHCI_STS_PCD); Just look at the code in my USB driver, and if it fixes the problem, just=20 backport it. =2D-HPS