PERFORCE change 131195 for review

Hans Petter Selasky hselasky at FreeBSD.org
Tue Dec 18 17:43:18 PST 2007


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

Change 131195 by hselasky at hselasky_laptop001 on 2007/12/19 01:42:52

	
	This commit is device side related.
	
	Add call to new "set_config" method that is used
	to configure the hardware for a specific configuration.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/usb_requests.c#14 edit

Differences ...

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

@@ -652,6 +652,16 @@
 
 	PRINTF(("setting config %d\n", conf));
 
+	/* If we have a "set_config" method then call it */
+
+	if (udev->bus->methods->set_config) {
+		(udev->bus->methods->set_config)
+		    (udev, (conf == USB_UNCONFIG_NO) ?
+		    NULL : udev->cdesc);
+	}
+	if (udev->flags.usb_mode == USB_MODE_DEVICE) {
+		return (0);		/* success */
+	}
 	req.bmRequestType = UT_WRITE_DEVICE;
 	req.bRequest = UR_SET_CONFIG;
 	req.wValue[0] = conf;


More information about the p4-projects mailing list