File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ uint16_t AtaBaseDevice::read(const uint8_t reg_addr) {
107
107
void AtaBaseDevice::write (const uint8_t reg_addr, const uint16_t value) {
108
108
switch (reg_addr) {
109
109
case ATA_Reg::DATA:
110
- if (this ->has_data ()) {
110
+ if (is_selected () && this ->has_data ()) {
111
111
*this ->cur_data_ptr ++ = BYTESWAP_16 (value);
112
112
this ->chunk_cnt -= 2 ;
113
113
if (this ->chunk_cnt <= 0 ) {
Original file line number Diff line number Diff line change @@ -149,6 +149,11 @@ int AtapiBaseDevice::perform_command() {
149
149
this ->r_status |= BSY;
150
150
151
151
switch (this ->r_command ) {
152
+ case ATAPI_SOFT_RESET:
153
+ this ->device_reset (true );
154
+ this ->device_set_signature ();
155
+ this ->r_status &= ~BSY;
156
+ break ;
152
157
case ATAPI_PACKET:
153
158
this ->data_ptr = (uint16_t *)this ->cmd_pkt ;
154
159
this ->xfer_cnt = sizeof (this ->cmd_pkt );
You can’t perform that action at this time.
0 commit comments