Nico Huber (nico.huber(a)secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3494
-gerrit
commit 59c7c7e94105a40a333916c7152763ba1bfade74
Author: Nico Huber <nico.huber(a)secunet.com>
Date: Mon Jun 17 17:47:24 2013 +0200
libpayload: ahci: Fix command engine shutdown
A timeout while waiting for a device' signature has shown that our
error path wasn't correct. The shutdown of the ports command engine
always timed out. Fix that by waiting for FR (FIS Receive Running)
to be cleared independently from CR (Command List Running) and after
clearing FRE (FIS Receive Enable).
Change-Id: I50edf426ef0241424456f1489a7fc86a2cfc5753
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
payloads/libpayload/drivers/storage/ahci.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/payloads/libpayload/drivers/storage/ahci.c b/payloads/libpayload/drivers/storage/ahci.c
index deecd2b..fe83d46 100644
--- a/payloads/libpayload/drivers/storage/ahci.c
+++ b/payloads/libpayload/drivers/storage/ahci.c
@@ -73,7 +73,7 @@ static inline int ahci_port_is_active(const hba_port_t *const port)
static int ahci_cmdengine_start(hba_port_t *const port)
{
- /* Wait for the controller to clear CR.
+ /* CR has to be clear before starting the command engine.
This shouldn't take too long, but we should time out nevertheless. */
int timeout = 1000; /* Time out after 1000 * 1us == 1ms. */
while ((port->cmd_stat & HBA_PxCMD_CR) && timeout--)
@@ -92,10 +92,10 @@ static int ahci_cmdengine_stop(hba_port_t *const port)
{
port->cmd_stat &= ~HBA_PxCMD_ST;
- /* Wait for the controller to clear FR and CR.
+ /* Wait for the controller to clear CR.
This shouldn't take too long, but we should time out nevertheless. */
int timeout = 1000; /* Time out after 1000 * 1us == 1ms. */
- while ((port->cmd_stat & (HBA_PxCMD_FR | HBA_PxCMD_CR)) && timeout--)
+ while ((port->cmd_stat & HBA_PxCMD_CR) && timeout--)
udelay(1);
if (timeout < 0) {
printf("ahci: Timeout during stopping of command engine.\n");
@@ -103,6 +103,17 @@ static int ahci_cmdengine_stop(hba_port_t *const port)
}
port->cmd_stat &= ~HBA_PxCMD_FRE;
+
+ /* Wait for the controller to clear FR.
+ This shouldn't take too long, but we should time out nevertheless. */
+ timeout = 1000; /* Time out after 1000 * 1us == 1ms. */
+ while ((port->cmd_stat & HBA_PxCMD_FR) && timeout--)
+ udelay(1);
+ if (timeout < 0) {
+ printf("ahci: Timeout during stopping of command engine.\n");
+ return 1;
+ }
+
return 0;
}
Nico Huber (nico.huber(a)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(a)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(a)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:
the following patch was just integrated into master:
commit 7fd1beeaf7a295d298b26880593840033290c329
Author: Gerd Hoffmann <kraxel(a)redhat.com>
Date: Mon Jun 17 10:03:17 2013 +0200
qemu: i440fx whitespace fixup
Change-Id: I0d499027ffb175638cba0a9830d6ec2041a139db
Signed-off-by: Gerd Hoffmann <kraxel(a)redhat.com>
Reviewed-on: http://review.coreboot.org/3488
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
See http://review.coreboot.org/3488 for details.
-gerrit
the following patch was just integrated into master:
commit ee941b38d666f11ce5256cbccecea75f38ca86c1
Author: Gerd Hoffmann <kraxel(a)redhat.com>
Date: Fri Jun 7 16:03:44 2013 +0200
qemu: add q35 support
Add support for the new q35 chipset emulation
added in qemu 1.4.
Change-Id: Iabfaa1310dc7b54c9d224635addebdfafe1fbfaf
Signed-off-by: Gerd Hoffmann <kraxel(a)redhat.com>
Reviewed-on: http://review.coreboot.org/3430
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
See http://review.coreboot.org/3430 for details.
-gerrit
the following patch was just integrated into master:
commit 9839a385bb778a87fc00a046a77334709ac78930
Author: Gerd Hoffmann <kraxel(a)redhat.com>
Date: Mon Jun 17 12:26:17 2013 +0200
qemu: add support for memory above 4G
Change-Id: Ic83f55d01b29b43028e3b363749d64b927db5489
Signed-off-by: Gerd Hoffmann <kraxel(a)redhat.com>
Reviewed-on: http://review.coreboot.org/3492
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
See http://review.coreboot.org/3492 for details.
-gerrit
the following patch was just integrated into master:
commit 44b11f2fe423a04641ca1059d2ba5a188412cdc7
Author: Gerd Hoffmann <kraxel(a)redhat.com>
Date: Mon Jun 17 13:30:50 2013 +0200
qemu: move ram ressource reservation from "set" to "read" stage
So the pci allocation code knows where memory is and doesn't
try map pci devices there. We also don't have to check for
overlaps between pci hole and memory then.
Change-Id: I5eaea0e4d21210719685860fa1f16ca7b2137cde
Signed-off-by: Gerd Hoffmann <kraxel(a)redhat.com>
Reviewed-on: http://review.coreboot.org/3491
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
See http://review.coreboot.org/3491 for details.
-gerrit