LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: PNP: increase the maximum number of resources
@ 2008-03-12 15:14 Dave Jones
  2008-03-12 17:08 ` Olivier Galibert
  2008-03-12 17:45 ` Len Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Dave Jones @ 2008-03-12 15:14 UTC (permalink / raw)
  To: Zhao Yakui
  Cc: Li Shaohua, Bjorn Helgaas, Thomas Renninger, Len Brown, Linux Kernel

In commit a7839e960675b549f06209d18283d5cee2ce9261 the number of PNP resources
was increased.  In testing, we've found that the 'exceeded' warnings still get
hit with quite high frequency. See https://bugzilla.redhat.com/show_bug.cgi?id=436589
for examples.

I added the debug patch below, which yielded an interesting output.

pnpacpi: exceeded the max number of mem resources. Max:12 Found:12

off by one somewhere ?

	Dave

diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 6aa231e..0c22e41 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -86,7 +86,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res,
 		i++;
 	if (i >= PNP_MAX_IRQ && !warned) {
 		printk(KERN_ERR "pnpacpi: exceeded the max number of IRQ "
-				"resources: %d \n", PNP_MAX_IRQ);
+				"resources. Max:%d Found:%d\n", PNP_MAX_IRQ, i);
 		warned = 1;
 		return;
 	}
@@ -188,7 +188,7 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res,
 		res->dma_resource[i].end = dma;
 	} else if (!warned) {
 		printk(KERN_ERR "pnpacpi: exceeded the max number of DMA "
-				"resources: %d \n", PNP_MAX_DMA);
+				"resources. Max:%d Found:%d\n", PNP_MAX_DMA, i);
 		warned = 1;
 	}
 }
@@ -214,7 +214,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res,
 		res->port_resource[i].end = io + len - 1;
 	} else if (!warned) {
 		printk(KERN_ERR "pnpacpi: exceeded the max number of IO "
-				"resources: %d \n", PNP_MAX_PORT);
+				"resources. Max:%d Found:%d\n", PNP_MAX_PORT, i);
 		warned = 1;
 	}
 }
@@ -242,7 +242,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res,
 		res->mem_resource[i].end = mem + len - 1;
 	} else if (!warned) {
 		printk(KERN_ERR "pnpacpi: exceeded the max number of mem "
-				"resources: %d\n", PNP_MAX_MEM);
+				"resources. Max:%d Found:%d\n", PNP_MAX_MEM, i);
 		warned = 1;
 	}
 }
-- 
http://www.codemonkey.org.uk

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-03-17 22:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-12 15:14 PNP: increase the maximum number of resources Dave Jones
2008-03-12 17:08 ` Olivier Galibert
2008-03-12 17:45 ` Len Brown
2008-03-13  0:16   ` Rene Herman
2008-03-13 12:04   ` PNP: dynamic pnp resources Thomas Renninger
2008-03-13 15:17     ` Bjorn Helgaas
2008-03-17 22:31     ` Rene Herman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).