[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree

zrouter-src-freebsd at zrouter.org zrouter-src-freebsd at zrouter.org
Sun Sep 16 19:59:46 UTC 2012


details:   http://zrouter.org/hg/FreeBSD/head//rev/5fa13a913a6d
changeset: 536:5fa13a913a6d
user:      Aleksandr Rybalko <ray at ddteam.net>
date:      Sun Sep 16 23:02:39 2012 +0300
description:
* Remove ARM depended cache routines.
* Remove unused printfs.
* Send short packet when BULK OUT done.

diffstat:

 head/sys/dev/usb/controller/dotg.c |  12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diffs (58 lines):

diff -r 1ca6f0830304 -r 5fa13a913a6d head/sys/dev/usb/controller/dotg.c
--- a/head/sys/dev/usb/controller/dotg.c	Fri Sep 07 12:57:57 2012 +0300
+++ b/head/sys/dev/usb/controller/dotg.c	Sun Sep 16 23:02:39 2012 +0300
@@ -155,9 +155,7 @@
 	int channel;
 
 	do {
-		cpu_dcache_inv_range((vm_offset_t)sc, sizeof(sc));
 		old = sc->idle_hardware_channels;
-//		printf("%s: old=%08x\n", __func__, old);
 		new = 0;
 		for (channel = 0; channel < sc->channels; channel++)
 			if (old & (1 << channel)) {
@@ -169,9 +167,6 @@
 			return (-1);
 		}
 	} while (!atomic_cmpset_32(&sc->idle_hardware_channels, old, new));
-//	printf("%s: updated=%08x\n", __func__, sc->idle_hardware_channels);
-
-	cpu_dcache_wb_range((vm_offset_t)sc, sizeof(sc));
 
 	return (channel);
 }
@@ -182,17 +177,13 @@
 	uint32_t old, new;
 
 	do {
-		cpu_dcache_inv_range((vm_offset_t)sc, sizeof(sc));
 		old = sc->idle_hardware_channels;
-//		printf("%s: old=%08x\n", __func__, old);
 		if (old & (1 << channel))
 			/* Already idle */
 			return;
 		new = sc->idle_hardware_channels | (1 << channel);
 	} while (!atomic_cmpset_32(&sc->idle_hardware_channels, old, new));
 
-//	printf("%s: updated=%08x\n", __func__, sc->idle_hardware_channels);
-	cpu_dcache_wb_range((vm_offset_t)sc, sizeof(sc));
 }
 
 static inline int
@@ -1017,7 +1008,6 @@
 		/* else need to send a zero length packet */
 		rem = 0;
 		td->short_pkt = 1;
-		return (0);	/* complete */ 
 	} else {
 		/*
 		 * XXX TODO: fix handling transfers 1024 < x < DOTG_MAX_FIXUP
@@ -1370,8 +1360,6 @@
 	struct usb_xfer *xfer;
 	uint32_t gintsts;
 
-	cpu_dcache_inv_range((vm_offset_t)sc, sizeof(sc));
-
 	gintsts = READ4(sc, DOTG_GINTSTS);
 	WRITE4(sc, DOTG_GINTSTS, gintsts);
 


More information about the Zrouter-src-freebsd mailing list