summaryrefslogtreecommitdiffstats
path: root/src/usb-device.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2014-11-21 17:16:10 +0100
committerPali Rohár <pali.rohar@gmail.com>2014-11-21 17:16:10 +0100
commit6372323ee8d3f60d0668e0ed4f98cf8c8e06b9fa (patch)
treebb80576f6effb2ed7189934227d1d5e1a813f9c8 /src/usb-device.c
parent7023b4b290cb92e15411331ae930e76e12f6834b (diff)
download0xFFFF-6372323ee8d3f60d0668e0ed4f98cf8c8e06b9fa.tar.bz2
usb-device: Difference between Update and PC Suite mode
Diffstat (limited to 'src/usb-device.c')
-rw-r--r--src/usb-device.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/usb-device.c b/src/usb-device.c
index 1f9b403..943303b 100644
--- a/src/usb-device.c
+++ b/src/usb-device.c
@@ -384,7 +384,7 @@ void usb_switch_to_update(struct usb_device_info * dev) {
leave_cold_flash(dev);
else if ( dev->flash_device->protocol == FLASH_NOLO )
nolo_boot_device(dev, "update");
- else if ( dev->flash_device->protocol == FLASH_MKII )
+ else if ( dev->flash_device->protocol == FLASH_MKII && ! ( dev->data & ( 1 << 31 ) ) )
mkii_reboot_device(dev);
else if ( dev->flash_device->protocol == FLASH_DISK )
printf_and_wait("Unplug USB cable, turn device off, press ENTER and plug USB cable again");
@@ -400,7 +400,11 @@ void usb_switch_to_disk(struct usb_device_info * dev) {
else if ( dev->flash_device->protocol == FLASH_NOLO ) {
nolo_boot_device(dev, NULL);
printf_and_wait("Wait until device start, choose USB Mass Storage Mode and press ENTER");
- } else if ( dev->flash_device->protocol == FLASH_MKII )
- mkii_reboot_device(dev);
+ } else if ( dev->flash_device->protocol == FLASH_MKII ) {
+ if ( dev->data & ( 1 << 31 ) )
+ mkii_reboot_device(dev);
+ else
+ printf_and_wait("Unplug USB cable, plug again, choose USB Mass Storage Mode and press ENTER");
+ }
}