summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiGang <b41990@freescale.com>2012-08-10 19:21:47 +0800
committerJustin Waters <justin.waters@timesys.com>2012-09-12 11:05:54 -0400
commit7eb692a7ae44aa5dd34cf17d6c99c46d8885c2f1 (patch)
tree096a0eeccf416a7900004471a5cda68ece4c4759
parent2ec365d6fedd8cface7cc405a98e4552522fcc9a (diff)
ENGR00220076 fix the fastboot usb re-connect issue
in fastboot mode, if usb cable re-connectted, the fastboot feature will fail. This issue is caused by logic control oversight. Signed-off-by: LiGang <b41990@freescale.com>
-rw-r--r--drivers/fastboot/fastboot.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/fastboot/fastboot.c b/drivers/fastboot/fastboot.c
index 75d2034ac3..3dcab329eb 100644
--- a/drivers/fastboot/fastboot.c
+++ b/drivers/fastboot/fastboot.c
@@ -625,6 +625,10 @@ int fastboot_usb_recv(u8 *buf, int count)
while (!len) {
if (is_usb_disconnected()) {
+ /*it will not unconfigure when disconnect
+ from host, so here needs manual unconfigure
+ anyway, it's just a workaround*/
+ fastboot_configured_flag = 0;
usb_disconnected = 1;
return 0;
}
@@ -654,6 +658,10 @@ int fastboot_poll()
if (usb_disconnected) {
udc_disconnect();
udc_connect();
+ /*the udc_connect will be blocked until connect to host
+ so, the usb_disconnect should be 0 after udc_connect,
+ and should be set manually. Anyway, it's just a workaround*/
+ usb_disconnected = 0;
}
if (!length)