Date: Wed, 7 May 2003 03:11:35 +0100 From: Jay Cornwall <jay@evilrealms.net> To: freebsd-current@freebsd.org Subject: Re: USB ugen_set_interface issue (+ possible patch) Message-ID: <200305070311.35749.jay@evilrealms.net> In-Reply-To: <200305070308.42781.jay@evilrealms.net> References: <200305070308.42781.jay@evilrealms.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 07 May 2003 03:08 am, Jay Cornwall wrote: > My proposal for a patch to fix this is fairly simple, and is attached to > this email. [..] But of course, it just wouldn't be fun if the list manager didn't strip attachments. :) I've popped the patch below. Cheers, Jay http://www.evilrealms.net/ - Systems Administrator & Developer http://www.ic.ac.uk/ - Imperial College, 2nd year CS student Index: ugen.c =================================================================== RCS file: /home/ncvs/src/sys/dev/usb/ugen.c,v retrieving revision 1.65 diff -u -3 -p -r1.65 ugen.c --- ugen.c 7 Nov 2002 21:34:21 -0000 1.65 +++ ugen.c 7 May 2003 02:04:55 -0000 @@ -998,6 +998,12 @@ ugen_set_interface(struct ugen_softc *sc err = usbd_endpoint_count(iface, &nendpt); if (err) return (err); + +#if defined(__FreeBSD__) + /* destroy the existing devices, we remake the new ones in a moment */ + ugen_destroy_devnodes(sc); +#endif + /* XXX should only do this after setting new altno has succeeded */ for (endptno = 0; endptno < nendpt; endptno++) { ed = usbd_interface2endpoint_descriptor(iface,endptno); @@ -1026,6 +1032,12 @@ ugen_set_interface(struct ugen_softc *sc sce->edesc = ed; sce->iface = iface; } + +#if defined(__FreeBSD__) + /* make the new devices */ + ugen_make_devnodes(sc); +#endif + return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305070311.35749.jay>