Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56062 )
Change subject: libpayload: Continue in ahci_cmdslot_exec() despite unset HBA_PxCMD_CR ......................................................................
libpayload: Continue in ahci_cmdslot_exec() despite unset HBA_PxCMD_CR
On the Asus F2A85-M PRO, using FILO with the libpayload storage drivers `ata_read512()` fails with the attached SSD drive.
ahci: Found SATA controller 00:11.00 (1022:7801). ahci: ATA drive on port #7. ata: Identified SanDisk SDSSDP064G [2.0.0] ata: Support for LBA-48 enabled. ERROR: No such CMOS option (boot_devices)
filo> kernel hda3:/vmlinuz dev=hda3, path=/vmlinuz Disk read error dev=1 drive=0 sector=0 Couldn't read sector. device read failed. Can't open partition 3.
Error 15: File not found
printf-debugging reveals, that `ahci_cmdslot_exec()` aborts early, as `HBA_PxCMD_CR`, defined as 1 << 15, is not set. On the AMD device cmd_stat is 0x6017 every time `ahci_cmdslot_exec()` is executed.
Not erroring out, fixes the issue. Print a warning instead.
Change-Id: I2b94cf4aa40dce587f52350ff4624946aeaafcc0 Signed-off-by: Paul Menzel pmenzel@molgen.mpg.de --- M payloads/libpayload/drivers/storage/ahci_common.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/56062/1
diff --git a/payloads/libpayload/drivers/storage/ahci_common.c b/payloads/libpayload/drivers/storage/ahci_common.c index f3abc5f..e684dbf 100644 --- a/payloads/libpayload/drivers/storage/ahci_common.c +++ b/payloads/libpayload/drivers/storage/ahci_common.c @@ -156,7 +156,7 @@ const int slotnum = 0; /* We always use the first slot. */
if (!(dev->port->cmd_stat & HBA_PxCMD_CR)) - return -1; + printf("ahci: HBA_PxCMD_CR not set (cmd_stat=0x%"PRIx32")\n", dev->port->cmd_stat);
/* Trigger command execution. */ dev->port->cmd_issue |= (1 << slotnum);