From owner-freebsd-usb@FreeBSD.ORG Fri Nov 5 22:11:42 2004 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B64BD16A4CE; Fri, 5 Nov 2004 22:11:42 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6338C43D31; Fri, 5 Nov 2004 22:11:42 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 48FDB7A444; Fri, 5 Nov 2004 14:11:42 -0800 (PST) Message-ID: <418BFA9E.8050603@elischer.org> Date: Fri, 05 Nov 2004 14:11:42 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: Mike Tancsa References: <418BED57.6090203@elischer.org> <6.1.2.0.0.20041105162518.030e1928@64.7.153.2> In-Reply-To: <6.1.2.0.0.20041105162518.030e1928@64.7.153.2> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: usb@freebsd.org cc: bde@freebsd.org Subject: USB/TTY spl fix. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2004 22:11:42 -0000 Mike Tancsa wrote: > At 04:15 PM 05/11/2004, Julian Elischer wrote: > >> 1/ where are we? >> I've seen USB commits recently from several people.. > > > Not a commit, but a plea to have > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/72935 > > reviewed / committed if possible :) *** uhid.c.orig Wed Oct 20 14:16:05 2004 --- uhid.c Wed Oct 20 14:16:56 2004 *************** *** 411,416 **** --- 411,424 ---- if (sc->sc_dying) return (ENXIO); + /* KDW - test change to force class tty to include uhid */ + { + int s = splhigh(); + tty_imask |= bio_imask; + splx( s ); + } + /* end KDW */ + if (sc->sc_state & UHID_OPEN) return (EBUSY); sc->sc_state |= UHID_OPEN; updated to..... { int s = splhigh(); tty_imask |= bio_imask; bio_imask |= tty_imask; update_intr_masks(); splx( s ); } well, this probably solves the problem for static cases but it doesn't solve the case for someone plugging in a pccard modem. In that case the mask for tty_mask would change, and bio_mask would never be updated. My tbought is that we "ignore" this case for now and commit it as shown above. 5.x doesn't have this problem due to the completely different protection system. I'm CCing bde because he has general foo in this area. > > > I have been running with the patch in there for a week now heavily > hitting the sio and uhid devices without issue. It would normally > take a day or two to trigger the panic without the patch. > > > ---Mike