PERFORCE change 131604 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Dec 25 11:28:04 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=131604
Change 131604 by hselasky at 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;
More information about the p4-projects
mailing list