From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 29 10:00:25 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D70F937B401 for ; Tue, 29 Apr 2003 10:00:25 -0700 (PDT) Received: from mail.cruzio.com (mail.cruzio.com [63.249.95.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5426B43FCB for ; Tue, 29 Apr 2003 10:00:25 -0700 (PDT) (envelope-from brucem@cruzio.com) Received: from cruzio.com (dsl3-63-249-85-132.cruzio.com [63.249.85.132]) by mail.cruzio.com with ESMTP id h3TH4MjM066450; Tue, 29 Apr 2003 10:04:23 -0700 (PDT) Received: (from brucem@localhost) by cruzio.com (8.12.6/8.12.6/Submit) id h3TGw7qL000418; Tue, 29 Apr 2003 09:58:07 -0700 (PDT) Date: Tue, 29 Apr 2003 09:58:07 -0700 (PDT) From: "Bruce R. Montague" Message-Id: <200304291658.h3TGw7qL000418@cruzio.com> To: freebsd-hackers@FreeBSD.ORG cc: jordbaer@mac.com Subject: Re: misc patches to FreeBSD (Geode, USB, ... (from arch@freebsd.org) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2003 17:00:26 -0000 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