Nico Huber (nico.huber@secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3493
-gerrit
commit b4e2561f6f678f7804208423a32beb62d677af8c Author: Nico Huber nico.huber@secunet.com Date: Mon Jun 17 17:42:35 2013 +0200
libpayload: ahci: Increase timeout for signature reading
I've found the first SATA disk that takes ages (> 4s) to identify itself. Let's set the timeout to 5s. Also put a notice on the console, so the user knows why the signature reading failed.
Change-Id: I2148258f9b0eb950b71544dafd95776ae70afac8 Signed-off-by: Nico Huber nico.huber@secunet.com --- payloads/libpayload/drivers/storage/ahci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/payloads/libpayload/drivers/storage/ahci.c b/payloads/libpayload/drivers/storage/ahci.c index 72acd0b..deecd2b 100644 --- a/payloads/libpayload/drivers/storage/ahci.c +++ b/payloads/libpayload/drivers/storage/ahci.c @@ -396,10 +396,13 @@ static int ahci_dev_init(hba_ctrl_t *const ctrl, dev->rcvd_fis = rcvd_fis;
/* Wait for D2H Register FIS with device' signature. */ - int timeout = 200; /* Time out after 200 * 10ms == 2s. */ + int timeout = 500; /* Time out after 500 * 10ms == 5s. */ while ((port->taskfile_data & HBA_PxTFD_BSY) && timeout--) mdelay(10);
+ if (port->taskfile_data & HBA_PxTFD_BSY) + printf("ahci: Timed out waiting for device' signature.\n"); + /* Initialize device or fall through to clean up. */ switch (port->signature) { case HBA_PxSIG_ATA: