diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/common/disk.c | 7 | ||||
-rw-r--r-- | firmware/drivers/ata_mmc.c | 2 | ||||
-rw-r--r-- | firmware/usb.c | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/firmware/common/disk.c b/firmware/common/disk.c index f4d153c1c2..2f1d789738 100644 --- a/firmware/common/disk.c +++ b/firmware/common/disk.c | |||
@@ -100,6 +100,10 @@ int disk_mount_all(void) | |||
100 | { | 100 | { |
101 | int mounted; | 101 | int mounted; |
102 | int i; | 102 | int i; |
103 | |||
104 | #if defined(HAVE_MMC) && defined(HAVE_HOTSWAP) | ||
105 | mmc_enable_monitoring(false); | ||
106 | #endif | ||
103 | 107 | ||
104 | fat_init(); /* reset all mounted partitions */ | 108 | fat_init(); /* reset all mounted partitions */ |
105 | for (i=0; i<NUM_VOLUMES; i++) | 109 | for (i=0; i<NUM_VOLUMES; i++) |
@@ -111,6 +115,9 @@ int disk_mount_all(void) | |||
111 | { | 115 | { |
112 | mounted += disk_mount(1); /* try 2nd "drive", too */ | 116 | mounted += disk_mount(1); /* try 2nd "drive", too */ |
113 | } | 117 | } |
118 | #ifdef HAVE_HOTSWAP | ||
119 | mmc_enable_monitoring(true); | ||
120 | #endif | ||
114 | #endif | 121 | #endif |
115 | 122 | ||
116 | return mounted; | 123 | return mounted; |
diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c index aa333dba32..9c2e5817f9 100644 --- a/firmware/drivers/ata_mmc.c +++ b/firmware/drivers/ata_mmc.c | |||
@@ -94,7 +94,7 @@ static struct mutex mmc_mutex; | |||
94 | static long mmc_stack[(DEFAULT_STACK_SIZE + 0x800)/sizeof(long)]; | 94 | static long mmc_stack[(DEFAULT_STACK_SIZE + 0x800)/sizeof(long)]; |
95 | static const char mmc_thread_name[] = "mmc"; | 95 | static const char mmc_thread_name[] = "mmc"; |
96 | static struct event_queue mmc_queue; | 96 | static struct event_queue mmc_queue; |
97 | static bool mmc_monitor_enabled = false; | 97 | static bool mmc_monitor_enabled = true; |
98 | #endif | 98 | #endif |
99 | static bool initialized = false; | 99 | static bool initialized = false; |
100 | static bool new_mmc_circuit; | 100 | static bool new_mmc_circuit; |
diff --git a/firmware/usb.c b/firmware/usb.c index 4b76fe60be..6095bcd65e 100644 --- a/firmware/usb.c +++ b/firmware/usb.c | |||
@@ -194,13 +194,7 @@ static void usb_slave_mode(bool on) | |||
194 | panicf("ata: %d",rc); | 194 | panicf("ata: %d",rc); |
195 | } | 195 | } |
196 | 196 | ||
197 | #if defined(HAVE_MMC) && defined(HAVE_HOTSWAP) | ||
198 | mmc_enable_monitoring(false); | ||
199 | rc = disk_mount_all(); | 197 | rc = disk_mount_all(); |
200 | mmc_enable_monitoring(true); | ||
201 | #else | ||
202 | rc = disk_mount_all(); | ||
203 | #endif | ||
204 | if (rc <= 0) /* no partition */ | 198 | if (rc <= 0) /* no partition */ |
205 | panicf("mount: %d",rc); | 199 | panicf("mount: %d",rc); |
206 | 200 | ||