summaryrefslogtreecommitdiff
path: root/firmware/src/os/pcd_enumerate.c
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-30 14:01:59 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-30 14:01:59 +0000
commite9902c568091cb23c9d3466559124ae1784afb70 (patch)
tree4f2d679b0d05162967506b2d0d7a466d222a6238 /firmware/src/os/pcd_enumerate.c
parent568a1b28f402496a7867e4d4a8cee0f2094228c3 (diff)
- free all pending contexts when endpoint is being reset
- speed up usb processing by putting respective sections in RAM git-svn-id: https://svn.openpcd.org:2342/trunk@234 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src/os/pcd_enumerate.c')
-rw-r--r--firmware/src/os/pcd_enumerate.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/firmware/src/os/pcd_enumerate.c b/firmware/src/os/pcd_enumerate.c
index c170dc5..3c7c2c3 100644
--- a/firmware/src/os/pcd_enumerate.c
+++ b/firmware/src/os/pcd_enumerate.c
@@ -191,6 +191,9 @@ static void reset_ep(unsigned int ep)
/* free all currently transmitting contexts */
while (rctx = req_ctx_find_get(0, epstate[ep].state_busy,
RCTX_STATE_FREE)) {}
+ /* free all currently pending contexts */
+ while (rctx = req_ctx_find_get(0, epstate[ep].state_pending,
+ RCTX_STATE_FREE)) {}
pUDP->UDP_RSTEP |= (1 << ep);
pUDP->UDP_RSTEP &= ~(1 << ep);
@@ -206,7 +209,7 @@ void udp_unthrottle(void)
pUDP->UDP_IER = AT91C_UDP_EPINT1;
}
-static int __udp_refill_ep(int ep)
+static int __ramfunc __udp_refill_ep(int ep)
{
u_int16_t i;
AT91PS_UDP pUDP = upcd.pUdp;
@@ -265,8 +268,7 @@ static int __udp_refill_ep(int ep)
* - after ZLP of transfer % AT91C_EP_OUT_SIZE == 0
* - after last packet of transfer % AT91C_EP_OUT_SIZE != 0
*/
- DEBUGII("RCTX(ep=%u)_tx_done ", ep);
- DEBUGP("RCTX(ep=%u,ctx=%u)_tx_done ", ep, req_ctx_num(rctx));
+ DEBUGII("RCTX(ep=%u,ctx=%u)_tx_done ", ep, req_ctx_num(rctx));
upcd.ep[ep].incomplete.rctx = NULL;
req_ctx_put(rctx);
} else {
@@ -283,7 +285,7 @@ static int __udp_refill_ep(int ep)
return 1;
}
-int udp_refill_ep(int ep)
+int __ramfunc udp_refill_ep(int ep)
{
unsigned long flags;
int ret;
@@ -293,7 +295,7 @@ int udp_refill_ep(int ep)
local_irq_restore(flags);
}
-static void udp_irq(void)
+static void __ramfunc udp_irq(void)
{
u_int32_t csr;
AT91PS_UDP pUDP = upcd.pUdp;
personal git repositories of Harald Welte. Your mileage may vary