[coreboot-gerrit] New patch to review for coreboot: 4eb2112 intel/i82801bx: Minor log fixes in IDE driver

Patrick Georgi (patrick@georgi-clan.de) gerrit at coreboot.org
Mon Sep 29 19:42:04 CEST 2014


Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6989

-gerrit

commit 4eb2112dae97f563345cb94cb004e3de643020cd
Author: Patrick Georgi <patrick at georgi-clan.de>
Date:   Mon Sep 29 19:40:51 2014 +0200

    intel/i82801bx: Minor log fixes in IDE driver
    
    Two issues:
    1. without config, there were two NULL derefs
    2. output for "Secondary" looked at ide0_enable
    
    Change-Id: I34ddbc0f9b27226981ccbc237e3d59e522076d55
    Found-by: Coverity Scan
    Signed-off-by: Patrick Georgi <patrick at georgi-clan.de>
---
 src/southbridge/intel/i82801bx/ide.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/southbridge/intel/i82801bx/ide.c b/src/southbridge/intel/i82801bx/ide.c
index e24e693..7ce18f1 100644
--- a/src/southbridge/intel/i82801bx/ide.c
+++ b/src/southbridge/intel/i82801bx/ide.c
@@ -39,7 +39,7 @@ static void ide_init(struct device *dev)
 	if (!conf || conf->ide0_enable)
 		reg16 |= IDE_DECODE_ENABLE;
 	printk(BIOS_DEBUG, "IDE: %s IDE interface: %s\n", "Primary",
-	       conf->ide0_enable ? "on" : "off");
+	       (reg16 & IDE_DECODE_ENABLE) ? "on" : "off");
 	pci_write_config16(dev, IDE_TIM_PRI, reg16);
 
 	reg16 = pci_read_config16(dev, IDE_TIM_SEC);
@@ -47,7 +47,7 @@ static void ide_init(struct device *dev)
 	if (!conf || conf->ide1_enable)
 		reg16 |= IDE_DECODE_ENABLE;
 	printk(BIOS_DEBUG, "IDE: %s IDE interface: %s\n", "Secondary",
-	       conf->ide0_enable ? "on" : "off");
+	       (reg16 & IDE_DECODE_ENABLE) ? "on" : "off");
 	pci_write_config16(dev, IDE_TIM_SEC, reg16);
 }
 



More information about the coreboot-gerrit mailing list