On 4/2/10 6:09 PM, ron minnich wrote:
> On Fri, Apr 2, 2010 at 9:04 AM, Stefan Reinauer <[email protected]> wrote:
>   
>> See patch
>>     
> I'm mixed on this one, but at the same time, I bet there are few
> broken devices that return 0 as there were in the old days.
I wonder, what would we do with them if we knew..

Maybe we should only print the message if something else than 0xffffffff
is read? Would that be more appropriate?
0xffffffff is the expected read-back if there is no device, and I think
that case should not be reported as "bad id"

Like the attached one

Stefan



-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: [email protected]http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866

The error message is misleading, even for a SPEW, because
the slot is empty, it's NOT a bad ID (and the message is
more confusing than helpful even in SPEW)

Signed-off-by: Stefan Reinauer <[email protected]>

Index: src/devices/pci_device.c
===================================================================
--- src/devices/pci_device.c    (revision 5344)
+++ src/devices/pci_device.c    (working copy)
@@ -910,10 +910,13 @@
                dummy.path.pci.devfn = devfn;
                id = pci_read_config32(&dummy, PCI_VENDOR_ID);
                /* Have we found something?
-                * Some broken boards return 0 if a slot is empty.
+                * Some broken boards return 0 if a slot is empty, but
+                * the expected answer is 0xffffffff
                 */
-               if ((id == 0xffffffff) || (id == 0x00000000) ||
-                   (id == 0x0000ffff) || (id == 0xffff0000)) {
+               if (id == 0xffffffff)
+                       return NULL;
+               if ((id == 0x00000000) || (id == 0x0000ffff) ||
+                   (id == 0xffff0000)) {
                        printk(BIOS_SPEW, "%s, bad id 0x%x\n", 
dev_path(&dummy), id);
                        return NULL;
                }
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to