summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-11-09 07:02:18 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-11-09 07:02:18 +0000
commitfd0e640eddcabdc5f5d8dc397df01be69738be37 (patch)
tree7860543ba226cc79fc7d0e7a3804f2aca1100308 /firmware
parentd57fc0c5819a4af25a6bcbc1c21e8960e042220d (diff)
Bah, Linus was right, trying to call the ata_idle callbacks on usb and
shutdown doesnt work. Threads with callbacks must handle these 2 events instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11477 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/ata.c8
-rw-r--r--firmware/drivers/ata_mmc.c5
2 files changed, 2 insertions, 11 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 7dcc049b64..4017d5f3f7 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -1374,12 +1374,8 @@ static void ata_thread(void)
}
queue_wait(&ata_queue, &ev);
switch ( ev.id ) {
- case SYS_POWEROFF:
- call_ata_idle_notifys(false);
- break;
- case SYS_USB_CONNECTED:
- call_ata_idle_notifys(false);
#ifndef USB_NONE
+ case SYS_USB_CONNECTED:
if (poweroff) {
mutex_lock(&ata_mtx);
ata_led(true);
@@ -1394,8 +1390,8 @@ static void ata_thread(void)
/* Wait until the USB cable is extracted again */
usb_wait_for_disconnect(&ata_queue);
-#endif
break;
+#endif
case Q_SLEEP:
call_ata_idle_notifys(true);
last_disk_activity = current_tick - sleep_timeout + (HZ/2);
diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c
index 65abcb57e5..9491429542 100644
--- a/firmware/drivers/ata_mmc.c
+++ b/firmware/drivers/ata_mmc.c
@@ -987,12 +987,7 @@ static void mmc_thread(void)
queue_wait_w_tmo(&mmc_queue, &ev, HZ);
switch ( ev.id )
{
- case SYS_POWEROFF:
- call_ata_idle_notifys(false);
- break;
-
case SYS_USB_CONNECTED:
- call_ata_idle_notifys(false);
usb_acknowledge(SYS_USB_CONNECTED_ACK);
/* Wait until the USB cable is extracted again */
usb_wait_for_disconnect(&mmc_queue);