Recreate devnodes on USB_SET_ALTINTERFACE ioctl.
This fixes net/pppoa port for Alcatel Speedtouch devices. Submitted by: Jay Cornwall <jay@evilrealms.net> Tested by: Francois Rogler <francois@rogler.org> Approved by: re (scottl)
This commit is contained in:
parent
5a893bc465
commit
6ab7ac813b
@ -1024,6 +1024,12 @@ ugen_set_interface(struct ugen_softc *sc, int ifaceidx, int altno)
|
||||
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);
|
||||
@ -1035,6 +1041,11 @@ ugen_set_interface(struct ugen_softc *sc, int ifaceidx, int altno)
|
||||
sce->iface = 0;
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
/* make the new devices */
|
||||
ugen_make_devnodes(sc);
|
||||
#endif
|
||||
|
||||
/* change setting */
|
||||
err = usbd_set_interface(iface, altno);
|
||||
if (err)
|
||||
|
Loading…
Reference in New Issue
Block a user