I am so sorry to reply late.
Here is the newly
rebase patch, pls help check, thanks.
1: For ATA device, the first ATA_CMD_IDENTIFY_PACKET_DEVICE command will be failed with PORT_IRQ_TF set to 1 from ahci spec;
2: For seabios, this fail will be considered as timeout for it only polling PORT_IRQ_D2H_REG/PIO_FIS;
3: From ahci spec, I have not yet found any evidences which can be use to combine the above fail with these above error;
May be, we can also add PORT_IRQ_TF_ERR bit check while polling command completion?
Signed-off-by: zhaoxin\runaguooc <RunaGuo-oc@zhaoxin.com>
---
src/hw/ahci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/hw/ahci.c b/src/hw/ahci.c
index d45b430..998b5fe 100644
--- a/src/hw/ahci.c
+++ b/src/hw/ahci.c
@@ -143,7 +143,8 @@ static int ahci_command(struct ahci_port_s *port_gf, int iswrite, int isatapi,
error = GET_LOWFLAT(fis->psfis[3]);
break;
}
- if (intbits & 0x01) {
+
+ if (intbits & (0x01| PORT_IRQ_TF_ERR)) {
status = GET_LOWFLAT(fis->rfis[2]);
error = GET_LOWFLAT(fis->rfis[3]);
break;
--
2.17.1