Unloading USB driver while device is attached.

Barry Bouwsma freebsd-misuser at remove-NOSPAM-to-reply.NOSPAM.dyndns.dk
Tue Aug 10 15:44:56 PDT 2004


[keep replies to the list and I'll catch up later, thanks]
[posted to -stable as well, as that's what I'm running so it
 could be of interest there, for the daring and headstrong]


Two weeks ago (shows how far behind I am), Ian Dowse <iedowse at maths.tcd.ie>
wrote to freebsd-current:

> In message <200407200045.aa99979 at salmon.maths.tcd.ie>, Ian Dowse writes:
> >>: 	http://people.freebsd.org/~iedowse/usb.diff

> FYI, I've updated this patch to the latest -CURRENT, and finished
> an initial attempt at support for EHCI interrupt pipes. The interrupt
> pipe support is likely to be fairly broken, but it seems to be
> enough to allow attachment of USB2 hubs and at least some USB2
> devices through USB2 hubs; I have only tested it with a USB2 umass
> device connected through a USB2 hub. USB1 devices will definitely
> not work via USB2 hubs, as none of the split transaction support
> is there.

This looks like great fun.  I've taken this and -current dev/usb
source from 10.Aug (last changed 08.Aug) and gotten at least part
of this combination to work under my RELENG_4 system.

I no longer see the need_toggle_updates that froze my disk, from
my previous attempt to merge in -current code, and I've got that
disk attached now via a USB2 hub.

There is a slight performance degradation going through the hub
measured by throughput (5,9MB/sec direct, 5,1MB/sec via hub) on
my ten-year-old machine, and now that I'm continuing my world
build via USB instead of firewire, the machine seems decidedly
sluggish.  The `system' CPU slice according to `top' hovers
between 30 and 70% most of the time, but I haven't watched it
with either firewire or bypassing the hub and going direct.
This is all probably to be expected anyway.

I haven't even gotten to the point of trying to merge in my
various hacks that I needed to apply to earlier code, some of
which seem to no longer be needed.

I'm using usb.ko, umass.ko, and ums.ko, as well as loaded-but-
not-in-use ugen.ko out of the modules built from this directory
in -current, on my -stable box.

Is there any interest out there in my hacks to be used with
-stable, pulling the latest code from -current?  If so, I'll
try to clean them up to make them presentable and to remain
compatible with a -current build as well.  (If nothing else,
this diff created from my hacks would be up-to-date against
08.aug -current source.)


I haven't really pounded on things either.  But the advantage
I see from this (compared with my earlier code) is functioning
EHCI umass support, and USB2 hubs with USB2 devices attached,
which has to be good for something.  And it hasn't died yet.



thanks
barry bouwsma



More information about the freebsd-stable mailing list