Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Mar 2009 22:09:54 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 159931 for review
Message-ID:  <200903272209.n2RM9sef074400@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=159931

Change 159931 by hselasky@hselasky_laptop001 on 2009/03/27 22:09:12

	
	USB CORE:
	  - fix regression issue:
	    - Root HUB was not displayed by USB config.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/usb_device.c#20 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#138 edit

Differences ...

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

@@ -305,16 +305,16 @@
 
 	(methods->pipe_init) (udev, edesc, pipe);
 
-	/* check for invalid pipe */
-	if (pipe->methods == NULL)
-		return;
-
 	/* initialise USB pipe structure */
 	pipe->edesc = edesc;
 	pipe->iface_index = iface_index;
 	TAILQ_INIT(&pipe->pipe_q.head);
 	pipe->pipe_q.command = &usb2_pipe_start;
 
+	/* the pipe is not supported by the hardware */
+ 	if (pipe->methods == NULL)
+		return;
+
 	/* clear stall, if any */
 	if (methods->clear_stall != NULL) {
 		USB_BUS_LOCK(udev->bus);

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

@@ -846,7 +846,7 @@
 			pipe = usb2_get_pipe(udev,
 			    ifaces[setup->if_index], setup);
 
-			if (!pipe) {
+			if ((pipe == NULL) || (pipe->methods == NULL)) {
 				if (setup->flags.no_pipe_ok)
 					continue;
 				if ((setup->usb_mode != USB_MODE_MAX) &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903272209.n2RM9sef074400>