summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uvideo.c
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2008-07-25 11:12:35 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2008-07-25 11:12:35 +0000
commit9333371716e4afa58a373e040526d51d9dd28d1d (patch)
tree76382a37feb659a2b056fbb10bf06d95bdb66bf2 /sys/dev/usb/uvideo.c
parent1c92902b911b23f7190f60264efbad0b80b77e58 (diff)
Not all devices support GET_DEF, fall back on GET_CUR if so.
Reported and tested kettenis@
Diffstat (limited to 'sys/dev/usb/uvideo.c')
-rw-r--r--sys/dev/usb/uvideo.c9
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;