PERFORCE change 142908 for review

Hans Petter Selasky hselasky at FreeBSD.org
Wed Jun 4 20:17:20 UTC 2008


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

Change 142908 by hselasky at hselasky_laptop001 on 2008/06/04 20:16:45

	
	USB Device Side related bugfixes.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/at9100_dci.c#17 edit
.. //depot/projects/usb/src/sys/dev/usb/uss820_dci.c#12 edit

Differences ...

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

@@ -1320,6 +1320,16 @@
 		/* clearing stall is not needed */
 		return;
 	}
+	/* compute CSR register offset */
+	csr_reg = AT91_UDP_CSR(ep_no);
+
+	/* compute default CSR value */
+	csr_val = 0;
+	AT91_CSR_ACK(csr_val, 0);
+
+	/* disable endpoint */
+	AT91_UDP_WRITE_4(sc, csr_reg, csr_val);
+
 	/* get endpoint profile */
 	at9100_dci_get_hw_ep_profile(NULL, &pf, ep_no);
 
@@ -1332,7 +1342,6 @@
 	 * FIFO banks aswell, but it doesn't! We have to do this
 	 * manually!
 	 */
-	csr_reg = AT91_UDP_CSR(ep_no);
 
 	/* release FIFO banks, if any */
 	for (to = 0; to != 2; to++) {
@@ -1366,6 +1375,8 @@
 		AT91_UDP_WRITE_4(sc, csr_reg, csr_val);
 	}
 
+	/* compute default CSR value */
+	csr_val = 0;
 	AT91_CSR_ACK(csr_val, 0);
 
 	/* enable endpoint */
@@ -1412,8 +1423,8 @@
 	/* reset endpoint */
 	at9100_dci_clear_stall_sub(sc,
 	    (ed->bEndpointAddress & UE_ADDR),
-	    (ed->bEndpointAddress & (UE_DIR_IN | UE_DIR_OUT)),
-	    (ed->bmAttributes & UE_XFERTYPE));
+	    (ed->bmAttributes & UE_XFERTYPE),
+	    (ed->bEndpointAddress & (UE_DIR_IN | UE_DIR_OUT)));
 	return;
 }
 

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

@@ -1354,8 +1354,8 @@
 
 	uss820_dci_clear_stall_sub(sc,
 	    (ed->bEndpointAddress & UE_ADDR),
-	    (ed->bEndpointAddress & (UE_DIR_IN | UE_DIR_OUT)),
-	    (ed->bmAttributes & UE_XFERTYPE));
+	    (ed->bmAttributes & UE_XFERTYPE),
+	    (ed->bEndpointAddress & (UE_DIR_IN | UE_DIR_OUT)));
 
 	return;
 }


More information about the p4-projects mailing list