AHCI Question - BSY Flag in the Task File Data Register
Posted: Fri Oct 11, 2013 12:23 am
Hi!
I'm currently implementing an AHCI driver. I've got IDENTIFY working in QEMU, so I decided to try out real hardware. Unfortunately, I've found numerous discrepancies between hardware implementations. On one of my machines, I can't run commands because the BSY flag is set immediately after the connection with the device is established. In turn, the CR flag never gets set and so the command engine never starts.
I've sent a COMRESET to that port and that resets the BSY flag temporarily, but it quickly gets reset by the controller once the connection with the drive is re-established. Has anyone else encountered a problem like this? I've read the specs, and AFAICT, the BSY flag shouldn't be set at least until a command is executed. Does anyone know why this is happening?
Thanks in advance.
I'm currently implementing an AHCI driver. I've got IDENTIFY working in QEMU, so I decided to try out real hardware. Unfortunately, I've found numerous discrepancies between hardware implementations. On one of my machines, I can't run commands because the BSY flag is set immediately after the connection with the device is established. In turn, the CR flag never gets set and so the command engine never starts.
I've sent a COMRESET to that port and that resets the BSY flag temporarily, but it quickly gets reset by the controller once the connection with the drive is re-established. Has anyone else encountered a problem like this? I've read the specs, and AFAICT, the BSY flag shouldn't be set at least until a command is executed. Does anyone know why this is happening?
Thanks in advance.