1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Jonathan Gordon 2006-11-09 07:02:18 +00:00
parent d57fc0c581
commit fd0e640edd
2 changed files with 2 additions and 11 deletions

View file

@ -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);

View file

@ -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);