The AHCI driver currently sets the NCQ bit for every command that is issued to the SATA drive. This is not needed as there is always only one command active at a time and in turn can lead to a hanging AHCI controller (true for Marvel 88SE9170). The following patch disables the usage of NCQ completely. With this patch the Marvel AHCI controller works just fine without any issues.
Werner
diff --git a/src/hw/ahci.c b/src/hw/ahci.c index 2eee192..b9043b9 100644 --- a/src/hw/ahci.c +++ b/src/hw/ahci.c @@ -130,7 +130,6 @@ static int ahci_command(struct ahci_port_s *port_gf, int iswrite, int isatapi, intbits = ahci_port_readl(ctrl, pnr, PORT_IRQ_STAT); if (intbits) ahci_port_writel(ctrl, pnr, PORT_IRQ_STAT, intbits); - ahci_port_writel(ctrl, pnr, PORT_SCR_ACT, 1); ahci_port_writel(ctrl, pnr, PORT_CMD_ISSUE, 1);
u32 end = timer_calc(AHCI_REQUEST_TIMEOUT);