54,7 → 54,6 |
#include <sys/types.h> |
#include <errno.h> |
#include <bool.h> |
#include <task.h> |
|
#include "ata_bd.h" |
|
96,9 → 95,7 |
return -1; |
|
/* Put drives to reset, disable interrupts. */ |
printf("Reset drives... "); |
fflush(stdout); |
|
printf("Reset drives...\n"); |
pio_write_8(&ctl->device_control, DCR_SRST); |
/* FIXME: Find out how to do this properly. */ |
async_usleep(100); |
109,6 → 106,8 |
} while ((status & SR_BSY) != 0); |
printf("Done\n"); |
|
printf("Status = 0x%x\n", pio_read_8(&cmd->status)); |
|
(void) drive_identify(0, &disk[0]); |
(void) drive_identify(1, &disk[1]); |
|
136,7 → 135,6 |
} |
|
printf(NAME ": Accepting connections\n"); |
task_retval(0); |
async_manager(); |
|
/* Not reached */ |
149,14 → 147,13 |
uint8_t status; |
size_t i; |
|
printf("Identify drive %d... ", disk_id); |
fflush(stdout); |
|
printf("Identify drive %d\n", disk_id); |
pio_write_8(&cmd->drive_head, ((disk_id != 0) ? DHR_DRV : 0)); |
async_usleep(100); |
pio_write_8(&cmd->command, CMD_IDENTIFY_DRIVE); |
|
status = pio_read_8(&cmd->status); |
printf("Status = 0x%x\n", status); |
|
d->present = false; |
|