From 4e78ac33c5ab9849b471340dab5143677fbbff35 Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Tue, 20 Aug 2024 15:22:50 +0200 Subject: [PATCH] atabasedevice: disable device interrupts on reset. --- devices/common/ata/atabasedevice.cpp | 3 +++ devices/common/ata/atabasedevice.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/devices/common/ata/atabasedevice.cpp b/devices/common/ata/atabasedevice.cpp index ee6212b..d5d1a8c 100644 --- a/devices/common/ata/atabasedevice.cpp +++ b/devices/common/ata/atabasedevice.cpp @@ -46,6 +46,9 @@ void AtaBaseDevice::device_reset(bool is_soft_reset) { // Diagnostic code this->r_error = 1; // device 0 passed, device 1 passed or not present + + // disable interrupts + this->r_dev_ctrl |= ATA_CTRL::IEN; } void AtaBaseDevice::device_set_signature() { diff --git a/devices/common/ata/atabasedevice.h b/devices/common/ata/atabasedevice.h index 54959a7..df35909 100644 --- a/devices/common/ata/atabasedevice.h +++ b/devices/common/ata/atabasedevice.h @@ -92,7 +92,7 @@ protected: uint8_t r_command; uint8_t r_status; uint8_t r_status_save; - uint8_t r_dev_ctrl = 0x08; + uint8_t r_dev_ctrl = 0x08 | ata_interface::ATA_CTRL::IEN; // disable interrupts uint16_t *data_ptr = nullptr; uint16_t *cur_data_ptr = nullptr;