[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New UMASS driver available for testing
- To: Ulrich Spoerlein <uspoerlein_(_at_)_gmail_(_dot_)_com>
- Subject: Re: New UMASS driver available for testing
- From: Hans Petter Selasky <hselasky_(_at_)_c2i_(_dot_)_net>
- Date: Sun, 1 Oct 2006 09:44:03 +0200
- Cc: freebsd-usb_(_at_)_freebsd_(_dot_)_org
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
_______________________________________________
freebsd-usb_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscribe_(_at_)_freebsd_(_dot_)_org"
Visit your host, monkey.org