Date: Sun, 17 Feb 2008 06:02:39 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 135551 for review Message-ID: <200802170602.m1H62dvH052900@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802170602.m1H62dvH052900>