summaryrefslogtreecommitdiff
path: root/firmware/target/arm/usb-s3c6400x.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/usb-s3c6400x.c')
-rw-r--r--firmware/target/arm/usb-s3c6400x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/target/arm/usb-s3c6400x.c b/firmware/target/arm/usb-s3c6400x.c
index 27164aef69..d51a71165c 100644
--- a/firmware/target/arm/usb-s3c6400x.c
+++ b/firmware/target/arm/usb-s3c6400x.c
@@ -432,7 +432,7 @@ void usb_drv_exit(void)
ORSTCON = 7; /* Put the PHY into reset (needed to get current down) */
udelay(10);
PCGCCTL = 1; /* Shut down PHY clock */
-
+
#if CONFIG_CPU==S5L8701
PWRCON |= 0x4000;
PWRCONEXT |= 0x800;
@@ -619,7 +619,7 @@ int usb_drv_send(int ep, void *ptr, int len)
struct ep_type *endpoint = &endpoints[ep][1];
endpoint->done = false;
ep_transfer(ep, ptr, len, false);
- while (endpoint->busy && !endpoint->done)
- semaphore_wait(&endpoint->complete, TIMEOUT_BLOCK);
+ while (endpoint->busy && !endpoint->done && usb_detect() != USB_EXTRACTED)
+ semaphore_wait(&endpoint->complete, HZ);
return endpoint->status;
}