Date: Sun, 1 Oct 2006 09:44:03 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: Ulrich Spoerlein <uspoerlein@gmail.com> Cc: freebsd-usb@freebsd.org Subject: Re: New UMASS driver available for testing Message-ID: <200610010944.04652.hselasky@c2i.net> In-Reply-To: <20060930152928.GB1441@roadrunner.q.local> References: <200609171214.49165.hselasky@c2i.net> <20060930152928.GB1441@roadrunner.q.local>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 30 September 2006 17:29, Ulrich Spoerlein wrote: > Hans Petter Selasky wrote: > > Hi, > > > > I have finished the conversion of the UMASS driver to my new USB API. If > > you have got a UMASS device laying around, and want to help the USB > > project, please give the new driver a test. > > Well, it's been a time, but I finally got around to benchmarking you new > driver. First of all, a diff of the dmesg from the old against your > driver: > > > > As you can see, performance increased by roughly 10%, but system time > increased about 300% :( > > I hope this info was useful to you and am looking forward to seeing your > reworked USB system hit the tree soon! The extra time used is due to an inline wait loop in the code, to make things simple. You can try the following experimental patch: Edit: /sys/dev/usb2/_ehci.c Lookup the following piece of code: if(((xfer->pipe->methods == &ehci_device_ctrl_methods) || (xfer->pipe->methods == &ehci_device_bulk_methods)) && (sc->sc_doorbell_disable == 0)) { u_int32_t to = 100*1000; /* wait for doorbell ~32us */ EOWRITE4(sc, EHCI_USBCMD, EOREAD4(sc, EHCI_USBCMD) | EHCI_CMD_IAAD); while(EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_IAAD) { if(!to--) { printf("%s: doorbell timeout " "(disabling)\n", __FUNCTION__); sc->sc_doorbell_disable = 1; break; } DELAY(1); } need_delay = 0; } Change it to: if(((xfer->pipe->methods == &ehci_device_ctrl_methods) || (xfer->pipe->methods == &ehci_device_bulk_methods)) && (sc->sc_doorbell_disable == 0)) { u_int32_t to = 100*1000; if (error != 0) { /* simply add an "if"-statement */ /* wait for doorbell ~32us */ EOWRITE4(sc, EHCI_USBCMD, EOREAD4(sc, EHCI_USBCMD) | EHCI_CMD_IAAD); while(EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_IAAD) { if(!to--) { printf("%s: doorbell timeout " "(disabling)\n", __FUNCTION__); sc->sc_doorbell_disable = 1; break; } DELAY(1); } need_delay = 0; } } Then recompile the kernel and try again. Thanks for testing. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610010944.04652.hselasky>