PERFORCE change 103114 for review

Hans Petter Selasky hselasky at FreeBSD.org
Thu Aug 3 13:24:59 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=103114

Change 103114 by hselasky at hselasky_mini_itx on 2006/08/03 13:24:52

	Correct wrong size of hub descriptor.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/uhub.c#5 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/uhub.c#5 (text+ko) ====

@@ -412,7 +412,8 @@
 
 	if(!err && (nports >= 8))
 	{
-		USETW(req.wLength, USB_HUB_DESCRIPTOR_SIZE + (nports / 8));
+		u_int16_t len = (USB_HUB_DESCRIPTOR_SIZE-1) + ((nports+7) / 8);
+		USETW(req.wLength, len);
 		err = usbd_do_request(udev, &req, &hubdesc);
 	}
 


More information about the p4-projects mailing list