On Tue, Sep 16, 2014 at 09:45:17PM -0400, Kevin O'Connor wrote:
On Tue, Sep 16, 2014 at 11:34:51PM +0200, Paul Menzel wrote:
Am Sonntag, den 14.09.2014, 10:10 +0200 schrieb Paul Menzel:
testing the SSD Crucial m4 SSD 2.5 256 GB SATA 6 Gb/s on the Lenovo X60t, the payload SeaBIOS 1.7.5-40-g5109366 does not detect the drive.
[…] 32.705: |7f673000| WARNING - Timeout at ahci_port_setup:466! 32.705: |7f673000| AHCI/0: device not ready (tf 0x80) 33.205: |7f673000| WARNING - Timeout at ahci_port_reset:336!
Out of curiosity, what does the patch below return in the failure and success case?
Could you use the patch below instead.
-Kevin
--- a/src/hw/ahci.c +++ b/src/hw/ahci.c @@ -464,12 +464,14 @@ static int ahci_port_setup(struct ahci_port_s *port) break; if (timer_check(end)) { warn_timeout(); - dprintf(1, "AHCI/%d: device not ready (tf 0x%x)\n", port->pnr, tf); + dprintf(1, "AHCI/%d: device not ready (tf 0x%x cmd=%x stat=%x ctl=%x err=%x)\n", port->pnr, tf, ahci_port_readl(ctrl, pnr, PORT_CMD), ahci_port_readl(ctrl, pnr, PORT_SCR_STAT), ahci_port_readl(ctrl, pnr, PORT_SCR_CTL), ahci_port_readl(ctrl, pnr, PORT_SCR_ERR)); return -1; } yield(); }
+ dprintf(1, "AHCI/%d: device ready (tf 0x%x cmd=%x stat=%x ctl=%x err=%x)\n", port->pnr, tf, ahci_port_readl(ctrl, pnr, PORT_CMD), ahci_port_readl(ctrl, pnr, PORT_SCR_STAT), ahci_port_readl(ctrl, pnr, PORT_SCR_CTL), ahci_port_readl(ctrl, pnr, PORT_SCR_ERR)); + /* start device */ cmd |= PORT_CMD_START; ahci_port_writel(ctrl, pnr, PORT_CMD, cmd);