Subversion Repositories freemyipod

Rev

Rev 814 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 814 Rev 835
Line 916... Line 916...
916
    }
916
    }
917
    ata_set_active();
917
    ata_set_active();
918
    return 0;
918
    return 0;
919
}
919
}
920
 
920
 
921
static void ata_thread(void)
921
static void ata_thread(void* arg0, void* arg1, void* arg2, void* arg3)
922
{
922
{
923
    while (true)
923
    while (true)
924
    {
924
    {
925
        mutex_lock(&ata_mutex, TIMEOUT_BLOCK);
925
        mutex_lock(&ata_mutex, TIMEOUT_BLOCK);
926
        if (TIME_AFTER(USEC_TIMER, ata_last_activity_value + ata_sleep_timeout) && ata_powered)
926
        if (TIME_AFTER(USEC_TIMER, ata_last_activity_value + ata_sleep_timeout) && ata_powered)
Line 1107... Line 1107...
1107
    ata_total_sectors = 0;
1107
    ata_total_sectors = 0;
1108
#ifdef ATA_HAVE_BBT
1108
#ifdef ATA_HAVE_BBT
1109
    ata_bbt_reload();
1109
    ata_bbt_reload();
1110
#endif
1110
#endif
1111
    thread_create(&ata_thread_handle, "ATA idle monitor", ata_thread, ata_stack,
1111
    thread_create(&ata_thread_handle, "ATA idle monitor", ata_thread, ata_stack,
1112
                  sizeof(ata_stack), OS_THREAD, 1, true);
1112
                  sizeof(ata_stack), OS_THREAD, 1, true, NULL, NULL, NULL, NULL);
1113
    return 0;
1113
    return 0;
1114
}
1114
}
1115
 
1115
 
1116
int ata_num_drives(int first_drive)
1116
int ata_num_drives(int first_drive)
1117
{
1117
{