From e4e90fe88321868d6574da0f078a13a77c441d0d Mon Sep 17 00:00:00 2001 From: pamaury Date: Tue, 7 Sep 2010 20:50:23 +0000 Subject: [PATCH] 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 --- firmware/target/arm/as3525/usb-drv-as3525v2.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/firmware/target/arm/as3525/usb-drv-as3525v2.c b/firmware/target/arm/as3525/usb-drv-as3525v2.c index 638ffadc7..7c0ca5fce 100644 --- a/firmware/target/arm/as3525/usb-drv-as3525v2.c +++ b/firmware/target/arm/as3525/usb-drv-as3525v2.c @@ -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, - len, dir_in, blocking); - } + + 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) -- 2.11.4.GIT