Date: Tue, 9 Aug 2005 01:56:08 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: Maksim Yevmenkin <maksim.yevmenkin@gmail.com> Cc: freebsd-usb@freebsd.org Subject: Re: weird usb problem Message-ID: <200508090156.09985.hselasky@c2i.net> In-Reply-To: <bb4a86c705080815513204ec81@mail.gmail.com> References: <bb4a86c7050808140175d0134a@mail.gmail.com> <200508082323.51881.hselasky@c2i.net> <bb4a86c705080815513204ec81@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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, but > > I have not commit rights :-( > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/79656 > > well, i looked at the PR but i do not see any patches :( all it says > > <quote> > > >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 > > </qoute> > > 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 OK. You find "ehci_pcd_enable()" in "/sys/dev/usb2/_ehci.c" (my driver) and in "/sys/dev/usb/ehci.c" (old driver). You find "ohci_rhsc_enable()" in "/sys/dev/usb2/_ohci.c" (my driver) and in "/sys/dev/usb/ohci.c" (old driver). I'm not sure how this patch would look for the "old USB driver", but basically you need to finish the root interrupt transfer, that again will wakeup the explore thread. Also you need to clear the PCD/RHSC status bits, to make sure that the PCD/RHSC interrupt does not stop. From a quick glimpse, you need to add something like "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 backport it. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508090156.09985.hselasky>
