summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/as3525/usb-drv-as3525v2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/usb-drv-as3525v2.c b/firmware/target/arm/as3525/usb-drv-as3525v2.c
index dc9e0b3949..165c0e4723 100644
--- a/firmware/target/arm/as3525/usb-drv-as3525v2.c
+++ b/firmware/target/arm/as3525/usb-drv-as3525v2.c
@@ -748,6 +748,9 @@ static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocki
748 logf("usb-drv: xfer EP%d, len=%d, dir_in=%d, blocking=%d", ep, 748 logf("usb-drv: xfer EP%d, len=%d, dir_in=%d, blocking=%d", ep,
749 len, dir_in, blocking); 749 len, dir_in, blocking);
750 750
751 /* mask the usb interrupt to avoid any race */
752 VIC_INT_EN_CLEAR = INTERRUPT_USB;
753
751 volatile unsigned long *epctl = dir_in ? &DIEPCTL(ep) : &DOEPCTL(ep); 754 volatile unsigned long *epctl = dir_in ? &DIEPCTL(ep) : &DOEPCTL(ep);
752 volatile unsigned long *eptsiz = dir_in ? &DIEPTSIZ(ep) : &DOEPTSIZ(ep); 755 volatile unsigned long *eptsiz = dir_in ? &DIEPTSIZ(ep) : &DOEPTSIZ(ep);
753 volatile unsigned long *epdma = dir_in ? &DIEPDMA(ep) : &DOEPDMA(ep); 756 volatile unsigned long *epdma = dir_in ? &DIEPDMA(ep) : &DOEPDMA(ep);
@@ -789,6 +792,9 @@ static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocki
789 792
790 DEPCTL |= DEPCTL_epena | DEPCTL_cnak; 793 DEPCTL |= DEPCTL_epena | DEPCTL_cnak;
791 794
795 /* unmask the usb interrupt */
796 VIC_INT_ENABLE = INTERRUPT_USB;
797
792 if(blocking) 798 if(blocking)
793 { 799 {
794 wakeup_wait(&endpoint->complete, TIMEOUT_BLOCK); 800 wakeup_wait(&endpoint->complete, TIMEOUT_BLOCK);