[coreboot-gerrit] Patch set updated for coreboot: 6e36351 libpayload: ahci: Increase timeout for signature reading
Nico Huber (nico.huber@secunet.com)
gerrit at coreboot.org
Mon Jun 17 22:43:04 CEST 2013
Nico Huber (nico.huber at secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3493
-gerrit
commit 6e363515919fdc22aacbd028ab8dfa353792c60b
Author: Nico Huber <nico.huber at secunet.com>
Date: Mon Jun 17 17:42:35 2013 +0200
libpayload: ahci: Increase timeout for signature reading
We can't read the drives signature before it's ready, i.e. spun up.
So set the timeout to the standard 30s. 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 at secunet.com>
---
payloads/libpayload/drivers/storage/ahci.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/payloads/libpayload/drivers/storage/ahci.c b/payloads/libpayload/drivers/storage/ahci.c
index 72acd0b..893ef07 100644
--- a/payloads/libpayload/drivers/storage/ahci.c
+++ b/payloads/libpayload/drivers/storage/ahci.c
@@ -395,11 +395,17 @@ static int ahci_dev_init(hba_ctrl_t *const ctrl,
dev->cmdtable = cmdtable;
dev->rcvd_fis = rcvd_fis;
- /* Wait for D2H Register FIS with device' signature. */
- int timeout = 200; /* Time out after 200 * 10ms == 2s. */
+ /*
+ * Wait for D2H Register FIS with device' signature.
+ * The drive has to spin up here, so wait up to 30s.
+ */
+ int timeout = 3 * 1000; /* Time out after 3,000 * 10ms == 30s. */
while ((port->taskfile_data & HBA_PxTFD_BSY) && timeout--)
mdelay(10);
+ if (port->taskfile_data & HBA_PxTFD_BSY)
+ printf("ahci: Timed out waiting for device to spin up.\n");
+
/* Initialize device or fall through to clean up. */
switch (port->signature) {
case HBA_PxSIG_ATA:
More information about the coreboot-gerrit
mailing list