misc patches to FreeBSD (Geode, USB, ... (from arch@freebsd.org)

Bruce R. Montague brucem at cruzio.com
Tue Apr 29 10:00:26 PDT 2003

Hi, re the USB ohci patches Bodo RusKamp mentioned


> This contains a fix for a serious bug in the OHCI code that was present
> for a very long time in FreeBSD and NetBSD: ...

Manual application of the "ohci.c" patch file shows
that all but two of the hunks patching usb driver
file "ohci.c" are already present in "ohci.c" in the
-current sources (obtained via cvsup as of 10-April-2003).

The two new patches potentially effect unprotected
critical sections in isochronous transfers. However,
with the patches applied, isochronous transfers still
only work for me for about 23 frames frames on my
'test device' (a webcam).  Additionally, there appears
to be other code blocks in the -current "ohci.c"
that would require similar patching (that is, that
aren't included in the patch). Perhaps the patches
are based on older versions of ohci that don't have
these other cases...

The two new patches, as far as I can tell, are:

1) The hunk 4 and 5 patches to "ohci_alloc_sitd()"
that adds a "s = splusb();/splx()" encapsulation
around sitd descriptor updates in the case of a new
allocation (these hunks have some other updates
already applied in the current code), and,

2) The hunk 7 patches to "ohci_softintr()" protecting
a "usb_transfer_complete()" call with a "s = splusb();
splx()". There are other calls to "usb_transfer_complete()"
in this same routine that are also not protected in
a splusb() critical section...

 - bruce

More information about the freebsd-hackers mailing list