From owner-p4-projects@FreeBSD.ORG Sun Feb 17 06:02:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3B5B416A419; Sun, 17 Feb 2008 06:02:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00CA416A417 for ; Sun, 17 Feb 2008 06:02:40 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EDD5013C448 for ; Sun, 17 Feb 2008 06:02:39 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1H62dDn052903 for ; Sun, 17 Feb 2008 06:02:39 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1H62dvH052900 for perforce@freebsd.org; Sun, 17 Feb 2008 06:02:39 GMT (envelope-from imp@freebsd.org) Date: Sun, 17 Feb 2008 06:02:39 GMT Message-Id: <200802170602.m1H62dvH052900@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135551 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 06:02:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=135551 Change 135551 by imp@imp_lighthouse on 2008/02/17 06:02:03 Implement reading domain0 here too. Also, fix minor naming issue. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/adm5120/admpci.c#2 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/idt/idtpci.c#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/adm5120/admpci.c#2 (text+ko) ==== @@ -325,11 +325,14 @@ } static int -gt_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) +admpci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { struct admpci_softc *sc = device_get_softc(dev); switch (which) { + case PCIB_IVAR_DOMAIN: + *result = 0; + return (0); case PCIB_IVAR_BUS: *result = sc->sc_busno; return (0); @@ -339,7 +342,7 @@ } static int -gt_write_ivar(device_t dev, device_t child, int which, uintptr_t result) +admpci_write_ivar(device_t dev, device_t child, int which, uintptr_t result) { struct admpci_softc * sc = device_get_softc(dev); @@ -471,8 +474,8 @@ /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar, gt_read_ivar), - DEVMETHOD(bus_write_ivar, gt_write_ivar), + DEVMETHOD(bus_read_ivar, admpci_read_ivar), + DEVMETHOD(bus_write_ivar, admpci_write_ivar), DEVMETHOD(bus_alloc_resource, admpci_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, admpci_activate_resource), ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/idt/idtpci.c#2 (text+ko) ==== @@ -441,11 +441,14 @@ } static int -gt_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) +idtpci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { struct idtpci_softc *sc = device_get_softc(dev); switch (which) { + case PCIB_IVAR_DOMAIN: + *result = 0; + return (0); case PCIB_IVAR_BUS: *result = sc->sc_busno; return (0); @@ -455,7 +458,7 @@ } static int -gt_write_ivar(device_t dev, device_t child, int which, uintptr_t result) +idtpci_write_ivar(device_t dev, device_t child, int which, uintptr_t result) { struct idtpci_softc * sc = device_get_softc(dev); @@ -591,8 +594,8 @@ /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar, gt_read_ivar), - DEVMETHOD(bus_write_ivar, gt_write_ivar), + DEVMETHOD(bus_read_ivar, idtpci_read_ivar), + DEVMETHOD(bus_write_ivar, idtpci_write_ivar), DEVMETHOD(bus_alloc_resource, idtpci_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, idtpci_activate_resource),