summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/rsrc_nonstatic.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-03-23 16:05:00 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2010-03-23 18:55:23 +0100
commit9713ab28ec92d0c44b2ac5765dfc26c619d9cadd (patch)
tree99de9e1d40d6dfb166811e038727611615ff11fa /drivers/pcmcia/rsrc_nonstatic.c
parentpd6729: Coding Style fixes (diff)
downloadlinux-9713ab28ec92d0c44b2ac5765dfc26c619d9cadd.tar.xz
linux-9713ab28ec92d0c44b2ac5765dfc26c619d9cadd.zip
pcmcia: do not use ioports < 0x100 on x86
On x86 systems using ACPI _CRS information -- now the default for post-2008 systems -- the PCI root bus no longer pretends to be offering the root ioport_resource. To avoid accidentally hitting some platform / system device, use only I/O ports >= 0x100 for PCMCIA devices on x86. Reported-by: Komuro <komurojun-mbn@nifty.com> CC: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/rsrc_nonstatic.c')
-rw-r--r--drivers/pcmcia/rsrc_nonstatic.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 4663b3fa9f96..dcc602134d90 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -810,6 +810,13 @@ static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long
unsigned long size = end - start + 1;
int ret = 0;
+#if defined(CONFIG_X86)
+ /* on x86, avoid anything < 0x100 for it is often used for
+ * legacy platform devices */
+ if (start < 0x100)
+ start = 0x100;
+#endif
+
if (end < start)
return -EINVAL;