From 9333371716e4afa58a373e040526d51d9dd28d1d Mon Sep 17 00:00:00 2001 From: Marcus Glocker Date: Fri, 25 Jul 2008 11:12:35 +0000 Subject: Not all devices support GET_DEF, fall back on GET_CUR if so. Reported and tested kettenis@ --- sys/dev/usb/uvideo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sys/dev/usb') 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 @@ -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; -- cgit v1.2.3