Date: Sat, 4 Aug 2001 03:41:12 -0400 From: Jonathan Chen <jon@FreeBSD.org> To: "Viren R.Shah" <viren@cigital.com> 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> In-Reply-To: <15210.56924.536714.812107@aop.cigital.com>; from viren@cigital.com on Fri, Aug 03, 2001 at 01:24:44PM -0400 References: <15210.56924.536714.812107@aop.cigital.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/systm.h> #include <sys/kernel.h> #include <sys/bus.h> +#include <machine/bus.h> +#include <sys/rman.h> #include <machine/resource.h> @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010804034112.A27769>