as3525v2-usb: fix red and fix stupid typo about endpoint status

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28029 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Amaury Pouly 2010-09-07 20:50:23 +00:00
parent f20d11c718
commit f140930714

View file

@ -731,11 +731,9 @@ void usb_drv_cancel_all_transfers()
static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocking)
{
ep = EP_NUM(ep);
if(ep != 0)
{
_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);
}
volatile unsigned long *epctl = dir_in ? &DIEPCTL(ep) : &DOEPCTL(ep);
volatile unsigned long *eptsiz = dir_in ? &DIEPTSIZ(ep) : &DOEPTSIZ(ep);
@ -746,19 +744,16 @@ static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocki
#define DEPDMA *epdma
if(endpoint->busy)
_logf("usb-drv: EP%d %s is already busy", ep, dir_in ? "IN" : "OUT");
logf("usb-drv: EP%d %s is already busy", ep, dir_in ? "IN" : "OUT");
endpoint->busy = true;
endpoint->len = len;
endpoint->wait = blocking;
endpoint->status = true;
endpoint->status = 0;
DEPCTL &= ~DEPCTL_stall;
DEPCTL |= DEPCTL_usbactep;
if(ep != 0)
_logf("usb-drv: depctl=%lx", DEPCTL);
int mps = usb_drv_mps_by_type(extract(DEPCTL, eptype));
int nb_packets = (len + mps - 1) / mps;
@ -778,9 +773,6 @@ static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocki
DEPCTL |= DEPCTL_epena | DEPCTL_cnak;
if(ep != 0)
_logf("usb-drv: depctl=%lx", DEPCTL);
if(blocking)
wakeup_wait(&endpoint->complete, TIMEOUT_BLOCK);
if(endpoint->status != 0)