TUD-OS / NRE

NOVA runtime environment (official branch)
GNU General Public License v2.0
33 stars 12 forks source link

Disable SATA port interrupts when IDENTIFY fails #38

Closed parthy closed 11 years ago

parthy commented 11 years ago

When an IDENTIFY command fails, it may happen that the device sends interrupts afterwards. However, the object throws an exception and clears the port pointer, resulting in an endless interrupt loop because the is field of the respective port never gets cleared. I propose to disable interrupts before clearing the object pointer.

Nils-TUD commented 11 years ago

Damn it, I referenced the wrong issue. But it should be fixed now (https://github.com/TUD-OS/NRE/commit/b1cdee3b79f67ec0d38a70ffc795c24330813391).

parthy commented 11 years ago

Why don't you just set the IE register in identify_drive, before throwing the exception? ;)

Nils-TUD commented 11 years ago

Because set_parameters throws an exception as well and I wanted to prevent code-duplication (nobody cares about the performance of failures :)).

parthy commented 11 years ago

I see, that makes sense. :)