diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2008-08-16 18:56:08 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2008-08-16 18:56:08 +0000 |
commit | 19f3c89e50541cffa7bcd122f848b015a52b1fc0 (patch) | |
tree | c1687931c03b955e38cc1cd27ac11e99b39d633b /sys | |
parent | eb02933711a94470bae8e8496d36dd0416dc315c (diff) |
If dwMaxPayloadTransferSize doesn't exactly match to an existing
endpoint, pick the next higher endpoint bandwidth.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/uvideo.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 4d6b12734ca..9766bbce15f 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.81 2008/08/13 20:29:34 mglocker Exp $ */ +/* $OpenBSD: uvideo.c,v 1.82 2008/08/16 18:56:07 mglocker Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -916,11 +916,10 @@ uvideo_vs_set_alt(struct uvideo_softc *sc, usbd_interface_handle ifaceh, i++; /* save endpoint with requested bandwidth */ - if (UGETW(ed->wMaxPacketSize) == max_packet_size) { + if (UGETW(ed->wMaxPacketSize) >= max_packet_size) { sc->sc_vs_curr->endpoint = ed->bEndpointAddress; sc->sc_vs_curr->curalt = id->bAlternateSetting; - sc->sc_vs_curr->max_packet_size = - UGETW(ed->wMaxPacketSize); + sc->sc_vs_curr->max_packet_size = max_packet_size; DPRINTF(1, "%s: set alternate iface to ", DEVNAME(sc)); DPRINTF(1, "bAlternateSetting=0x%02x\n", id->bAlternateSetting); |