Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Apr 2003 09:58:07 -0700 (PDT)
From:      "Bruce R. Montague" <brucem@cruzio.com>
To:        freebsd-hackers@FreeBSD.ORG
Cc:        jordbaer@mac.com
Subject:    Re: misc patches to FreeBSD (Geode, USB, ... (from arch@freebsd.org)
Message-ID:  <200304291658.h3TGw7qL000418@cruzio.com>

next in thread | raw e-mail | index | archive | help


Hi, re the USB ohci patches Bodo RusKamp mentioned
in:

 http://docs.freebsd.org/cgi/getmsg.cgi?fetch=2917+0+current/freebsd-arch

> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304291658.h3TGw7qL000418>