diff options
| author | Andrew Thompson <thompsa@FreeBSD.org> | 2010-04-06 23:22:19 +0000 |
|---|---|---|
| committer | Andrew Thompson <thompsa@FreeBSD.org> | 2010-04-06 23:22:19 +0000 |
| commit | 5aab223c3ca336971f2d7ad8860d95e72422bcb8 (patch) | |
| tree | 2d139f1f44dad8ba14750efc3ff4334e2f2901d5 /sys | |
| parent | 76e18c912806305f4ae7e8becc176ec45cb6f8c9 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/usb/serial/umodem.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/usb/serial/umodem.c b/sys/dev/usb/serial/umodem.c index 6945e79e4305..39afdad893f1 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; } |
