From owner-freebsd-current Tue May 21 0:35:41 2002 Delivered-To: freebsd-current@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 9737E37B401 for ; Tue, 21 May 2002 00:35:37 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 7E16DAE1D0; Tue, 21 May 2002 00:35:37 -0700 (PDT) Date: Tue, 21 May 2002 00:35:37 -0700 From: Alfred Perlstein To: sjh@ucf.ics.uci.edu Cc: freebsd-current@freebsd.org Subject: Re: rio500 usb support Message-ID: <20020521073537.GF54960@elvis.mu.org> References: <200205210535.g4L5ZEl16190@whiskey.ucf.ics.uci.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200205210535.g4L5ZEl16190@whiskey.ucf.ics.uci.edu> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Seth Hettich [020520 22:35] wrote: > I just started playing w/ this. While it seems to work, connecting > the rio, disconnecting it, and then reconnecting causes a panic when > it trys to re-make the /dev entry. > > I don't see a usb mailing list, so where should I take this? Index: urio.c =================================================================== RCS file: /home/ncvs/src/sys/dev/usb/urio.c,v retrieving revision 1.16 diff -u -r1.16 urio.c --- urio.c 6 May 2002 18:23:35 -0000 1.16 +++ urio.c 21 May 2002 07:34:54 -0000 @@ -158,6 +158,9 @@ int sc_epaddr[2]; int sc_refcnt; +#if defined(__FreeBSD__) + dev_t sc_dev; +#endif /* defined(__FreeBSD__) */ #if defined(__NetBSD__) || defined(__OpenBSD__) u_char sc_dying; #endif @@ -272,7 +275,7 @@ #if defined(__FreeBSD__) #if (__FreeBSD__ >= 4) /* XXX no error trapping, no storing of dev_t */ - (void) make_dev(&urio_cdevsw, device_get_unit(self), + sc->sc_dev = make_dev(&urio_cdevsw, device_get_unit(self), UID_ROOT, GID_OPERATOR, 0644, "urio%d", device_get_unit(self)); #endif @@ -673,6 +676,7 @@ mn = self->dv_unit * USB_MAX_ENDPOINTS; vdevgone(maj, mn, mn + USB_MAX_ENDPOINTS - 1, VCHR); #elif defined(__FreeBSD__) + destroy_dev(sc->sc_dev); /* XXX not implemented yet */ #endif -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message