From owner-p4-projects@FreeBSD.ORG Thu Jul 11 01:11:30 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4CCEAC6D; Thu, 11 Jul 2013 01:11:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0B31FC6B for ; Thu, 11 Jul 2013 01:11:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [8.8.178.74]) by mx1.freebsd.org (Postfix) with ESMTP id EFECC1728 for ; Thu, 11 Jul 2013 01:11:29 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B1BT1P012199 for ; Thu, 11 Jul 2013 01:11:29 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.7/8.14.6/Submit) id r6B1BTR1012196 for perforce@freebsd.org; Thu, 11 Jul 2013 01:11:29 GMT (envelope-from jhb@freebsd.org) Date: Thu, 11 Jul 2013 01:11:29 GMT Message-Id: <201307110111.r6B1BTR1012196@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 230991 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 01:11:30 -0000 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)