atapi: Add ATAPI_SOFT_RESET command.

I don't know if this is correct.
This commit is contained in:
joevt 2023-08-15 15:20:33 -07:00 committed by dingusdev
parent 7866675a55
commit 2ece059c5e
1 changed files with 8 additions and 0 deletions

View File

@ -149,6 +149,14 @@ int AtapiBaseDevice::perform_command() {
this->r_status |= BSY;
switch (this->r_command) {
case ATAPI_SOFT_RESET:
LOG_F(ERROR, "%s: unsupported command 0x%X ATAPI_SOFT_RESET", this->name.c_str(), this->r_command);
#if 1
this->r_dev_ctrl |= SRST; // SRST set -> phase 0 aka self-test
this->r_status |= BSY;
this->device_reset(true);
#endif
break;
case ATAPI_PACKET:
this->data_ptr = (uint16_t *)this->cmd_pkt;
this->xfer_cnt = sizeof(this->cmd_pkt);