Skip to content

Commit

Permalink
atapibasedevice: fix task file initialization on reset.
Browse files Browse the repository at this point in the history
  • Loading branch information
maximumspatium committed Jul 9, 2023
1 parent a424d48 commit f7a1412
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions devices/common/ata/atapibasedevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ AtapiBaseDevice::AtapiBaseDevice(const std::string name)
}

void AtapiBaseDevice::device_set_signature() {
this->r_sect_count = 1;
this->r_sect_num = 1;
this->r_int_reason = 1; // shadows ATA r_sect_count
this->r_sect_num = 1; // required for protocol identification in OF 2.x
this->r_dev_head = 0;

// set ATAPI protocol signature
Expand Down Expand Up @@ -79,6 +79,8 @@ uint16_t AtapiBaseDevice::read(const uint8_t reg_addr) {
return this->r_error;
case ATAPI_Reg::INT_REASON:
return this->r_int_reason;
case ATA_Reg::SEC_NUM:
return this->r_sect_num;
case ATAPI_Reg::BYTE_COUNT_LO:
return this->r_byte_count & 0xFFU;
case ATAPI_Reg::BYTE_COUNT_HI:
Expand Down

0 comments on commit f7a1412

Please sign in to comment.