diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-09-29 09:33:27 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-09-29 09:33:27 +0000 |
commit | d9532f628b852e5606d87dc544c6a04466ad3696 (patch) | |
tree | f54c66cd85da4611c24ef071112490beac723c10 /sys | |
parent | db61ceed0b312cc093d0a6fe09d3425f34300db0 (diff) |
back out support for variable sized processing unit controls until
I can figure out why it causes boot hangs with some Sonix camera
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/uvideo.c | 11 | ||||
-rw-r--r-- | sys/dev/usb/uvideo.h | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index c1d6ef4abdc..67bae934cc9 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.138 2010/09/26 23:44:51 jakemsr Exp $ */ +/* $OpenBSD: uvideo.c,v 1.139 2010/09/29 09:33:26 jakemsr Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -675,14 +675,19 @@ uvideo_vc_parse_desc_pu(struct uvideo_softc *sc, struct usb_video_vc_processing_desc *d; d = (struct usb_video_vc_processing_desc *)(uint8_t *)desc; - d->iProcessing = d->bmControls[d->bControlSize]; - d->bmVideoStandards = d->bmControls[d->bControlSize + 1]; if (sc->sc_desc_vc_pu_num == UVIDEO_MAX_PU) { printf("%s: too many PU descriptors found!\n", DEVNAME(sc)); return (USBD_INVAL); } + /* XXX support variable bmControls fields */ + if (d->bControlSize != 2) { + printf("%s: video control not supported for this device.\n", + DEVNAME(sc)); + return (USBD_INVAL); + } + sc->sc_desc_vc_pu[sc->sc_desc_vc_pu_num] = d; sc->sc_desc_vc_pu_num++; diff --git a/sys/dev/usb/uvideo.h b/sys/dev/usb/uvideo.h index 5e12a702e28..d0326eab9da 100644 --- a/sys/dev/usb/uvideo.h +++ b/sys/dev/usb/uvideo.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.h,v 1.47 2010/09/26 23:44:51 jakemsr Exp $ */ +/* $OpenBSD: uvideo.h,v 1.48 2010/09/29 09:33:26 jakemsr Exp $ */ /* * Copyright (c) 2007 Robert Nagy <robert@openbsd.org> @@ -217,7 +217,7 @@ struct usb_video_vc_processing_desc { uByte bSourceID; uWord wMaxMultiplier; uByte bControlSize; - uByte bmControls[255]; /* [bControlSize] */ + uWord bmControls; /* XXX must be variable size of bControlSize */ uByte iProcessing; uByte bmVideoStandards; |