X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fpcmcia%2Frsrc_nonstatic.c;h=c42455d20eb683c6d2c99de733966ad403c5941d;hb=d471cd4787351c05d6be749475418ccea2720ef4;hp=51aa04b7ecc9eb907a688619f71abbb1e2925c8c;hpb=2ad0a0a793cbd87a87488d59abc744374669498f;p=linux-2.6 diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index 51aa04b7ec..c42455d20e 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c @@ -779,6 +779,17 @@ static int nonstatic_autoadd_resources(struct pcmcia_socket *s) if (!s->cb_dev || !s->cb_dev->bus) return -ENODEV; +#if defined(CONFIG_X86) || defined(CONFIG_X86_64) + /* If this is the root bus, the risk of hitting + * some strange system devices which aren't protected + * by either ACPI resource tables or properly requested + * resources is too big. Therefore, don't do auto-adding + * of resources at the moment. + */ + if (s->cb_dev->bus->number == 0) + return -EINVAL; +#endif + for (i=0; i < PCI_BUS_NUM_RESOURCES; i++) { res = s->cb_dev->bus->resource[i]; if (!res)