PERFORCE change 131972 for review

Hans Petter Selasky hselasky at FreeBSD.org
Sat Dec 29 09:10:12 PST 2007


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

Change 131972 by hselasky at hselasky_laptop001 on 2007/12/29 17:09:23

	
	If there are zero configurations in the device qualifier
	there should be no need to support the other speed
	configuration descriptor.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/at9100_dci.c#11 edit
.. //depot/projects/usb/src/sys/dev/usb/ehci.c#67 edit

Differences ...

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

@@ -1813,8 +1813,8 @@
 	.bDeviceClass = UDCLASS_HUB,
 	.bDeviceSubClass = UDSUBCLASS_HUB,
 	.bDeviceProtocol = UDPROTO_FSHUB,
-	.bMaxPacketSize0 = 64,
-	.bNumConfigurations = 1,
+	.bMaxPacketSize0 = 0,
+	.bNumConfigurations = 0,
 };
 
 static const struct at9100_dci_config_desc at9100_dci_confd = {

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

@@ -2971,8 +2971,8 @@
 	UDCLASS_HUB,			/* class */
 	UDSUBCLASS_HUB,			/* subclass */
 	UDPROTO_FSHUB,			/* protocol */
-	64,				/* max packet */
-	1,				/* # of configurations */
+	0,				/* max packet */
+	0,				/* # of configurations */
 	0
 };
 
@@ -2980,9 +2980,7 @@
 	.confd = {
 		sizeof(usb_config_descriptor_t),
 		UDESC_CONFIG,
-		{USB_CONFIG_DESCRIPTOR_SIZE +
-			USB_INTERFACE_DESCRIPTOR_SIZE +
-		USB_ENDPOINT_DESCRIPTOR_SIZE},
+		sizeof(ehci_confd),
 		1,
 		1,
 		0,
@@ -3140,12 +3138,7 @@
 			std->len = sizeof(ehci_odevd);
 			sc->sc_hub_desc.odevd = ehci_odevd;
 			break;
-			/*
-			 * We can't really operate at another speed,
-			 * but the specification says we need this
-			 * descriptor:
-			 */
-		case UDESC_OTHER_SPEED_CONFIGURATION:
+
 		case UDESC_CONFIG:
 			if ((value & 0xff) != 0) {
 				std->err = USBD_IOERROR;
@@ -3153,8 +3146,6 @@
 			}
 			std->len = sizeof(ehci_confd);
 			sc->sc_hub_desc.confd = ehci_confd;
-			sc->sc_hub_desc.confd.confd.bDescriptorType =
-			    (value >> 8);
 			break;
 
 		case UDESC_STRING:


More information about the p4-projects mailing list