summaryrefslogtreecommitdiffstats
path: root/firmware/usb.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-01-28 04:01:34 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-01-28 04:01:34 +0000
commitb4fa66d7c7954ab1121228deffaacfdb8e5f7bcb (patch)
tree417ddabd0fd735a2220172a449ea75065b7ae0f8 /firmware/usb.c
parentac7fe5fb827f3f319acbcb778d927552312a01f6 (diff)
downloadrockbox-b4fa66d7c7954ab1121228deffaacfdb8e5f7bcb.tar.gz
rockbox-b4fa66d7c7954ab1121228deffaacfdb8e5f7bcb.tar.bz2
rockbox-b4fa66d7c7954ab1121228deffaacfdb8e5f7bcb.zip
Big oops. Should be broadcasting SYS_USB_DISCONNECTED _after_ remouting disks.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29150 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usb.c')
-rw-r--r--firmware/usb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index 02238e1fc2..91c620fdc0 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -481,14 +481,15 @@ static void usb_thread(void)
if(usb_state == USB_EXTRACTED)
break;
- usb_configure_drivers(USB_EXTRACTED);
-
/* Only disable the USB slave mode if we really have enabled
it. Some expected acks may not have been received. */
if(usb_state == USB_INSERTED)
usb_slave_mode(false);
usb_state = USB_EXTRACTED;
+
+ /* Ok to broadcast disconnect now */
+ usb_configure_drivers(USB_EXTRACTED);
break;
/* USB_UNPOWERED: USB_EXTRACTED: */