From patchwork Tue Mar 23 15:13:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominik Brodowski X-Patchwork-Id: 87666 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2NFUGX4013243 for ; Tue, 23 Mar 2010 15:30:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754745Ab0CWPaO (ORCPT ); Tue, 23 Mar 2010 11:30:14 -0400 Received: from isilmar.linta.de ([213.133.102.198]:47572 "EHLO linta.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754741Ab0CWPaN (ORCPT ); Tue, 23 Mar 2010 11:30:13 -0400 Received: (qmail 25076 invoked from network); 23 Mar 2010 15:30:11 -0000 Received: from p54a07c47.dip.t-dialin.net (HELO comet.dominikbrodowski.net) (brodo@84.160.124.71) by isilmar.linta.de with (DHE-RSA-AES256-SHA encrypted) SMTP; 23 Mar 2010 15:30:11 -0000 Received: by comet.dominikbrodowski.net (Postfix, from userid 1000) id BB99F58015; Tue, 23 Mar 2010 16:13:01 +0100 (CET) Date: Tue, 23 Mar 2010 16:13:01 +0100 From: Dominik Brodowski To: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-pcmcia@lists.infradead.org, Jesse Barnes Subject: Re: pci_bus_for_each_resource, transparent bridges and rsrc_nonstatic.c Message-ID: <20100323151301.GA10452@comet.dominikbrodowski.net> Mail-Followup-To: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-pcmcia@lists.infradead.org, Jesse Barnes References: <20091111203303.GA7939@comet.dominikbrodowski.net> <201003221628.56232.bjorn.helgaas@hp.com> <20100322225235.GA29522@isilmar.linta.de> <201003221711.34997.bjorn.helgaas@hp.com> <20100322232800.GA532@isilmar.linta.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100322232800.GA532@isilmar.linta.de> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 23 Mar 2010 15:30:19 +0000 (UTC) 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; }