diff options
author | 2008-07-25 11:12:34 +0000 | |
---|---|---|
committer | 2008-07-25 11:12:34 +0000 | |
commit | 904d0f53fdf9a03084df82f171cf8a15337c2908 (patch) | |
tree | 00fe980043d164a52acba82e6043be6bab590a2a | |
parent | shrink MINCLSIZE to MHLEN + 1 again for the release, we're not confident (diff) | |
download | wireguard-openbsd-904d0f53fdf9a03084df82f171cf8a15337c2908.tar.xz wireguard-openbsd-904d0f53fdf9a03084df82f171cf8a15337c2908.zip |
Not all devices support GET_DEF, fall back on GET_CUR if so.
Reported and tested kettenis@
-rw-r--r-- | sys/dev/usb/uvideo.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 7081958565b..b912819b1a3 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.61 2008/07/24 13:30:10 mglocker Exp $ */ +/* $OpenBSD: uvideo.c,v 1.62 2008/07/25 11:12:34 mglocker Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -1013,8 +1013,11 @@ uvideo_vs_negotiation(struct uvideo_softc *sc, int commit) /* get probe */ bzero(probe_data, sizeof(probe_data)); error = uvideo_vs_get_probe(sc, probe_data, GET_DEF); - if (error != USBD_NORMAL_COMPLETION) - return (error); + if (error != USBD_NORMAL_COMPLETION) { + error = uvideo_vs_get_probe(sc, probe_data, GET_CUR); + if (error != USBD_NORMAL_COMPLETION) + return (error); + } /* set probe */ pc->bFormatIndex = sc->sc_fmtgrp_cur->format->bFormatIndex; |