Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jun 2008 20:17:19 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 142908 for review
Message-ID:  <200806042017.m54KHJBx041119@repoman.freebsd.org>

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

Change 142908 by hselasky@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;
 }



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