diff mbox

pci_bus_for_each_resource, transparent bridges and rsrc_nonstatic.c

Message ID 20100323151301.GA10452@comet.dominikbrodowski.net (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Dominik Brodowski March 23, 2010, 3:13 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 4663b3f..7ae5b0f 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -864,13 +864,21 @@  static int nonstatic_autoadd_resources(struct pcmcia_socket *s)
 			continue;
 
 		if (res->flags & IORESOURCE_IO) {
+
+#if defined(CONFIG_X86)
+			/* on x86, avoid anything < 0x100 for it is often
+			 * used for legacy platform devices
+			 */
+			if (res->start < 0x100)
+				res->start = 0x100;
+			if (res->start >= res->end)
+				continue;
+#endif
+
 			if (res == &ioport_resource)
 				continue;
-			dev_printk(KERN_INFO, &s->cb_dev->dev,
-				   "pcmcia: parent PCI bridge I/O "
-				   "window: 0x%llx - 0x%llx\n",
-				   (unsigned long long)res->start,
-				   (unsigned long long)res->end);
+			dev_info(&s->cb_dev->dev, "pcmcia: parent PCI bridge "
+				"window: %pR\n", res);
 			if (!adjust_io(s, ADD_MANAGED_RESOURCE, res->start, res->end))
 				done |= IORESOURCE_IO;
 
@@ -879,11 +887,8 @@  static int nonstatic_autoadd_resources(struct pcmcia_socket *s)
 		if (res->flags & IORESOURCE_MEM) {
 			if (res == &iomem_resource)
 				continue;
-			dev_printk(KERN_INFO, &s->cb_dev->dev,
-				   "pcmcia: parent PCI bridge Memory "
-				   "window: 0x%llx - 0x%llx\n",
-				   (unsigned long long)res->start,
-				   (unsigned long long)res->end);
+			dev_info(&s->cb_dev->dev, "pcmcia: parent PCI bridge "
+				"window: %pR\n", res);
 			if (!adjust_memory(s, ADD_MANAGED_RESOURCE, res->start, res->end))
 				done |= IORESOURCE_MEM;
 		}