as3525v2-usb: mask usb interrupt when setting up a transfer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29130 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
297ca4b1af
commit
9b02ce9e49
1 changed files with 6 additions and 0 deletions
|
@ -748,6 +748,9 @@ static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocki
|
||||||
logf("usb-drv: xfer EP%d, len=%d, dir_in=%d, blocking=%d", ep,
|
logf("usb-drv: xfer EP%d, len=%d, dir_in=%d, blocking=%d", ep,
|
||||||
len, dir_in, blocking);
|
len, dir_in, blocking);
|
||||||
|
|
||||||
|
/* mask the usb interrupt to avoid any race */
|
||||||
|
VIC_INT_EN_CLEAR = INTERRUPT_USB;
|
||||||
|
|
||||||
volatile unsigned long *epctl = dir_in ? &DIEPCTL(ep) : &DOEPCTL(ep);
|
volatile unsigned long *epctl = dir_in ? &DIEPCTL(ep) : &DOEPCTL(ep);
|
||||||
volatile unsigned long *eptsiz = dir_in ? &DIEPTSIZ(ep) : &DOEPTSIZ(ep);
|
volatile unsigned long *eptsiz = dir_in ? &DIEPTSIZ(ep) : &DOEPTSIZ(ep);
|
||||||
volatile unsigned long *epdma = dir_in ? &DIEPDMA(ep) : &DOEPDMA(ep);
|
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
|
||||||
|
|
||||||
DEPCTL |= DEPCTL_epena | DEPCTL_cnak;
|
DEPCTL |= DEPCTL_epena | DEPCTL_cnak;
|
||||||
|
|
||||||
|
/* unmask the usb interrupt */
|
||||||
|
VIC_INT_ENABLE = INTERRUPT_USB;
|
||||||
|
|
||||||
if(blocking)
|
if(blocking)
|
||||||
{
|
{
|
||||||
wakeup_wait(&endpoint->complete, TIMEOUT_BLOCK);
|
wakeup_wait(&endpoint->complete, TIMEOUT_BLOCK);
|
||||||
|
|
Loading…
Reference in a new issue