From: Runa Guo-oc RunaGuo-oc@zhaoxin.com
1: The first ATA_CMD_IDENTIFY_PACKET_DEVICE command will be failed for ATA device with PORT_IRQ_IF_ERR from ahci spec; 2: I have not yet found any evidences which can be used to combine above fail with PORT_IRQ_D2H/PIO_FIS set to 1 from ahci spec; 3: Seabios code only polling PORT_IRQ_D2H/PIO_FIS for command completion, then the above fail will be regarded as timeout, no eh will be triggered to reset port state machine, then the following ATA_ID_CMD will not be issued by HAB.
May be the following patch will be work.
Signed-off-by: Runa Guo-oc RunaGuo-oc@zhaoxin.com --- src/hw/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hw/ahci.c b/src/hw/ahci.c index d45b430..c9d379d 100644 --- a/src/hw/ahci.c +++ b/src/hw/ahci.c @@ -143,7 +143,7 @@ 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;