X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/21ffd87b228fa0bd0c25a09b710c6aeac8b81281..bf870a1dde437a48ae40d092a14e164c861ea102:/lunaix-os/hal/ahci/ata.c?ds=sidebyside diff --git a/lunaix-os/hal/ahci/ata.c b/lunaix-os/hal/ahci/ata.c index a77e03b..118bf11 100644 --- a/lunaix-os/hal/ahci/ata.c +++ b/lunaix-os/hal/ahci/ata.c @@ -9,8 +9,9 @@ void sata_read_error(struct hba_port* port) { uint32_t tfd = port->regs[HBA_RPxTFD]; - port->device->last_error = (tfd >> 8) & 0xff; - port->device->last_status = tfd & 0xff; + port->device->last_result.sense_key = (tfd & 0xf000) >> 12; + port->device->last_result.error = (tfd & 0x0f00) >> 8; + port->device->last_result.status = tfd & 0x00ff; } int