Low umass performance with USB 2.0 ports

Hans Petter Selasky hselasky at c2i.net
Thu Sep 1 07:01:12 PDT 2005


On Thursday 01 September 2005 11:37, Eygene A. Ryabinkin wrote:
> > If Scott's patch doesn't work, could you have tried to install the
> > following (compiles on FreeBSD 5/6/7):
>
>  Yes, it also works and does even better work: FAT 32 and FAT 16
> permormance are just the same and there is no additional load as been with
> the Scott's patch.
>  So I definitely would vote for this fix.
>
> > 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
>
> Can this fix be transformed into the patch? It will be very helpful to the 
> committers to have in the form of patch. Are there any reasons to make it 
> in the way you did?

I did things like I did it, so I would be saved the work of upgrading my patch 
every time the source code changes. I am currently working on getting this 
ported to NetBSD, so maybe the official USB system of FreeBSD can be upgraded 
without splitting with NetBSD. 

At the present moment there are too many changes made, so a single patch will 
not be so good.

>  Thank you for your work!

On Thursday 01 September 2005 14:08, you wrote:
> >  Yes, it also works and does even better work: FAT 32 and FAT 16
> > permormance are just the same and there is no additional load as been
> > with the Scott's patch.

Interesting.

> >  So I definitely would vote for this fix.
>
>  Oops, it seems that this patch also does not work as expected: after some
> time of playing with flash card and working with the system it started to
> stall as unpatched system, but it freezes the system -- even IP stack was
> frozen (I am using DEVICE_POLLING), so I were to remove the flash from the
> port -- system was unfrozen and continued to work. So something is still
> bad with the USB. I'll try to do some long testing with USB 1.1 -- maybe it
> will show the same behaviour after some more time.

Do you mean my patch? 

Maybe you can turn on debugging when the system starts freezing:

sysctl hw.usb.debug=15       
sysctl hw.usb.umass.debug=-1
sysctl hw.usb.ehci.debug=15     # note: produces alot of output !

Set these variables to zero to turn off debugging.

If the system resumes to normal operation when you pull the device plug, it is 
most likely a timeout in "umass" that takes too long. In the file 
"/sys/dev/usb/umass.c":

Add:
                sc->timeout = 1000;
Before:

                /* Read the Command Status Wrapper via bulk-in endpoint. */
                if (umass_setup_transfer(sc, sc->bulkin_pipe,
                                &sc->csw, UMASS_BBB_CSW_SIZE, 0,
                                next_xfer)) {
                        umass_bbb_reset(sc, STATUS_WIRE_FAILED);
                        return;
                }

See if you get any timeout messages while stressing the system.

--HPS


More information about the freebsd-hackers mailing list