From fd0e640eddcabdc5f5d8dc397df01be69738be37 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 9 Nov 2006 07:02:18 +0000 Subject: 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 --- firmware/drivers/ata.c | 8 ++------ firmware/drivers/ata_mmc.c | 5 ----- 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); -- cgit v1.2.3