Patchwork remove annoying noisy message

login
register
about
Submitter Stefan Reinauer
Date 2010-04-02 16:04:02
Message ID <4BB61572.4060908@coresystems.de>
Download mbox | patch
Permalink /patch/1186/
State Superseded
Headers show

Comments

Stefan Reinauer - 2010-04-02 16:04:02
See patch
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 <stepan@coresystems.de>
ron minnich - 2010-04-02 16:09:04
On Fri, Apr 2, 2010 at 9:04 AM, Stefan Reinauer <stepan@coresystems.de> 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.

Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Myles Watson - 2010-04-02 16:19:24
> 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.

In that case the check could be split, so that the message is only printed
in the cases where it isn't 0xffffffff.  Then only the broken boards would
print the message.

		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, but
		 * the expected answer is 0xffffffff
 		 */
		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;
 		}
 		dev = alloc_dev(bus, &dummy.path);

Thanks,
Myles

Patch

Index: src/devices/pci_device.c
===================================================================
--- src/devices/pci_device.c	(revision 5344)
+++ src/devices/pci_device.c	(working copy)
@@ -910,11 +910,11 @@ 
 		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)) {
-			printk(BIOS_SPEW, "%s, bad id 0x%x\n", dev_path(&dummy), id);
 			return NULL;
 		}
 		dev = alloc_dev(bus, &dummy.path);