From owner-p4-projects@FreeBSD.ORG Wed Apr 16 09:28:31 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EBE7037B404; Wed, 16 Apr 2003 09:28:30 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2459C37B401 for ; Wed, 16 Apr 2003 09:28:30 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 076B443FD7 for ; Wed, 16 Apr 2003 09:28:29 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3GGSS0U078234 for ; Wed, 16 Apr 2003 09:28:28 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3GGSSlg078231 for perforce@freebsd.org; Wed, 16 Apr 2003 09:28:28 -0700 (PDT) Date: Wed, 16 Apr 2003 09:28:28 -0700 (PDT) Message-Id: <200304161628.h3GGSSlg078231@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 29064 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 16:28:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=29064 Change 29064 by jhb@jhb_laptop on 2003/04/16 09:27:41 IFC @29063. Affected files ... .. //depot/projects/smpng/sys/conf/Makefile.alpha#17 integrate .. //depot/projects/smpng/sys/conf/Makefile.i386#17 integrate .. //depot/projects/smpng/sys/conf/Makefile.ia64#23 integrate .. //depot/projects/smpng/sys/conf/Makefile.pc98#16 integrate .. //depot/projects/smpng/sys/conf/Makefile.powerpc#20 integrate .. //depot/projects/smpng/sys/conf/Makefile.sparc64#20 integrate .. //depot/projects/smpng/sys/conf/Makefile.x86_64#4 integrate .. //depot/projects/smpng/sys/dev/ata/ata-chipset.c#9 integrate .. //depot/projects/smpng/sys/dev/ata/ata-pci.c#30 integrate .. //depot/projects/smpng/sys/dev/bge/if_bge.c#23 integrate .. //depot/projects/smpng/sys/dev/fxp/if_fxp.c#32 integrate .. //depot/projects/smpng/sys/dev/gem/if_gem_pci.c#8 integrate .. //depot/projects/smpng/sys/dev/hea/hea_pci.c#4 integrate .. //depot/projects/smpng/sys/dev/hfa/hfa_pci.c#3 integrate .. //depot/projects/smpng/sys/dev/hme/if_hme_pci.c#6 integrate .. //depot/projects/smpng/sys/dev/lge/if_lge.c#13 integrate .. //depot/projects/smpng/sys/dev/nge/if_nge.c#23 integrate .. //depot/projects/smpng/sys/dev/pci/pci.c#23 integrate .. //depot/projects/smpng/sys/dev/pci/pci_if.m#2 integrate .. //depot/projects/smpng/sys/dev/pci/pci_private.h#6 integrate .. //depot/projects/smpng/sys/dev/pci/pcivar.h#9 integrate .. //depot/projects/smpng/sys/dev/pdq/if_fpa.c#5 integrate .. //depot/projects/smpng/sys/dev/sound/pci/ds1.c#8 integrate .. //depot/projects/smpng/sys/dev/sound/pci/ich.c#19 integrate .. //depot/projects/smpng/sys/dev/sound/pci/via8233.c#5 integrate .. //depot/projects/smpng/sys/dev/txp/if_txp.c#14 integrate .. //depot/projects/smpng/sys/dev/wl/if_wl.c#11 integrate .. //depot/projects/smpng/sys/i386/isa/if_le.c#10 integrate .. //depot/projects/smpng/sys/ia64/conf/GENERIC#31 integrate .. //depot/projects/smpng/sys/pci/if_dc.c#31 integrate .. //depot/projects/smpng/sys/pci/if_pcn.c#14 integrate .. //depot/projects/smpng/sys/pci/if_rl.c#26 integrate .. //depot/projects/smpng/sys/pci/if_sf.c#16 integrate .. //depot/projects/smpng/sys/pci/if_sis.c#22 integrate .. //depot/projects/smpng/sys/pci/if_sk.c#15 integrate .. //depot/projects/smpng/sys/pci/if_ste.c#18 integrate .. //depot/projects/smpng/sys/pci/if_ti.c#24 integrate .. //depot/projects/smpng/sys/pci/if_tl.c#13 integrate .. //depot/projects/smpng/sys/pci/if_vr.c#15 integrate .. //depot/projects/smpng/sys/pci/if_wb.c#14 integrate .. //depot/projects/smpng/sys/pci/if_xl.c#25 integrate .. //depot/projects/smpng/sys/security/mac_test/mac_test.c#11 integrate Differences ... ==== //depot/projects/smpng/sys/conf/Makefile.alpha#17 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.alpha -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.alpha 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.alpha,v 1.126 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.alpha,v 1.127 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 .if !defined(S) .if exists(./@/.) ==== //depot/projects/smpng/sys/conf/Makefile.i386#17 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.i386,v 1.258 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.i386,v 1.259 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 STD8X16FONT?= iso ==== //depot/projects/smpng/sys/conf/Makefile.ia64#23 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.ia64 -- with config changes. # Copyright 1990 W. Jolitz # from: src/sys/conf/Makefile.alpha,v 1.76 -# $FreeBSD: src/sys/conf/Makefile.ia64,v 1.54 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.ia64,v 1.55 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -19,7 +19,7 @@ GCC3= you bet # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 STD8X16FONT?= iso ==== //depot/projects/smpng/sys/conf/Makefile.pc98#16 (text+ko) ==== @@ -3,7 +3,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.pc98,v 1.159 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.pc98,v 1.160 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -19,7 +19,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 .if !defined(S) .if exists(./@/.) ==== //depot/projects/smpng/sys/conf/Makefile.powerpc#20 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.powerpc -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.powerpc,v 1.266 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.powerpc,v 1.267 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 # Temporary stuff while we're still embryonic NO_MODULES?= yes ==== //depot/projects/smpng/sys/conf/Makefile.sparc64#20 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.sparc64 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.sparc64,v 1.26 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.sparc64,v 1.27 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 STD8X16FONT?= iso ==== //depot/projects/smpng/sys/conf/Makefile.x86_64#4 (text+ko) ==== @@ -2,7 +2,7 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 # from FreeBSD: src/sys/conf/Makefile.i386,v 1.255 2002/02/20 23:35:49 -# $FreeBSD: src/sys/conf/Makefile.x86_64,v 1.4 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.x86_64,v 1.5 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 STD8X16FONT?= iso ==== //depot/projects/smpng/sys/dev/ata/ata-chipset.c#9 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.19 2003/04/10 12:56:33 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.20 2003/04/16 08:30:40 sos Exp $ */ #include "opt_ata.h" #include @@ -1512,12 +1512,12 @@ { ATA_SIS651, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 651" }, /* ext south */ { ATA_SIS650, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 650" }, /* ext south */ { ATA_SIS648, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 648" }, /* ext south */ - { ATA_SIS646, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 645DX" },/* ext south */ + { ATA_SIS646, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 645DX"},/* ext south */ { ATA_SIS645, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 645" }, /* ext south */ { ATA_SIS640, 0x00, SIS_SOUTH, 0, ATA_UDMA4, "SiS 640" }, /* ext south */ { ATA_SIS635, 0x00, SIS100NEW, 0, ATA_UDMA5, "SiS 635" }, /* 1chip */ { ATA_SIS633, 0x00, SIS100NEW, 0, ATA_UDMA5, "SiS 633" }, /* unknown */ - { ATA_SIS630, 0x30, SIS100OLD, 0, ATA_UDMA5, "SiS 630S" }, /* 1chip */ + { ATA_SIS630, 0x30, SIS100OLD, 0, ATA_UDMA5, "SiS 630S"}, /* 1chip */ { ATA_SIS630, 0x00, SIS66, 0, ATA_UDMA4, "SiS 630" }, /* 1chip */ { ATA_SIS620, 0x00, SIS66, 0, ATA_UDMA4, "SiS 620" }, /* 1chip */ ==== //depot/projects/smpng/sys/dev/ata/ata-pci.c#30 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ata/ata-pci.c,v 1.59 2003/04/07 14:12:12 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-pci.c,v 1.60 2003/04/16 08:30:10 sos Exp $ */ #include "opt_ata.h" @@ -509,10 +509,11 @@ if ((error = ctlr->allocate(dev, ch))) return error; + if (ctlr->chip) + ch->chiptype = ctlr->chip->chipid; ch->device[MASTER].setmode = ctlr->setmode; ch->device[SLAVE].setmode = ctlr->setmode; ch->locking = ctlr->locking; - ch->chiptype = ctlr->chip->chipid; return ata_probe(dev); } ==== //depot/projects/smpng/sys/dev/bge/if_bge.c#23 (text+ko) ==== @@ -64,7 +64,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.33 2003/04/15 06:37:21 mdodd Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.34 2003/04/16 03:16:53 mdodd Exp $"); #include #include @@ -1448,7 +1448,6 @@ device_t dev; { int s; - u_int32_t command; struct ifnet *ifp; struct bge_softc *sc; u_int32_t hwcfg = 0; @@ -1466,14 +1465,6 @@ * Map control/status registers. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_MEMORY); - command = pci_read_config(dev, PCIR_COMMAND, 4); - - if (!(command & PCIM_CMD_MEMEN)) { - printf("bge%d: failed to enable memory mapping!\n", unit); - error = ENXIO; - goto fail; - } rid = BGE_PCI_BAR0; sc->bge_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, ==== //depot/projects/smpng/sys/dev/fxp/if_fxp.c#32 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.171 2003/04/15 06:37:24 mdodd Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.173 2003/04/16 09:16:55 sobomax Exp $"); #include #include @@ -387,12 +387,9 @@ s = splimp(); /* - * Enable bus mastering. Enable memory/port space too, in case - * BIOS/Prom forgot about it. + * Enable bus mastering. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_IOPORT); - pci_enable_io(dev, SYS_RES_MEMORY); val = pci_read_config(dev, PCIR_COMMAND, 2); fxp_powerstate_d0(dev); @@ -411,14 +408,11 @@ m2 = PCIM_CMD_MEMEN; } - if (val & m1) { - sc->rtp = - (m1 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; - sc->rgd = (m1 == PCIM_CMD_MEMEN)? FXP_PCI_MMBA : FXP_PCI_IOBA; - sc->mem = bus_alloc_resource(dev, sc->rtp, &sc->rgd, + sc->rtp = (m1 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; + sc->rgd = (m1 == PCIM_CMD_MEMEN)? FXP_PCI_MMBA : FXP_PCI_IOBA; + sc->mem = bus_alloc_resource(dev, sc->rtp, &sc->rgd, 0, ~0, 1, RF_ACTIVE); - } - if (sc->mem == NULL && (val & m2)) { + if (sc->mem == NULL) { sc->rtp = (m2 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; sc->rgd = (m2 == PCIM_CMD_MEMEN)? FXP_PCI_MMBA : FXP_PCI_IOBA; @@ -427,7 +421,6 @@ } if (!sc->mem) { - device_printf(dev, "could not map device registers\n"); error = ENXIO; goto fail; } ==== //depot/projects/smpng/sys/dev/gem/if_gem_pci.c#8 (text+ko) ==== @@ -26,7 +26,7 @@ * * from: NetBSD: if_gem_pci.c,v 1.7 2001/10/18 15:09:15 thorpej Exp * - * $FreeBSD: src/sys/dev/gem/if_gem_pci.c,v 1.8 2003/04/15 06:37:24 mdodd Exp $ + * $FreeBSD: src/sys/dev/gem/if_gem_pci.c,v 1.9 2003/04/16 03:16:54 mdodd Exp $ */ /* @@ -163,7 +163,6 @@ * cases not do this for us on sparc64 machines. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_MEMORY); sc->sc_dev = dev; sc->sc_pci = 1; /* XXX */ ==== //depot/projects/smpng/sys/dev/hea/hea_pci.c#4 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/hea/hea_pci.c,v 1.4 2002/10/02 04:42:24 mdodd Exp $ + * $FreeBSD: src/sys/dev/hea/hea_pci.c,v 1.5 2003/04/16 03:16:54 mdodd Exp $ */ /* @@ -154,19 +154,6 @@ error = 0; pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_MEMORY); - - command = pci_read_config(dev, PCIR_COMMAND, 2); - if ((command & PCIM_CMD_BUSMASTEREN) == 0) { - device_printf(dev, "Unable to enable PCI busmastering.\n"); - error = ENXIO; - goto fail; - } - if ((command & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "Unable to enable PCI memory resources.\n"); - error = ENXIO; - goto fail; - } sc->mem_rid = PCIR_MAPS; sc->mem_type = SYS_RES_MEMORY; ==== //depot/projects/smpng/sys/dev/hfa/hfa_pci.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/hfa/hfa_pci.c,v 1.2 2002/06/07 01:55:42 mdodd Exp $ + * $FreeBSD: src/sys/dev/hfa/hfa_pci.c,v 1.3 2003/04/16 03:16:54 mdodd Exp $ */ /* @@ -129,19 +129,6 @@ error = 0; pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_MEMORY); - - command = pci_read_config(dev, PCIR_COMMAND, 2); - if ((command & PCIM_CMD_BUSMASTEREN) == 0) { - device_printf(dev, "Unable to enable PCI busmastering.\n"); - error = ENXIO; - goto fail; - } - if ((command & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "Unable to enable PCI memory resources.\n"); - error = ENXIO; - goto fail; - } sc->mem_rid = PCA200E_PCI_MEMBASE; sc->mem_type = SYS_RES_MEMORY; ==== //depot/projects/smpng/sys/dev/hme/if_hme_pci.c#6 (text+ko) ==== @@ -27,7 +27,7 @@ * * from: NetBSD: if_hme_pci.c,v 1.4 2001/08/27 22:18:49 augustss Exp * - * $FreeBSD: src/sys/dev/hme/if_hme_pci.c,v 1.5 2003/04/15 06:37:24 mdodd Exp $ + * $FreeBSD: src/sys/dev/hme/if_hme_pci.c,v 1.6 2003/04/16 03:16:54 mdodd Exp $ */ /* @@ -137,7 +137,6 @@ * gross; but the hme comes up with neither enabled. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_MEMORY); sc->sc_pci = 1; /* XXXXX should all be done in bus_dma. */ sc->sc_dev = dev; ==== //depot/projects/smpng/sys/dev/lge/if_lge.c#13 (text+ko) ==== @@ -67,7 +67,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/lge/if_lge.c,v 1.19 2003/04/15 06:37:24 mdodd Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/lge/if_lge.c,v 1.20 2003/04/16 03:16:55 mdodd Exp $"); #include #include @@ -492,7 +492,6 @@ { int s; u_char eaddr[ETHER_ADDR_LEN]; - u_int32_t command; struct lge_softc *sc; struct ifnet *ifp; int unit, error = 0, rid; @@ -530,23 +529,6 @@ * Map control/status registers. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_IOPORT); - pci_enable_io(dev, SYS_RES_MEMORY); - command = pci_read_config(dev, PCIR_COMMAND, 4); - -#ifdef LGE_USEIOSPACE - if (!(command & PCIM_CMD_PORTEN)) { - printf("lge%d: failed to enable I/O ports!\n", unit); - error = ENXIO;; - goto fail; - } -#else - if (!(command & PCIM_CMD_MEMEN)) { - printf("lge%d: failed to enable memory mapping!\n", unit); - error = ENXIO;; - goto fail; - } -#endif rid = LGE_RID; sc->lge_res = bus_alloc_resource(dev, LGE_RES, &rid, ==== //depot/projects/smpng/sys/dev/nge/if_nge.c#23 (text+ko) ==== @@ -86,7 +86,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/nge/if_nge.c,v 1.44 2003/04/15 06:37:25 mdodd Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/nge/if_nge.c,v 1.45 2003/04/16 03:16:55 mdodd Exp $"); #include #include @@ -822,7 +822,6 @@ { int s; u_char eaddr[ETHER_ADDR_LEN]; - u_int32_t command; struct nge_softc *sc; struct ifnet *ifp; int unit, error = 0, rid; @@ -864,23 +863,6 @@ * Map control/status registers. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_IOPORT); - pci_enable_io(dev, SYS_RES_MEMORY); - command = pci_read_config(dev, PCIR_COMMAND, 4); - -#ifdef NGE_USEIOSPACE - if (!(command & PCIM_CMD_PORTEN)) { - printf("nge%d: failed to enable I/O ports!\n", unit); - error = ENXIO;; - goto fail; - } -#else - if (!(command & PCIM_CMD_MEMEN)) { - printf("nge%d: failed to enable memory mapping!\n", unit); - error = ENXIO;; - goto fail; - } -#endif rid = NGE_RID; sc->nge_res = bus_alloc_resource(dev, NGE_RES, &rid, ==== //depot/projects/smpng/sys/dev/pci/pci.c#23 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/pci/pci.c,v 1.213 2003/04/15 19:38:18 imp Exp $ + * $FreeBSD: src/sys/dev/pci/pci.c,v 1.214 2003/04/16 03:15:08 mdodd Exp $ * */ @@ -568,42 +568,81 @@ PCI_WRITE_CONFIG(dev, child, PCIR_COMMAND, command, 2); } -void +int pci_enable_busmaster_method(device_t dev, device_t child) { pci_set_command_bit(dev, child, PCIM_CMD_BUSMASTEREN); + return (0); } -void +int pci_disable_busmaster_method(device_t dev, device_t child) { pci_clear_command_bit(dev, child, PCIM_CMD_BUSMASTEREN); + return (0); } -void +int pci_enable_io_method(device_t dev, device_t child, int space) { + u_int16_t command; + u_int16_t bit; + char *error; + + bit = 0; + error = NULL; + switch(space) { case SYS_RES_IOPORT: - pci_set_command_bit(dev, child, PCIM_CMD_PORTEN); + bit = PCIM_CMD_PORTEN; + error = "port"; break; case SYS_RES_MEMORY: - pci_set_command_bit(dev, child, PCIM_CMD_MEMEN); + bit = PCIM_CMD_MEMEN; + error = "memory"; + break; + default: + return (EINVAL); break; } + pci_set_command_bit(dev, child, bit); + command = PCI_READ_CONFIG(dev, child, PCIR_COMMAND, 2); + if (command & bit) + return (0); + device_printf(child, "failed to enable %s mapping!\n", error); + return (ENXIO); } -void +int pci_disable_io_method(device_t dev, device_t child, int space) { + u_int16_t command; + u_int16_t bit; + char *error; + + bit = 0; + error = NULL; + switch(space) { case SYS_RES_IOPORT: - pci_clear_command_bit(dev, child, PCIM_CMD_PORTEN); + bit = PCIM_CMD_PORTEN; + error = "port"; break; case SYS_RES_MEMORY: - pci_clear_command_bit(dev, child, PCIM_CMD_MEMEN); + bit = PCIM_CMD_MEMEN; + error = "memory"; + break; + default: + return (EINVAL); break; } + pci_clear_command_bit(dev, child, bit); + command = PCI_READ_CONFIG(dev, child, PCIR_COMMAND, 2); + if (command & bit) { + device_printf(child, "failed to disable %s mapping!\n", error); + return (ENXIO); + } + return (0); } /* @@ -1326,7 +1365,8 @@ * Enable the I/O mode. We should also be allocating * resources too. XXX */ - PCI_ENABLE_IO(dev, child, type); + if (PCI_ENABLE_IO(dev, child, type)) + return (NULL); break; } } ==== //depot/projects/smpng/sys/dev/pci/pci_if.m#2 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/sys/dev/pci/pci_if.m,v 1.4 2001/02/27 23:13:20 peter Exp $ +# $FreeBSD: src/sys/dev/pci/pci_if.m,v 1.5 2003/04/16 03:15:08 mdodd Exp $ # #include @@ -56,23 +56,23 @@ int state; }; -METHOD void enable_busmaster { +METHOD int enable_busmaster { device_t dev; device_t child; }; -METHOD void disable_busmaster { +METHOD int disable_busmaster { device_t dev; device_t child; }; -METHOD void enable_io { +METHOD int enable_io { device_t dev; device_t child; int space; }; -METHOD void disable_io { +METHOD int disable_io { device_t dev; device_t child; int space; ==== //depot/projects/smpng/sys/dev/pci/pci_private.h#6 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/pci/pci_private.h,v 1.7 2003/02/17 21:20:35 imp Exp $ + * $FreeBSD: src/sys/dev/pci/pci_private.h,v 1.8 2003/04/16 03:15:08 mdodd Exp $ * */ @@ -54,10 +54,10 @@ int reg, int width); void pci_write_config_method(device_t dev, device_t child, int reg, u_int32_t val, int width); -void pci_enable_busmaster_method(device_t dev, device_t child); -void pci_disable_busmaster_method(device_t dev, device_t child); -void pci_enable_io_method(device_t dev, device_t child, int space); -void pci_disable_io_method(device_t dev, device_t child, int space); +int pci_enable_busmaster_method(device_t dev, device_t child); +int pci_disable_busmaster_method(device_t dev, device_t child); +int pci_enable_io_method(device_t dev, device_t child, int space); +int pci_disable_io_method(device_t dev, device_t child, int space); struct resource *pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); ==== //depot/projects/smpng/sys/dev/pci/pcivar.h#9 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/pci/pcivar.h,v 1.60 2002/11/27 06:41:28 imp Exp $ + * $FreeBSD: src/sys/dev/pci/pcivar.h,v 1.61 2003/04/16 03:15:08 mdodd Exp $ * */ @@ -249,28 +249,28 @@ * These should be used in preference to manually manipulating * configuration space. */ -static __inline void +static __inline int pci_enable_busmaster(device_t dev) { - PCI_ENABLE_BUSMASTER(device_get_parent(dev), dev); + return(PCI_ENABLE_BUSMASTER(device_get_parent(dev), dev)); } -static __inline void +static __inline int pci_disable_busmaster(device_t dev) { - PCI_DISABLE_BUSMASTER(device_get_parent(dev), dev); + return(PCI_DISABLE_BUSMASTER(device_get_parent(dev), dev)); } -static __inline void +static __inline int pci_enable_io(device_t dev, int space) { - PCI_ENABLE_IO(device_get_parent(dev), dev, space); + return(PCI_ENABLE_IO(device_get_parent(dev), dev, space)); } -static __inline void +static __inline int pci_disable_io(device_t dev, int space) { - PCI_DISABLE_IO(device_get_parent(dev), dev, space); + return(PCI_DISABLE_IO(device_get_parent(dev), dev, space)); } /* ==== //depot/projects/smpng/sys/dev/pdq/if_fpa.c#5 (text+ko) ==== @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/pdq/if_fpa.c,v 1.18 2003/04/15 06:37:25 mdodd Exp $ + * $FreeBSD: src/sys/dev/pdq/if_fpa.c,v 1.19 2003/04/16 03:16:55 mdodd Exp $ * */ @@ -119,21 +119,6 @@ * Map control/status registers. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_IOPORT); - pci_enable_io(dev, SYS_RES_MEMORY); - command = pci_read_config(dev, PCIR_COMMAND, 4); - - if (!(command & PCIM_CMD_PORTEN)) { - device_printf(dev, "Failed to enable PCI I/O ports.\n"); - error = ENXIO; - goto bad; - } - - if (!(command & PCIM_CMD_MEMEN)) { - device_printf(dev, "Failed to enable PCI memory mapping.\n"); - error = ENXIO; - goto bad; - } command = pci_read_config(dev, PCIR_LATTIMER, 1); if (command < DEFPA_LATENCY) { ==== //depot/projects/smpng/sys/dev/sound/pci/ds1.c#8 (text+ko) ==== @@ -33,7 +33,7 @@ #include #include -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ds1.c,v 1.31 2003/02/20 17:31:11 cognet Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ds1.c,v 1.32 2003/04/16 05:03:35 simokawa Exp $"); /* -------------------------------------------------------------------- */ @@ -828,7 +828,7 @@ if (sc->regbase == NULL) { if (bus_dma_tag_create(NULL, 2, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, - NULL, NULL, memsz, 1, 1, 0, &sc->control_dmat)) + NULL, NULL, memsz, 1, memsz, 0, &sc->control_dmat)) return -1; if (bus_dmamem_alloc(sc->control_dmat, &buf, BUS_DMA_NOWAIT, &sc->map)) return -1; ==== //depot/projects/smpng/sys/dev/sound/pci/ich.c#19 (text+ko) ==== @@ -32,7 +32,7 @@ #include #include -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ich.c,v 1.27 2003/04/04 07:15:19 orion Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ich.c,v 1.28 2003/04/16 03:16:55 mdodd Exp $"); /* -------------------------------------------------------------------- */ @@ -685,7 +685,6 @@ pci_write_config(dev, PCIR_ICH_LEGACY, ICH_LEGACY_ENABLE, 1); } - pci_enable_io(dev, SYS_RES_IOPORT); /* * Enable bus master. On ich4 this may prevent the detection of * the primary codec becoming ready in ich_init(). ==== //depot/projects/smpng/sys/dev/sound/pci/via8233.c#5 (text+ko) ==== @@ -44,7 +44,7 @@ #include -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/via8233.c,v 1.8 2003/03/26 05:51:13 orion Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/via8233.c,v 1.9 2003/04/16 03:16:55 mdodd Exp $"); #define VIA8233_PCI_ID 0x30591106 @@ -739,7 +739,6 @@ return ENXIO; } - pci_enable_io(dev, SYS_RES_IOPORT); pci_set_powerstate(dev, PCI_POWERSTATE_D0); pci_enable_busmaster(dev); ==== //depot/projects/smpng/sys/dev/txp/if_txp.c#14 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/txp/if_txp.c,v 1.16 2003/04/15 06:37:27 mdodd Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/txp/if_txp.c,v 1.17 2003/04/16 03:16:55 mdodd Exp $"); #include #include @@ -90,7 +90,7 @@ #ifndef lint static const char rcsid[] = - "$FreeBSD: src/sys/dev/txp/if_txp.c,v 1.16 2003/04/15 06:37:27 mdodd Exp $"; + "$FreeBSD: src/sys/dev/txp/if_txp.c,v 1.17 2003/04/16 03:16:55 mdodd Exp $"; #endif /* @@ -212,7 +212,6 @@ { struct txp_softc *sc; struct ifnet *ifp; - u_int32_t command; u_int16_t p1; u_int32_t p2; int unit, error = 0, rid; @@ -251,23 +250,6 @@ * Map control/status registers. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_IOPORT); - pci_enable_io(dev, SYS_RES_MEMORY); - command = pci_read_config(dev, PCIR_COMMAND, 4); - -#ifdef TXP_USEIOSPACE - if (!(command & PCIM_CMD_PORTEN)) { - device_printf(dev, "failed to enable I/O ports!\n"); - error = ENXIO; - goto fail; - } -#else - if (!(command & PCIM_CMD_MEMEN)) { - device_printf(dev, "failed to enable memory mapping!\n"); - error = ENXIO; - goto fail; - } -#endif rid = TXP_RID; sc->sc_res = bus_alloc_resource(dev, TXP_RES, &rid, ==== //depot/projects/smpng/sys/dev/wl/if_wl.c#11 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/wl/if_wl.c,v 1.47 2003/02/19 05:47:17 imp Exp $ */ +/* $FreeBSD: src/sys/dev/wl/if_wl.c,v 1.48 2003/04/16 15:52:20 jhay Exp $ */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -363,7 +363,7 @@ wlprobe(struct isa_device *id) { struct wl_softc *sc = &wl_softc[id->id_unit]; - register short base = id->id_iobase; + short base = id->id_iobase; char *str = "wl%d: board out of range [0..%d]\n"; u_char inbuf[100]; unsigned long oldpri; @@ -434,10 +434,10 @@ wlattach(struct isa_device *id) { struct wl_softc *sc = (struct wl_softc *) &wl_softc[id->id_unit]; - register short base = id->id_iobase; + short base = id->id_iobase; int i,j; u_char unit = id->id_unit; - register struct ifnet *ifp = &sc->wl_if; + struct ifnet *ifp = &sc->wl_if; #ifdef WLDEBUG printf("wlattach: base %x, unit %d\n", base, unit); @@ -526,7 +526,7 @@ static void wldump(int unit) { - register struct wl_softc *sp = WLSOFTC(unit); + struct wl_softc *sp = WLSOFTC(unit); int base = sp->base; int i; @@ -555,7 +555,7 @@ static void wlinitmmc(int unit) { - register struct wl_softc *sp = WLSOFTC(unit); + struct wl_softc *sp = WLSOFTC(unit); int base = sp->base; int configured; int mode = sp->mode; @@ -664,7 +664,7 @@ static void wlinit(void *xsc) { - register struct wl_softc *sc = xsc; + struct wl_softc *sc = xsc; struct ifnet *ifp = &sc->wl_if; int stat; u_long oldpri; @@ -708,7 +708,7 @@ static int wlhwrst(int unit) { - register struct wl_softc *sc = WLSOFTC(unit); + struct wl_softc *sc = WLSOFTC(unit); #ifdef WLDEBUG if (sc->wl_if.if_flags & IFF_DEBUG) @@ -754,14 +754,14 @@ static void wlbldcu(int unit) { - register struct wl_softc *sc = WLSOFTC(unit); + struct wl_softc *sc = WLSOFTC(unit); short base = sc->base; scp_t scp; iscp_t iscp; scb_t scb; ac_t cb; tbd_t tbd; - int i; + int i; bzero(&scp, sizeof(scp)); scp.scp_sysbus = 0; @@ -831,11 +831,11 @@ static void wlstart(struct ifnet *ifp) { - int unit = ifp->if_unit; - struct mbuf *m; - register struct wl_softc *sc = WLSOFTC(unit); - short base = sc->base; - int scb_status, cu_status, scb_command; + int unit = ifp->if_unit; + struct mbuf *m; >>> TRUNCATED FOR MAIL (1000 lines) <<<