IDE soft reset should also reset ATAPI devices. Should fix at least some 'Device failed to request command' errors.

This commit is contained in:
SarahW 2019-04-14 13:47:20 +01:00
commit 9a49a75eaf
8 changed files with 52 additions and 0 deletions

View file

@ -563,3 +563,13 @@ void atapi_process_packet(atapi_device_t *atapi_dev)
break;
}
}
void atapi_reset(atapi_device_t *atapi_dev)
{
pclog("atapi_reset\n");
atapi_dev->state = ATAPI_STATE_IDLE;
atapi_dev->command_pos = 0;
atapi_dev->data_read_pos = 0;
atapi_dev->data_write_pos = 0;
scsi_bus_reset(&atapi_dev->bus);
}