summaryrefslogtreecommitdiff
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
parentd57fc0c5819a4af25a6bcbc1c21e8960e042220d (diff)
downloadrockbox-fd0e640eddcabdc5f5d8dc397df01be69738be37.tar.gz
rockbox-fd0e640eddcabdc5f5d8dc397df01be69738be37.zip
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
-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)
1374 } 1374 }
1375 queue_wait(&ata_queue, &ev); 1375 queue_wait(&ata_queue, &ev);
1376 switch ( ev.id ) { 1376 switch ( ev.id ) {
1377 case SYS_POWEROFF:
1378 call_ata_idle_notifys(false);
1379 break;
1380 case SYS_USB_CONNECTED:
1381 call_ata_idle_notifys(false);
1382#ifndef USB_NONE 1377#ifndef USB_NONE
1378 case SYS_USB_CONNECTED:
1383 if (poweroff) { 1379 if (poweroff) {
1384 mutex_lock(&ata_mtx); 1380 mutex_lock(&ata_mtx);
1385 ata_led(true); 1381 ata_led(true);
@@ -1394,8 +1390,8 @@ static void ata_thread(void)
1394 1390
1395 /* Wait until the USB cable is extracted again */ 1391 /* Wait until the USB cable is extracted again */
1396 usb_wait_for_disconnect(&ata_queue); 1392 usb_wait_for_disconnect(&ata_queue);
1397#endif
1398 break; 1393 break;
1394#endif
1399 case Q_SLEEP: 1395 case Q_SLEEP:
1400 call_ata_idle_notifys(true); 1396 call_ata_idle_notifys(true);
1401 last_disk_activity = current_tick - sleep_timeout + (HZ/2); 1397 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)
987 queue_wait_w_tmo(&mmc_queue, &ev, HZ); 987 queue_wait_w_tmo(&mmc_queue, &ev, HZ);
988 switch ( ev.id ) 988 switch ( ev.id )
989 { 989 {
990 case SYS_POWEROFF:
991 call_ata_idle_notifys(false);
992 break;
993
994 case SYS_USB_CONNECTED: 990 case SYS_USB_CONNECTED:
995 call_ata_idle_notifys(false);
996 usb_acknowledge(SYS_USB_CONNECTED_ACK); 991 usb_acknowledge(SYS_USB_CONNECTED_ACK);
997 /* Wait until the USB cable is extracted again */ 992 /* Wait until the USB cable is extracted again */
998 usb_wait_for_disconnect(&mmc_queue); 993 usb_wait_for_disconnect(&mmc_queue);