⬢ DragonFlyBSD Kernel Audit
DF-5516 / fix.diff
← back to finding ↓ download raw
--- a/sys/bus/u4b/serial/ubser.c
+++ b/sys/bus/u4b/serial/ubser.c
@@ -247,8 +247,11 @@ ubser_attach(device_t dev)
 	req.wIndex[0] = sc->sc_iface_no;
 	req.wIndex[1] = 0;
 	USETW(req.wLength, 1);
 	error = usbd_do_request_flags(uaa->device, NULL,
 	    &req, &sc->sc_numser,
-	    0, NULL, USB_DEFAULT_TIMEOUT);
+	    /* DF-5516: bound the enumeration-time pin -- 1000 ms is
+	     * ample for a port-count read a live adapter serves in
+	     * <5 ms; 5000 ms stalls the whole bus's exploration. */
+	    0, NULL, 1000);
 
 	if (error || (sc->sc_numser == 0)) {
 		device_printf(dev, "failed to get number "