From owner-p4-projects@FreeBSD.ORG Sun Apr 27 01:35:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 34FE51065680; Sun, 27 Apr 2008 01:35:34 +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 E930E106564A for ; Sun, 27 Apr 2008 01:35:33 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D7ECF8FC16 for ; Sun, 27 Apr 2008 01:35:33 +0000 (UTC) (envelope-from jb@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 m3R1ZXDp095436 for ; Sun, 27 Apr 2008 01:35:33 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m3R1ZXAH095434 for perforce@freebsd.org; Sun, 27 Apr 2008 01:35:33 GMT (envelope-from jb@freebsd.org) Date: Sun, 27 Apr 2008 01:35:33 GMT Message-Id: <200804270135.m3R1ZXAH095434@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 140709 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, 27 Apr 2008 01:35:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=140709 Change 140709 by jb@freebsd3 on 2008/04/27 01:35:18 IFC Affected files ... .. //depot/projects/dtrace/doc/share/pgpkeys/novel.key#4 integrate .. //depot/projects/dtrace/src/games/fortune/datfiles/fortunes#32 integrate .. //depot/projects/dtrace/src/gnu/usr.bin/gdb/arch/mips/Makefile#1 branch .. //depot/projects/dtrace/src/gnu/usr.bin/gdb/arch/mips/config.h#1 branch .. //depot/projects/dtrace/src/gnu/usr.bin/gdb/arch/mips/init.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/Makefile.inc#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/SYS.h#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/Symbol.map#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/_fpmath.h#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/arith.h#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gd_qnan.h#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gdtoa/Makefile.inc#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gdtoa/arith.h#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/Makefile.inc#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/_set_tp.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/_setjmp.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/fabs.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/fabs.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/flt_rounds.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/fpgetmask.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/fpgetround.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/fpgetsticky.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/fpsetmask.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/fpsetround.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/fpsetsticky.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/infinity.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/ldexp.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/longjmp.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/makecontext.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/modf.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/modf.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/setjmp.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/signalcontext.c#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/gen/sigsetjmp.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/net/Makefile.inc#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/net/htonl.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/net/htons.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/net/ntohl.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/net/ntohs.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/softfloat/milieu.h#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/softfloat/mips-gcc.h#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/softfloat/softfloat.h#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/stdlib/Makefile.inc#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/string/Makefile.inc#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/string/bcmp.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/string/bcopy.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/string/bzero.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/string/ffs.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/string/index.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/string/memcpy.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/string/memmove.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/string/rindex.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/string/strcmp.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/string/strlen.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/sys/Makefile.inc#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/sys/Ovfork.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/sys/brk.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/sys/cerror.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/sys/exect.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/sys/fork.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/sys/pipe.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/sys/ptrace.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/sys/sbrk.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/sys/shmat.S#1 branch .. //depot/projects/dtrace/src/lib/libc/mips/sys/syscall.S#1 branch .. //depot/projects/dtrace/src/lib/libthr/arch/mips/Makefile.inc#1 branch .. //depot/projects/dtrace/src/lib/libthr/thread/thr_mutex.c#21 integrate .. //depot/projects/dtrace/src/lib/msun/mips/Makefile.inc#1 branch .. //depot/projects/dtrace/src/lib/msun/mips/Symbol.map#1 branch .. //depot/projects/dtrace/src/lib/msun/mips/fenv.c#1 branch .. //depot/projects/dtrace/src/lib/msun/mips/fenv.h#1 branch .. //depot/projects/dtrace/src/sys/conf/files.powerpc#18 integrate .. //depot/projects/dtrace/src/sys/conf/files.sparc64#10 integrate .. //depot/projects/dtrace/src/sys/conf/files.sun4v#14 integrate .. //depot/projects/dtrace/src/sys/dev/bce/if_bce.c#20 integrate .. //depot/projects/dtrace/src/sys/dev/bge/if_bge.c#27 integrate .. //depot/projects/dtrace/src/sys/dev/hme/if_hme_pci.c#6 integrate .. //depot/projects/dtrace/src/sys/dev/hme/if_hme_sbus.c#6 integrate .. //depot/projects/dtrace/src/sys/dev/mii/ciphy.c#8 integrate .. //depot/projects/dtrace/src/sys/dev/mii/miidevs#15 integrate .. //depot/projects/dtrace/src/sys/dev/pci/pcivar.h#12 integrate .. //depot/projects/dtrace/src/sys/dev/scc/scc_bfe.h#5 integrate .. //depot/projects/dtrace/src/sys/dev/scc/scc_bfe_ebus.c#4 integrate .. //depot/projects/dtrace/src/sys/dev/scc/scc_bfe_macio.c#4 integrate .. //depot/projects/dtrace/src/sys/dev/scc/scc_bfe_quicc.c#2 integrate .. //depot/projects/dtrace/src/sys/dev/scc/scc_bfe_sbus.c#4 integrate .. //depot/projects/dtrace/src/sys/dev/scc/scc_core.c#5 integrate .. //depot/projects/dtrace/src/sys/dev/ti/if_ti.c#11 integrate .. //depot/projects/dtrace/src/sys/kern/kern_descrip.c#27 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_subr.c#39 integrate .. //depot/projects/dtrace/src/sys/mips/include/pmap.h#2 integrate .. //depot/projects/dtrace/src/sys/mips/mips/pmap.c#2 integrate .. //depot/projects/dtrace/src/sys/modules/scc/Makefile#3 integrate .. //depot/projects/dtrace/src/sys/powerpc/booke/vm_machdep.c#3 integrate .. //depot/projects/dtrace/src/sys/powerpc/conf/MPC85XX#4 integrate .. //depot/projects/dtrace/src/sys/powerpc/include/cpufunc.h#4 integrate .. //depot/projects/dtrace/src/sys/powerpc/include/spr.h#5 integrate .. //depot/projects/dtrace/src/sys/powerpc/mpc85xx/mpc85xx.c#1 branch .. //depot/projects/dtrace/src/sys/powerpc/mpc85xx/ocpbus.c#3 integrate .. //depot/projects/dtrace/src/sys/powerpc/mpc85xx/ocpbus.h#2 integrate .. //depot/projects/dtrace/src/sys/powerpc/mpc85xx/pci_ocp.c#2 integrate .. //depot/projects/dtrace/src/sys/powerpc/powermac/macio.c#7 integrate .. //depot/projects/dtrace/src/sys/powerpc/powermac/maciovar.h#4 integrate .. //depot/projects/dtrace/src/sys/sparc64/isa/isa.c#7 integrate .. //depot/projects/dtrace/src/sys/sparc64/pci/ofw_pci.h#5 integrate .. //depot/projects/dtrace/src/sys/sparc64/pci/ofw_pci_if.m#7 delete .. //depot/projects/dtrace/src/sys/sparc64/pci/psycho.c#12 integrate .. //depot/projects/dtrace/src/sys/sun4v/sun4v/hv_pci.c#8 integrate .. //depot/projects/dtrace/src/sys/sys/mount.h#11 integrate .. //depot/projects/dtrace/www/en/cgi/man.cgi#10 integrate Differences ... ==== //depot/projects/dtrace/doc/share/pgpkeys/novel.key#4 (text+ko) ==== @@ -1,9 +1,9 @@ - + uid Roman Bogorodskiy @@ -17,28 +17,28 @@ boNl3sK/+KsJxwt6frqOBnnvtQYQEYzIQNJ4pMKC2Mz15jMYndwsuxg6L09e6+R1 7RfIEFEXU7p6YWQFLoBFUW16XF7ye8YrjFJxAEfTa4jnXF27ERopVpUFAAYptCVS b21hbiBCb2dvcm9kc2tpeSA8bm92ZWxARnJlZUJTRC5vcmc+iL0EEwECACcCGwMG -CwkIBwMCAxUCAwMWAgECHgECF4ACGQEFAkWk7H0FCQbS+2IACgkQgHRbOB2qykaY -TgP/aTl0A12yrwFi6sQE/2hzrK6qQ1HL4qmz3UETXZSHcKbZwXYLbGO2Qvs5dMZv -FCw50QbLh+3I2fn3kFU/IaupD3wwIoTdRJiLM+vl+EU/H3ClZ0fgC7iEnroHCbL4 -OZW+L6SEx+eT508pQm36SOJKGkS/++wrbUGuG50JiKOKihG0KVJvbWFuIEJvZ29y +CwkIBwMCAxUCAwMWAgECHgECF4ACGQEFAkgS0BsFCQlA3vgACgkQgHRbOB2qykZG +oAP8D28j3pBxbOch9/mlDL048M1lWMnJhAJ1wYpcAbmKseBrEWCz9czxPj/UgUNl +6EfRLT71W0HOH/eN74zJqwWb80wviX9nOKApsmqtv528fujoMYF+XeweBX4a+Cta +D+krJUxM0rA8kETvLcHCehl9EDJdNHHM5piSCTrnj8XBNJS0KVJvbWFuIEJvZ29y b2Rza2l5IDxib2dvcm9kc2tpeUBnbWFpbC5jb20+iLoEEwECACQCGwMGCwkIBwMC -AxUCAwMWAgECHgECF4AFAkWk7IEFCQbS+2IACgkQgHRbOB2qykZlpgP/Vr9cnLEF -iijzgyHXBhfo3Y8dmO7+8r1LDd7zEBfFIVQWmmquOZBcHOdJ7kOWe+X7e56yBCpb -DboNUiXgYJ728UfDvk3ida5Mj4OiQjOKlW1pyiwNhNE8/X1ngoVIdZ/mafv8141Q -nkIINIC7dcB27+QKDuzQJ2FMI+4azR1a3Ee0KFJvbWFuIEJvZ29yb2Rza2l5IDxi +AxUCAwMWAgECHgECF4AFAkgS0B4FCQlA3vgACgkQgHRbOB2qykZ1+AP/ajL5tZdQ +hoM075iBc+q34czeeLccV6nXGDkQSyJ2gp654+oOiDKIU+HeaaNVpgvvtzZqoFQZ +GH38DWM0G/WLuaEJDsCPSVHdKMgAe98FaLWe/oekTS0KF/epuK73GHRBNZaCPrcn +tVWALyo/O6V65023Lor4DcU6pjhDbwk6Yrq0KFJvbWFuIEJvZ29yb2Rza2l5IDxi b2dvcm9kc2tpeUBpbmJveC5ydT6IugQTAQIAJAIbAwYLCQgHAwIDFQIDAxYCAQIe -AQIXgAUCRaTsgQUJBtL7YgAKCRCAdFs4HarKRvzvBADDlwy0yK1iSQNKx1z7kkoL -+JVzXfzDmJ4uOw3T6XwUNuXzNENslgNd2UQJgEm8ag5Bxsx9sXY2xbq7OwIoeULl -gc6Dde8MgLUZdlFLfUIzRz8Bw6Mw2cxTp5IM2EL1Q7Khj55toRplzkM3rzIU8YEf -lT21C1tFsk6SZHVLROG3n4i0BBMBAgAeBQJAsySbAhsDBgsJCAcDAgMVAgMDFgIB +AQIXgAUCSBLQHgUJCUDe+AAKCRCAdFs4HarKRnIcA/4iBqhJ7zdEx1j1qQ0rj9hO +R/OQISesx17fRMwd/u3tmDjAyX22Pgqhhj56f2eJ2SQUr0PJXin6UwaYEQ4ifbz0 +z6zVZlmiLVEwJk6O43dhHc6k9RxM/eDltzbCa4aBQwuQg3Seyg4Z2HCvRrKv9ESZ +9NZVI+hqVyQl9hyJ95b8CIi0BBMBAgAeBQJAsySbAhsDBgsJCAcDAgMVAgMDFgIB Ah4BAheAAAoJEIB0WzgdqspG/3kD/0isk4pKJTMKCcoaGcZsGW6C3e5CZw8Mr+OW AsxHGh/Iv3iGB7gGoO07R/I+uAMNR2VbPQAvYPlMwrIhubNzUZRzkdlBu7QQyT7C lyEIAn/ikUzfmxvD2U0D0SrHguz7YcSH1Vjb9R7J8dc+qlPJBRXIX6saNG6+FbSk KN+J8hOBtCVSb21hbiBCb2dvcm9kc2tpeSA8bm92ZWxAY2x1YmxpZmUucnU+iLwE -EwECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUCRaTsgQUJBtL7YgAKCRCA -dFs4HarKRuscA/972/PGOvl0zijaqyAQ8p4vIQU9/0MTOvjSJ7h1F2R77B4SI7lK -afbO87vBPo1QugRmJ/j3bD4pOg9G2CNXOFyUENrV47E0BVGCQURph9/CPGw0wdUm -s/AcBfDoCsqIA71O+p/5d7STbtIatKdoUePi89QIjI0HQjpXV/l5Py1SEw== -=0bTH +EwECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUCSBLQHgUJCUDe+AAKCRCA +dFs4HarKRpUEBACyMr1jFO6G1HTwixax4+jMmto+9Mdp3uifEr/Rwa6mFyIGQx1G +3N/bHWgWNIUkD8ZAKoD4jaijPNpE9yEUsXSkZD7TOkvRfsFbGDb0PissDnraRr0o +hNH2K/edi23vXQH/rHj7N/B4fjF+3x0jocg3+Dnh1ADEJcPBN2HQGVAkkA== +=ilKf -----END PGP PUBLIC KEY BLOCK----- ]]> ==== //depot/projects/dtrace/src/games/fortune/datfiles/fortunes#32 (text+ko) ==== @@ -1,5 +1,5 @@ This fortune brought to you by: -$FreeBSD: src/games/fortune/datfiles/fortunes,v 1.260 2008/04/03 10:22:56 yar Exp $ +$FreeBSD: src/games/fortune/datfiles/fortunes,v 1.262 2008/04/26 22:15:03 yar Exp $ % ======================================================================= || || @@ -2610,7 +2610,7 @@ "Certainly," said man. "Then I leave it to you to think of one for all of this," said God. And He went away. - -- Kurt Vonnegut, Between Time and Timbuktu" + -- Kurt Vonnegut, "Between Time and Timbuktu" % In the beginning there was data. The data was without form and null, and darkness was upon the face of the console; and the Spirit of @@ -10549,6 +10549,10 @@ upon Hinckley's acquittal for shooting President Ronald Reagan. % +Another flaw in the human character is that everybody wants to build +and nobody wants to do maintenance. + -- Kurt Vonnegut, "Hocus Pocus" +% Another good night not to sleep in a eucalyptus tree. % Another megabytes the dust. ==== //depot/projects/dtrace/src/lib/libthr/thread/thr_mutex.c#21 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.72 2008/03/25 09:48:10 ru Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.73 2008/04/26 13:19:07 kris Exp $ */ #include "namespace.h" @@ -69,7 +69,7 @@ * For adaptive mutexes, how many times to spin doing trylock2 * before entering the kernel to block */ -#define MUTEX_ADAPTIVE_SPINS 200 +#define MUTEX_ADAPTIVE_SPINS 2000 /* * Prototypes ==== //depot/projects/dtrace/src/sys/conf/files.powerpc#18 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.powerpc,v 1.74 2008/03/03 20:40:19 raj Exp $ +# $FreeBSD: src/sys/conf/files.powerpc,v 1.75 2008/04/26 17:57:28 raj Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -96,6 +96,7 @@ powerpc/fpu/fpu_mul.c optional fpu_emu powerpc/fpu/fpu_sqrt.c optional fpu_emu powerpc/fpu/fpu_subr.c optional fpu_emu +powerpc/mpc85xx/mpc85xx.c optional mpc85xx powerpc/mpc85xx/nexus.c optional mpc85xx powerpc/mpc85xx/ocpbus.c optional mpc85xx powerpc/mpc85xx/opic.c optional mpc85xx ==== //depot/projects/dtrace/src/sys/conf/files.sparc64#10 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.sparc64,v 1.94 2008/02/11 21:40:22 marius Exp $ +# $FreeBSD: src/sys/conf/files.sparc64,v 1.95 2008/04/26 11:01:37 marius Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -83,7 +83,6 @@ sparc64/pci/ofw_pcib.c optional pci sparc64/pci/ofw_pcib_subr.c optional pci sparc64/pci/ofw_pcibus.c optional pci -sparc64/pci/ofw_pci_if.m optional pci sparc64/pci/psycho.c optional pci sparc64/sbus/dma_sbus.c optional sbus sparc64/sbus/sbus.c optional sbus ==== //depot/projects/dtrace/src/sys/conf/files.sun4v#14 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.sun4v,v 1.13 2007/12/02 20:40:31 rwatson Exp $ +# $FreeBSD: src/sys/conf/files.sun4v,v 1.14 2008/04/26 11:01:37 marius Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -49,7 +49,6 @@ sparc64/pci/ofw_pcib.c optional pci sparc64/pci/ofw_pcib_subr.c optional pci sparc64/pci/ofw_pcibus.c optional pci -sparc64/pci/ofw_pci_if.m optional pci # XXX hvcons should be optional sun4v/sun4v/hvcons.c standard ==== //depot/projects/dtrace/src/sys/dev/bce/if_bce.c#20 (text) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.37 2008/04/11 23:10:40 davidch Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.38 2008/04/26 14:13:48 marius Exp $"); /* * The following controllers are supported by this driver: @@ -502,7 +502,7 @@ /* Allocate PCI memory resources. */ rid = PCIR_BAR(0); sc->bce_res_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &rid, RF_ACTIVE | PCI_RF_DENSE); + &rid, RF_ACTIVE); if (sc->bce_res_mem == NULL) { BCE_PRINTF("%s(%d): PCI memory allocation failed\n", ==== //depot/projects/dtrace/src/sys/dev/bge/if_bge.c#27 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.205 2008/04/08 11:51:17 bz Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.207 2008/04/26 14:13:48 marius Exp $"); /* * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. @@ -1894,16 +1894,10 @@ /* * Allocate the parent bus DMA tag appropriate for PCI. */ - error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), /* parent */ - 1, 0, /* alignment, boundary */ - BUS_SPACE_MAXADDR, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - MAXBSIZE, BGE_NSEG_NEW, /* maxsize, nsegments */ - BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ - 0, /* flags */ - NULL, NULL, /* lockfunc, lockarg */ - &sc->bge_cdata.bge_parent_tag); + error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), + 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, + NULL, BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, + 0, NULL, NULL, &sc->bge_cdata.bge_parent_tag); if (error != 0) { device_printf(sc->bge_dev, @@ -1912,7 +1906,7 @@ } /* - * Create tag for RX mbufs. + * Create tag for mbufs. */ error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, @@ -2246,7 +2240,7 @@ rid = BGE_PCI_BAR0; sc->bge_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, - RF_ACTIVE | PCI_RF_DENSE); + RF_ACTIVE); if (sc->bge_res == NULL) { device_printf (sc->bge_dev, "couldn't map memory\n"); @@ -3402,7 +3396,7 @@ error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_mtag, map, m, segs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { - m = m_defrag(m, M_DONTWAIT); + m = m_collapse(m, M_DONTWAIT, BGE_NSEG_NEW); if (m == NULL) { m_freem(*m_head); *m_head = NULL; ==== //depot/projects/dtrace/src/sys/dev/hme/if_hme_pci.c#6 (text+ko) ==== @@ -1,5 +1,6 @@ /*- * Copyright (c) 2000 Matthew R. Green + * Copyright (c) 2007 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme_pci.c,v 1.24 2008/04/24 23:12:03 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme_pci.c,v 1.25 2008/04/26 14:17:21 marius Exp $"); /* * PCI front-end device driver for the HME ethernet device. @@ -72,11 +73,7 @@ struct hme_pci_softc { struct hme_softc hsc_hme; /* HME device */ struct resource *hsc_sres; - int hsc_srid; struct resource *hsc_ires; - int hsc_irid; - bus_space_tag_t hsc_memt; - bus_space_handle_t hsc_memh; void *hsc_ih; }; @@ -127,7 +124,7 @@ { if (pci_get_vendor(dev) == PCI_VENDOR_SUN && - pci_get_device(dev) == PCI_PRODUCT_SUN_HMENETWORK) { + pci_get_device(dev) == PCI_PRODUCT_SUN_HMENETWORK) { device_set_desc(dev, "Sun HME 10/100 Ethernet"); return (BUS_PROBE_DEFAULT); } @@ -137,44 +134,27 @@ int hme_pci_attach(device_t dev) { - struct hme_pci_softc *hsc = device_get_softc(dev); - struct hme_softc *sc = &hsc->hsc_hme; - int error = 0; + struct hme_pci_softc *hsc; + struct hme_softc *sc; + bus_space_tag_t memt; + bus_space_handle_t memh; + int i, error = 0; #if !(defined(__powerpc__) || defined(__sparc64__)) device_t *children, ebus_dev; struct resource *ebus_rres; - bus_space_handle_t romh; - bus_space_tag_t romt; - int dataoff, ebus_rrid, slot, vpdoff; - int i, nchildren; - uint8_t buf[32]; - static const uint8_t promhdr[] = { 0x55, 0xaa }; -#define PROMHDR_PTR_DATA 0x18 - static const uint8_t promdat[] = { - 0x50, 0x43, 0x49, 0x52, /* "PCIR" */ - PCI_VENDOR_SUN & 0xff, PCI_VENDOR_SUN >> 8, - PCI_PRODUCT_SUN_HMENETWORK & 0xff, - PCI_PRODUCT_SUN_HMENETWORK >> 8 - }; -#define PROMDATA_PTR_VPD 0x08 - struct pci_vpd { - uint8_t vpd_key0; - uint8_t vpd_key1; - uint8_t vpd_len; - } *vpd; -#define PCI_VPDRES_ISLARGE(x) ((x) & 0x80) -#define PCI_VPDRES_LARGE_NAME(x) ((x) & 0x7f) -#define PCI_VPDRES_TYPE_VPD 0x10 /* large */ + int j, slot; #endif pci_enable_busmaster(dev); /* * Some Sun HMEs do have their intpin register bogusly set to 0, - * although it should be 1. correct that. + * although it should be 1. Correct that. */ if (pci_get_intpin(dev) == 0) pci_set_intpin(dev, 1); + hsc = device_get_softc(dev); + sc = &hsc->hsc_hme; sc->sc_dev = dev; sc->sc_flags |= HME_PCI; mtx_init(&sc->sc_lock, device_get_nameunit(dev), MTX_NETWORK_LOCK, @@ -190,36 +170,31 @@ * bank 4: HME MIF registers: +0x7000 * */ - hsc->hsc_srid = PCIR_BAR(0); - hsc->hsc_sres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &hsc->hsc_srid, RF_ACTIVE); + i = PCIR_BAR(0); + hsc->hsc_sres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &i, RF_ACTIVE); if (hsc->hsc_sres == NULL) { device_printf(dev, "could not map device registers\n"); error = ENXIO; goto fail_mtx; } - hsc->hsc_irid = 0; - hsc->hsc_ires = bus_alloc_resource_any(dev, SYS_RES_IRQ, - &hsc->hsc_irid, RF_SHAREABLE | RF_ACTIVE); + i = 0; + hsc->hsc_ires = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &i, RF_SHAREABLE | RF_ACTIVE); if (hsc->hsc_ires == NULL) { device_printf(dev, "could not allocate interrupt\n"); error = ENXIO; goto fail_sres; } - hsc->hsc_memt = rman_get_bustag(hsc->hsc_sres); - hsc->hsc_memh = rman_get_bushandle(hsc->hsc_sres); + memt = rman_get_bustag(hsc->hsc_sres); + memh = rman_get_bushandle(hsc->hsc_sres); sc->sc_sebt = sc->sc_etxt = sc->sc_erxt = sc->sc_mact = sc->sc_mift = - hsc->hsc_memt; - bus_space_subregion(hsc->hsc_memt, hsc->hsc_memh, 0x0000, 0x1000, - &sc->sc_sebh); - bus_space_subregion(hsc->hsc_memt, hsc->hsc_memh, 0x2000, 0x1000, - &sc->sc_etxh); - bus_space_subregion(hsc->hsc_memt, hsc->hsc_memh, 0x4000, 0x1000, - &sc->sc_erxh); - bus_space_subregion(hsc->hsc_memt, hsc->hsc_memh, 0x6000, 0x1000, - &sc->sc_mach); - bus_space_subregion(hsc->hsc_memt, hsc->hsc_memh, 0x7000, 0x1000, - &sc->sc_mifh); + memt; + bus_space_subregion(memt, memh, 0x0000, 0x1000, &sc->sc_sebh); + bus_space_subregion(memt, memh, 0x2000, 0x1000, &sc->sc_etxh); + bus_space_subregion(memt, memh, 0x4000, 0x1000, &sc->sc_erxh); + bus_space_subregion(memt, memh, 0x6000, 0x1000, &sc->sc_mach); + bus_space_subregion(memt, memh, 0x7000, 0x1000, &sc->sc_mifh); #if defined(__powerpc__) || defined(__sparc64__) OF_getetheraddr(dev, sc->sc_enaddr); @@ -238,25 +213,53 @@ * chapter 2 describes the data structure. * * We don't have a MI EBus driver since no EBus device exists - * (besides the FCode PROM) on add-on HME boards. The ``no driver + * (besides the FCode PROM) on add-on HME boards. The ``no driver * attached'' message for function 0 therefore is what is expected. */ +#define PCI_ROMHDR_SIZE 0x1c +#define PCI_ROMHDR_SIG 0x00 +#define PCI_ROMHDR_SIG_MAGIC 0xaa55 /* little endian */ +#define PCI_ROMHDR_PTR_DATA 0x18 +#define PCI_ROM_SIZE 0x18 +#define PCI_ROM_SIG 0x00 +#define PCI_ROM_SIG_MAGIC 0x52494350 /* "PCIR", endian */ + /* reversed */ +#define PCI_ROM_VENDOR 0x04 +#define PCI_ROM_DEVICE 0x06 +#define PCI_ROM_PTR_VPD 0x08 +#define PCI_VPDRES_BYTE0 0x00 +#define PCI_VPDRES_ISLARGE(x) ((x) & 0x80) +#define PCI_VPDRES_LARGE_NAME(x) ((x) & 0x7f) +#define PCI_VPDRES_TYPE_VPD 0x10 /* large */ +#define PCI_VPDRES_LARGE_LEN_LSB 0x01 +#define PCI_VPDRES_LARGE_LEN_MSB 0x02 +#define PCI_VPDRES_LARGE_DATA 0x03 +#define PCI_VPD_SIZE 0x03 +#define PCI_VPD_KEY0 0x00 +#define PCI_VPD_KEY1 0x01 +#define PCI_VPD_LEN 0x02 +#define PCI_VPD_DATA 0x03 + +#define HME_ROM_READ_N(n, offs) bus_space_read_ ## n (memt, memh, (offs)) +#define HME_ROM_READ_1(offs) HME_ROM_READ_N(1, (offs)) +#define HME_ROM_READ_2(offs) HME_ROM_READ_N(2, (offs)) +#define HME_ROM_READ_4(offs) HME_ROM_READ_N(4, (offs)) + /* Search accompanying EBus bridge. */ slot = pci_get_slot(dev); - if (device_get_children(device_get_parent(dev), &children, - &nchildren) != 0) { + if (device_get_children(device_get_parent(dev), &children, &i) != 0) { device_printf(dev, "could not get children\n"); error = ENXIO; goto fail_sres; } ebus_dev = NULL; - for (i = 0; i < nchildren; i++) { - if (pci_get_class(children[i]) == PCIC_BRIDGE && - pci_get_vendor(children[i]) == PCI_VENDOR_SUN && - pci_get_device(children[i]) == PCI_PRODUCT_SUN_EBUS && - pci_get_slot(children[i]) == slot) { - ebus_dev = children[i]; + for (j = 0; j < i; j++) { + if (pci_get_class(children[j]) == PCIC_BRIDGE && + pci_get_vendor(children[j]) == PCI_VENDOR_SUN && + pci_get_device(children[j]) == PCI_PRODUCT_SUN_EBUS && + pci_get_slot(children[j]) == slot) { + ebus_dev = children[j]; break; } } @@ -267,33 +270,30 @@ } /* Map EBus bridge PROM registers. */ -#define PCI_EBUS2_BOOTROM 0x10 - ebus_rrid = PCI_EBUS2_BOOTROM; + i = PCIR_BAR(0); if ((ebus_rres = bus_alloc_resource_any(ebus_dev, SYS_RES_MEMORY, - &ebus_rrid, RF_ACTIVE)) == NULL) { + &i, RF_ACTIVE)) == NULL) { device_printf(dev, "could not map PROM registers\n"); error = ENXIO; goto fail_children; } - romt = rman_get_bustag(ebus_rres); - romh = rman_get_bushandle(ebus_rres); + memt = rman_get_bustag(ebus_rres); + memh = rman_get_bushandle(ebus_rres); - /* Read PCI expansion PROM header. */ - bus_space_read_region_1(romt, romh, 0, buf, sizeof(buf)); - if (memcmp(buf, promhdr, sizeof(promhdr)) != 0 || - (dataoff = (buf[PROMHDR_PTR_DATA] | - (buf[PROMHDR_PTR_DATA + 1] << 8))) < 0x1c) { - device_printf(dev, "unexpected PCI expansion PROM header\n"); + /* Read PCI Expansion ROM header. */ + if (HME_ROM_READ_2(PCI_ROMHDR_SIG) != PCI_ROMHDR_SIG_MAGIC || + (i = HME_ROM_READ_2(PCI_ROMHDR_PTR_DATA)) < PCI_ROMHDR_SIZE) { + device_printf(dev, "unexpected PCI Expansion ROM header\n"); error = ENXIO; goto fail_rres; } - /* Read PCI expansion PROM data. */ - bus_space_read_region_1(romt, romh, dataoff, buf, sizeof(buf)); - if (memcmp(buf, promdat, sizeof(promdat)) != 0 || - (vpdoff = (buf[PROMDATA_PTR_VPD] | - (buf[PROMDATA_PTR_VPD + 1] << 8))) < 0x1c) { - device_printf(dev, "unexpected PCI expansion PROM data\n"); + /* Read PCI Expansion ROM data. */ + if (HME_ROM_READ_4(i + PCI_ROM_SIG) != PCI_ROM_SIG_MAGIC || + HME_ROM_READ_2(i + PCI_ROM_VENDOR) != pci_get_vendor(dev) || + HME_ROM_READ_2(i + PCI_ROM_DEVICE) != pci_get_device(dev) || + (j = HME_ROM_READ_2(i + PCI_ROM_PTR_VPD)) < i + PCI_ROM_SIZE) { + device_printf(dev, "unexpected PCI Expansion ROM data\n"); error = ENXIO; goto fail_rres; } @@ -301,39 +301,45 @@ /* * Read PCI VPD. * SUNW,hme cards have a single large resource VPD-R tag - * containing one NA. SUNW,qfe cards have four large resource + * containing one NA. SUNW,qfe cards have four large resource * VPD-R tags containing one NA each (all four HME chips share * the same PROM). * The VPD used on both cards is not in PCI 2.2 standard format - * however. The length in the resource header is in big endian + * however. The length in the resource header is in big endian * and the end tag is non-standard (0x79) and followed by an - * all-zero "checksum" byte. Sun calls this a "Fresh Choice + * all-zero "checksum" byte. Sun calls this a "Fresh Choice * Ethernet" VPD... */ /* Look at the end tag to determine whether this is a VPD with 4 NAs. */ - if (bus_space_read_1(romt, romh, - vpdoff + 3 + sizeof(struct pci_vpd) + ETHER_ADDR_LEN) != 0x79 && - bus_space_read_1(romt, romh, - vpdoff + 4 * (3 + sizeof(struct pci_vpd) + ETHER_ADDR_LEN)) == 0x79) + if (HME_ROM_READ_1(j + PCI_VPDRES_LARGE_DATA + PCI_VPD_SIZE + + ETHER_ADDR_LEN) != 0x79 && + HME_ROM_READ_1(j + 4 * (PCI_VPDRES_LARGE_DATA + PCI_VPD_SIZE + + ETHER_ADDR_LEN)) == 0x79) /* Use the Nth NA for the Nth HME on this SUNW,qfe. */ - vpdoff += slot * (3 + sizeof(struct pci_vpd) + ETHER_ADDR_LEN); - bus_space_read_region_1(romt, romh, vpdoff, buf, sizeof(buf)); - vpd = (void *)(buf + 3); - if (PCI_VPDRES_ISLARGE(buf[0]) == 0 || - PCI_VPDRES_LARGE_NAME(buf[0]) != PCI_VPDRES_TYPE_VPD || - (buf[1] << 8 | buf[2]) != sizeof(struct pci_vpd) + ETHER_ADDR_LEN || - vpd->vpd_key0 != 0x4e /* N */ || - vpd->vpd_key1 != 0x41 /* A */ || - vpd->vpd_len != ETHER_ADDR_LEN) { + j += slot * (PCI_VPDRES_LARGE_DATA + PCI_VPD_SIZE + + ETHER_ADDR_LEN); + if (PCI_VPDRES_ISLARGE(HME_ROM_READ_1(j + PCI_VPDRES_BYTE0)) == 0 || + PCI_VPDRES_LARGE_NAME(HME_ROM_READ_1(j + PCI_VPDRES_BYTE0)) != + PCI_VPDRES_TYPE_VPD || + (HME_ROM_READ_1(j + PCI_VPDRES_LARGE_LEN_LSB) << 8 | + HME_ROM_READ_1(j + PCI_VPDRES_LARGE_LEN_MSB)) != + PCI_VPD_SIZE + ETHER_ADDR_LEN || + HME_ROM_READ_1(j + PCI_VPDRES_LARGE_DATA + PCI_VPD_KEY0) != + 0x4e /* N */ || + HME_ROM_READ_1(j + PCI_VPDRES_LARGE_DATA + PCI_VPD_KEY1) != + 0x41 /* A */ || + HME_ROM_READ_1(j + PCI_VPDRES_LARGE_DATA + PCI_VPD_LEN) != + ETHER_ADDR_LEN) { device_printf(dev, "unexpected PCI VPD\n"); error = ENXIO; goto fail_rres; } - bcopy(buf + 3 + sizeof(struct pci_vpd), sc->sc_enaddr, - ETHER_ADDR_LEN); + bus_space_read_region_1(memt, memh, j + PCI_VPDRES_LARGE_DATA + + PCI_VPD_DATA, sc->sc_enaddr, ETHER_ADDR_LEN); fail_rres: - bus_release_resource(ebus_dev, SYS_RES_MEMORY, ebus_rrid, ebus_rres); + bus_release_resource(ebus_dev, SYS_RES_MEMORY, + rman_get_rid(ebus_rres), ebus_rres); fail_children: free(children, M_TEMP); if (error != 0) @@ -359,9 +365,11 @@ return (0); fail_ires: - bus_release_resource(dev, SYS_RES_IRQ, hsc->hsc_irid, hsc->hsc_ires); + bus_release_resource(dev, SYS_RES_IRQ, + rman_get_rid(hsc->hsc_ires), hsc->hsc_ires); fail_sres: - bus_release_resource(dev, SYS_RES_MEMORY, hsc->hsc_srid, hsc->hsc_sres); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(hsc->hsc_sres), hsc->hsc_sres); fail_mtx: mtx_destroy(&sc->sc_lock); return (error); @@ -370,13 +378,17 @@ static int hme_pci_detach(device_t dev) { - struct hme_pci_softc *hsc = device_get_softc(dev); - struct hme_softc *sc = &hsc->hsc_hme; + struct hme_pci_softc *hsc; + struct hme_softc *sc; + hsc = device_get_softc(dev); + sc = &hsc->hsc_hme; bus_teardown_intr(dev, hsc->hsc_ires, hsc->hsc_ih); hme_detach(sc); - bus_release_resource(dev, SYS_RES_IRQ, hsc->hsc_irid, hsc->hsc_ires); - bus_release_resource(dev, SYS_RES_MEMORY, hsc->hsc_srid, hsc->hsc_sres); + bus_release_resource(dev, SYS_RES_IRQ, + rman_get_rid(hsc->hsc_ires), hsc->hsc_ires); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(hsc->hsc_sres), hsc->hsc_sres); mtx_destroy(&sc->sc_lock); return (0); } @@ -384,19 +396,19 @@ static int hme_pci_suspend(device_t dev) { - struct hme_pci_softc *hsc = device_get_softc(dev); - struct hme_softc *sc = &hsc->hsc_hme; + struct hme_pci_softc *hsc; - hme_suspend(sc); + hsc = device_get_softc(dev); + hme_suspend(&hsc->hsc_hme); return (0); } static int hme_pci_resume(device_t dev) { - struct hme_pci_softc *hsc = device_get_softc(dev); - struct hme_softc *sc = &hsc->hsc_hme; + struct hme_pci_softc *hsc; - hme_resume(sc); + hsc = device_get_softc(dev); + hme_resume(&hsc->hsc_hme); return (0); } ==== //depot/projects/dtrace/src/sys/dev/hme/if_hme_sbus.c#6 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme_sbus.c,v 1.19 2008/04/24 23:12:03 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme_sbus.c,v 1.20 2008/04/26 14:17:21 marius Exp $"); /* * SBus front-end device driver for the HME ethernet device. @@ -78,17 +78,11 @@ struct hme_sbus_softc { struct hme_softc hsc_hme; /* HME device */ struct resource *hsc_seb_res; - int hsc_seb_rid; struct resource *hsc_etx_res; - int hsc_etx_rid; struct resource *hsc_erx_res; - int hsc_erx_rid; struct resource *hsc_mac_res; - int hsc_mac_rid; struct resource *hsc_mif_res; - int hsc_mif_rid; struct resource *hsc_ires; - int hsc_irid; void *hsc_ih; }; @@ -127,6 +121,7 @@ }; DRIVER_MODULE(hme, sbus, hme_sbus_driver, hme_devclass, 0, 0); +MODULE_DEPEND(hme, sbus, 1, 1, 1); MODULE_DEPEND(hme, ether, 1, 1, 1); static int @@ -146,12 +141,14 @@ static int hme_sbus_attach(device_t dev) { - struct hme_sbus_softc *hsc = device_get_softc(dev); - struct hme_softc *sc = &hsc->hsc_hme; - u_int32_t burst; + struct hme_sbus_softc *hsc; + struct hme_softc *sc; u_long start, count; - int error = 0; + uint32_t burst; + int i, error = 0; + hsc = device_get_softc(dev); + sc = &hsc->hsc_hme; mtx_init(&sc->sc_lock, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); /* @@ -164,9 +161,9 @@ * bank 4: HME MIF registers * */ - hsc->hsc_seb_rid = 0; + i = 0; hsc->hsc_seb_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &hsc->hsc_seb_rid, RF_ACTIVE); + &i, RF_ACTIVE); if (hsc->hsc_seb_res == NULL) { device_printf(dev, "cannot map SEB registers\n"); error = ENXIO; @@ -175,9 +172,9 @@ sc->sc_sebt = rman_get_bustag(hsc->hsc_seb_res); sc->sc_sebh = rman_get_bushandle(hsc->hsc_seb_res); - hsc->hsc_etx_rid = 1; + i = 1; hsc->hsc_etx_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &hsc->hsc_etx_rid, RF_ACTIVE); + &i, RF_ACTIVE); if (hsc->hsc_etx_res == NULL) { device_printf(dev, "cannot map ETX registers\n"); error = ENXIO; @@ -186,9 +183,9 @@ sc->sc_etxt = rman_get_bustag(hsc->hsc_etx_res); sc->sc_etxh = rman_get_bushandle(hsc->hsc_etx_res); - hsc->hsc_erx_rid = 2; + i = 2; hsc->hsc_erx_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &hsc->hsc_erx_rid, RF_ACTIVE); + &i, RF_ACTIVE); if (hsc->hsc_erx_res == NULL) { device_printf(dev, "cannot map ERX registers\n"); error = ENXIO; @@ -197,9 +194,9 @@ sc->sc_erxt = rman_get_bustag(hsc->hsc_erx_res); sc->sc_erxh = rman_get_bushandle(hsc->hsc_erx_res); - hsc->hsc_mac_rid = 3; + i = 3; hsc->hsc_mac_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &hsc->hsc_mac_rid, RF_ACTIVE); + &i, RF_ACTIVE); if (hsc->hsc_mac_res == NULL) { device_printf(dev, "cannot map MAC registers\n"); error = ENXIO; @@ -212,11 +209,11 @@ * At least on some HMEs, the MIF registers seem to be inside the MAC * range, so try to kludge around it. */ - hsc->hsc_mif_rid = 4; + i = 4; hsc->hsc_mif_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &hsc->hsc_mif_rid, RF_ACTIVE); + &i, RF_ACTIVE); if (hsc->hsc_mif_res == NULL) { - if (bus_get_resource(dev, SYS_RES_MEMORY, hsc->hsc_mif_rid, + if (bus_get_resource(dev, SYS_RES_MEMORY, i, &start, &count) != 0) { device_printf(dev, "cannot get MIF registers\n"); error = ENXIO; @@ -238,9 +235,9 @@ sc->sc_mifh = rman_get_bushandle(hsc->hsc_mif_res); } - hsc->hsc_irid = 0; - hsc->hsc_ires = bus_alloc_resource_any(dev, SYS_RES_IRQ, - &hsc->hsc_irid, RF_SHAREABLE | RF_ACTIVE); + i = 0; + hsc->hsc_ires = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &i, RF_SHAREABLE | RF_ACTIVE); if (hsc->hsc_ires == NULL) { device_printf(dev, "could not allocate interrupt\n"); error = ENXIO; @@ -277,24 +274,25 @@ return (0); fail_ires: - bus_release_resource(dev, SYS_RES_IRQ, hsc->hsc_irid, hsc->hsc_ires); + bus_release_resource(dev, SYS_RES_IRQ, + rman_get_rid(hsc->hsc_ires), hsc->hsc_ires); fail_mif_res: if (hsc->hsc_mif_res != NULL) { - bus_release_resource(dev, SYS_RES_MEMORY, hsc->hsc_mif_rid, - hsc->hsc_mif_res); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(hsc->hsc_mif_res), hsc->hsc_mif_res); } fail_mac_res: - bus_release_resource(dev, SYS_RES_MEMORY, hsc->hsc_mac_rid, - hsc->hsc_mac_res); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(hsc->hsc_mac_res), hsc->hsc_mac_res); fail_erx_res: - bus_release_resource(dev, SYS_RES_MEMORY, hsc->hsc_erx_rid, - hsc->hsc_erx_res); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(hsc->hsc_erx_res), hsc->hsc_erx_res); fail_etx_res: - bus_release_resource(dev, SYS_RES_MEMORY, hsc->hsc_etx_rid, - hsc->hsc_etx_res); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(hsc->hsc_etx_res), hsc->hsc_etx_res); fail_seb_res: - bus_release_resource(dev, SYS_RES_MEMORY, hsc->hsc_seb_rid, - hsc->hsc_seb_res); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(hsc->hsc_seb_res), hsc->hsc_seb_res); fail_mtx_res: mtx_destroy(&sc->sc_lock); return (error); @@ -303,24 +301,27 @@ static int hme_sbus_detach(device_t dev) { - struct hme_sbus_softc *hsc = device_get_softc(dev); - struct hme_softc *sc = &hsc->hsc_hme; + struct hme_sbus_softc *hsc; + struct hme_softc *sc; + hsc = device_get_softc(dev); + sc = &hsc->hsc_hme; bus_teardown_intr(dev, hsc->hsc_ires, hsc->hsc_ih); hme_detach(sc); - bus_release_resource(dev, SYS_RES_IRQ, hsc->hsc_irid, hsc->hsc_ires); + bus_release_resource(dev, SYS_RES_IRQ, + rman_get_rid(hsc->hsc_ires), hsc->hsc_ires); if (hsc->hsc_mif_res != NULL) { - bus_release_resource(dev, SYS_RES_MEMORY, hsc->hsc_mif_rid, - hsc->hsc_mif_res); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(hsc->hsc_mif_res), hsc->hsc_mif_res); } - bus_release_resource(dev, SYS_RES_MEMORY, hsc->hsc_mac_rid, - hsc->hsc_mac_res); - bus_release_resource(dev, SYS_RES_MEMORY, hsc->hsc_erx_rid, - hsc->hsc_erx_res); - bus_release_resource(dev, SYS_RES_MEMORY, hsc->hsc_etx_rid, - hsc->hsc_etx_res); - bus_release_resource(dev, SYS_RES_MEMORY, hsc->hsc_seb_rid, - hsc->hsc_seb_res); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(hsc->hsc_mac_res), hsc->hsc_mac_res); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(hsc->hsc_erx_res), hsc->hsc_erx_res); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(hsc->hsc_etx_res), hsc->hsc_etx_res); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(hsc->hsc_seb_res), hsc->hsc_seb_res); mtx_destroy(&sc->sc_lock); return (0); } @@ -328,19 +329,19 @@ static int hme_sbus_suspend(device_t dev) { - struct hme_sbus_softc *hsc = device_get_softc(dev); - struct hme_softc *sc = &hsc->hsc_hme; + struct hme_sbus_softc *hsc; - hme_suspend(sc); + hsc = device_get_softc(dev); + hme_suspend(&hsc->hsc_hme); return (0); } static int hme_sbus_resume(device_t dev) { - struct hme_sbus_softc *hsc = device_get_softc(dev); - struct hme_softc *sc = &hsc->hsc_hme; + struct hme_sbus_softc *hsc; - hme_resume(sc); + hsc = device_get_softc(dev); + hme_resume(&hsc->hsc_hme); return (0); } ==== //depot/projects/dtrace/src/sys/dev/mii/ciphy.c#8 (text+ko) ==== @@ -31,10 +31,10 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mii/ciphy.c,v 1.10 2008/03/03 18:44:32 raj Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mii/ciphy.c,v 1.11 2008/04/26 18:07:24 raj Exp $"); >>> TRUNCATED FOR MAIL (1000 lines) <<<