Hello, After investigating this issue and comparing FreeBSD and OpenBSD implementations I have attached a patch which is just a copy/paste from FreeBSD implementation. After rebuilding the kernel with this patch, `urndis0` is now available and working fine. Could anyone more familiar with USB stack review it and merge it? Thanks!
Cheers, Arnaud
Index: usbdi.c =================================================================== RCS file: /cvs/src/sys/dev/usb/usbdi.c,v diff -u -p -r1.112 usbdi.c --- usbdi.c 3 Apr 2025 11:02:44 -0000 1.112 +++ usbdi.c 27 Mar 2026 09:06:49 -0000 @@ -672,6 +672,13 @@ usbd_set_interface(struct usbd_interface if (LIST_FIRST(&iface->pipes) != 0) return (USBD_IN_USE); + if (iface->altindex == altno) + /* + * Optimise away duplicate setting of + * alternate setting in USB Host Mode! + */ + return (USBD_NORMAL_COMPLETION); + endpoints = iface->endpoints; nendpt = iface->nendpt; err = usbd_fill_iface_data(iface->device, iface->index, altno);
