From 904d0f53fdf9a03084df82f171cf8a15337c2908 Mon Sep 17 00:00:00 2001 From: mglocker Date: Fri, 25 Jul 2008 11:12:34 +0000 Subject: [PATCH] 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(-) 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; -- 2.20.1