Date: Thu, 11 Jul 2013 01:11:29 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 230991 for review Message-ID: <201307110111.r6B1BTR1012196@skunkworks.freebsd.org>
index | next in thread | raw e-mail
http://p4web.freebsd.org/@@230991?ac=10 Change 230991 by jhb@jhb_pipkin on 2013/07/11 01:11:11 Check for an ISA alias before even trying to allocate. Affected files ... .. //depot/projects/pci/sys/dev/pci/pci_pci.c#37 edit Differences ... ==== //depot/projects/pci/sys/dev/pci/pci_pci.c#37 (text+ko) ==== @@ -220,15 +220,14 @@ */ if ((start & 0x300) != 0) goto alias; - next_alias = (start & ~0xfful) | 0x100; + next_alias = (start & ~0x3fful) | 0x100; if (next_alias <= end) goto alias; return (0); alias: device_printf(sc->dev, - "I/O range %#lx-%#lx overlaps with an ISA alias\n", start, - end); + "I/O range %#lx-%#lx overlaps with an ISA alias\n", start, end); return (1); } @@ -1579,10 +1578,11 @@ flags)); #endif case SYS_RES_IOPORT: + if (pcib_is_isa_range(sc, start, end, count)) + return (NULL); r = pcib_suballoc_resource(sc, &sc->io, child, type, rid, start, end, count, flags); - if (r != NULL || ((sc->flags & PCIB_SUBTRACTIVE) != 0 && - !pcib_is_isa_range(sc, start, end, count))) + if (r != NULL || (sc->flags & PCIB_SUBTRACTIVE) != 0) break; if (pcib_grow_window(sc, &sc->io, type, start, end, count, flags) == 0)help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307110111.r6B1BTR1012196>
