summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/usb/serial/umodem.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/usb/serial/umodem.c b/sys/dev/usb/serial/umodem.c
index 6945e79..39afdad 100644
--- a/sys/dev/usb/serial/umodem.c
+++ b/sys/dev/usb/serial/umodem.c
@@ -312,11 +312,16 @@ umodem_attach(device_t dev)
0 - 1, UDESCSUB_CDC_UNION, 0 - 1);
if ((cud == NULL) || (cud->bLength < sizeof(*cud))) {
- device_printf(dev, "no CM or union descriptor\n");
- goto detach;
+ device_printf(dev, "Missing descriptor. "
+ "Assuming data interface is next.\n");
+ if (sc->sc_ctrl_iface_no == 0xFF)
+ goto detach;
+ else
+ sc->sc_data_iface_no =
+ sc->sc_ctrl_iface_no + 1;
+ } else {
+ sc->sc_data_iface_no = cud->bSlaveInterface[0];
}
-
- sc->sc_data_iface_no = cud->bSlaveInterface[0];
} else {
sc->sc_data_iface_no = cmd->bDataInterface;
}
OpenPOWER on IntegriCloud