From owner-freebsd-bugs Sat Aug 4 0:41:16 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from enterprise.spock.org (cm-24-29-85-81.nycap.rr.com [24.29.85.81]) by hub.freebsd.org (Postfix) with ESMTP id 0A19437B403 for ; Sat, 4 Aug 2001 00:41:13 -0700 (PDT) (envelope-from jon@enterprise.spock.org) Received: (from jon@localhost) by enterprise.spock.org serial EF600Q3T-B7F; Sat, 4 Aug 2001 03:41:12 -0400 (EDT) (envelope-from jon)$ Date: Sat, 4 Aug 2001 03:41:12 -0400 From: Jonathan Chen To: "Viren R.Shah" Cc: freebsd-bugs@FreeBSD.org Subject: Re: misc/28203: NEWCARD won't recognize my cardbus controllers or my Xircom Realport 10/100+56k card Message-ID: <20010804034112.A27769@enterprise.spock.org> References: <15210.56924.536714.812107@aop.cigital.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: telnet/1.1x In-Reply-To: <15210.56924.536714.812107@aop.cigital.com>; from viren@cigital.com on Fri, Aug 03, 2001 at 01:24:44PM -0400 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Oops, forgot to include the pacth, here it is. Index: sys/dev/pci/pci_pci.c =================================================================== RCS file: /export/ncvs/src/sys/dev/pci/pci_pci.c,v retrieving revision 1.3 diff -u -r1.3 pci_pci.c --- sys/dev/pci/pci_pci.c 2000/12/13 01:25:11 1.3 +++ sys/dev/pci/pci_pci.c 2001/08/04 07:17:27 @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include @@ -265,15 +267,6 @@ { struct pcib_softc *sc = device_get_softc(dev); - /* - * If this is a "default" allocation against this rid, we can't work - * out where it's coming from (we should actually never see these) so we - * just have to punt. - */ - if ((start == 0) && (end == ~0)) { - device_printf(dev, "can't decode default resource id %d for %s%d, bypassing\n", - *rid, device_get_name(child), device_get_unit(child)); - } else { /* * Fail the allocation for this range if it's not supported. * @@ -286,7 +279,8 @@ " (decoding 0x%x-0x%x)\n", device_get_name(child), device_get_unit(child), start, end, sc->iobase, sc->iolimit); - return(NULL); + if (start < sc->iobase) start = sc->iobase; + if (end < sc->iolimit) end = sc->iolimit; } if (bootverbose) device_printf(sc->dev, "device %s%d requested decoded I/O range 0x%lx-0x%lx\n", @@ -306,7 +300,13 @@ " (decoding 0x%x-0x%x, 0x%x-0x%x)\n", device_get_name(child), device_get_unit(child), start, end, sc->membase, sc->memlimit, sc->pmembase, sc->pmemlimit); - return(NULL); + if (flags & RF_PREFETCHABLE) { + if (start < sc->pmembase) start = sc->pmembase; + if (end < sc->pmemlimit) end = sc->pmemlimit; + } else { + if (start < sc->membase) start = sc->membase; + if (end < sc->memlimit) end = sc->memlimit; + } } if (bootverbose) device_printf(sc->dev, "device %s%d requested decoded memory range 0x%lx-0x%lx\n", @@ -316,7 +316,6 @@ default: break; } - } /* * Bridge is OK decoding this resource, so pass it up. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message