Date: Tue, 25 Dec 2007 19:28:02 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 131604 for review Message-ID: <200712251928.lBPJS2QQ023786@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=131604 Change 131604 by hselasky@hselasky_laptop001 on 2007/12/25 19:27:12 Get "bInterfaceNumber" right. The variable is incremented prior to writing it into the interface structures, so we need to start at minus one, so that the first interface gets a value of zero. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_template.c#10 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_template.c#10 (text+ko) ==== @@ -256,7 +256,7 @@ /* Reset some counters */ - temp->bInterfaceNumber = 0; + temp->bInterfaceNumber = 0 - 1; temp->bAlternateSetting = 0; /* Scan all the USB interfaces */ @@ -281,7 +281,7 @@ cd->bLength = sizeof(*cd); cd->bDescriptorType = UDESC_CONFIG; USETW(cd->wTotalLength, old_size); - cd->bNumInterface = temp->bInterfaceNumber; + cd->bNumInterface = temp->bInterfaceNumber + 1; cd->bConfigurationValue = temp->bConfigurationValue; cd->iConfiguration = tcd->iConfiguration; cd->bmAttributes = tcd->bmAttributes;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712251928.lBPJS2QQ023786>