Date: Thu, 23 Feb 2006 17:54:28 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 92276 for review Message-ID: <200602231754.k1NHsSvU011372@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=92276 Change 92276 by imp@imp_harmony on 2006/02/23 17:53:53 IFC @92274 Affected files ... .. //depot/projects/arm/src/sys/alpha/alpha/machdep.c#5 integrate .. //depot/projects/arm/src/sys/alpha/alpha/trap.c#5 integrate .. //depot/projects/arm/src/sys/arm/arm/machdep.c#6 integrate .. //depot/projects/arm/src/sys/arm/arm/undefined.c#6 integrate .. //depot/projects/arm/src/sys/conf/kmod.mk#7 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi_smbat.c#4 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi_throttle.c#5 integrate .. //depot/projects/arm/src/sys/dev/ar/if_ar.c#3 integrate .. //depot/projects/arm/src/sys/dev/ed/if_ed_cbus.c#4 integrate .. //depot/projects/arm/src/sys/dev/em/if_em.c#16 integrate .. //depot/projects/arm/src/sys/dev/fdc/fdc_acpi.c#3 integrate .. //depot/projects/arm/src/sys/dev/iwi/if_iwi.c#4 integrate .. //depot/projects/arm/src/sys/dev/le/am7990.c#2 integrate .. //depot/projects/arm/src/sys/dev/le/am79900.c#2 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_cam.c#4 integrate .. //depot/projects/arm/src/sys/dev/mse/mse.c#3 integrate .. //depot/projects/arm/src/sys/dev/myri10ge/eth_z8e.dat.gz.uu#1 branch .. //depot/projects/arm/src/sys/dev/myri10ge/ethp_z8e.dat.gz.uu#1 branch .. //depot/projects/arm/src/sys/dev/myri10ge/if_myri10ge.c#1 branch .. //depot/projects/arm/src/sys/dev/myri10ge/if_myri10ge_var.h#1 branch .. //depot/projects/arm/src/sys/dev/myri10ge/mcp_gen_header.h#1 branch .. //depot/projects/arm/src/sys/dev/myri10ge/myri10ge_mcp.h#1 branch .. //depot/projects/arm/src/sys/dev/pcf/envctrl.c#3 integrate .. //depot/projects/arm/src/sys/dev/pcf/pcf_ebus.c#3 integrate .. //depot/projects/arm/src/sys/dev/pcf/pcf_isa.c#3 integrate .. //depot/projects/arm/src/sys/dev/ppbus/if_plip.c#5 integrate .. //depot/projects/arm/src/sys/dev/ppbus/lpt.c#4 integrate .. //depot/projects/arm/src/sys/dev/ppbus/ppi.c#3 integrate .. //depot/projects/arm/src/sys/dev/ppc/ppc.c#5 integrate .. //depot/projects/arm/src/sys/dev/puc/puc.c#6 integrate .. //depot/projects/arm/src/sys/dev/ral/if_ral.c#5 integrate .. //depot/projects/arm/src/sys/dev/re/if_re.c#8 integrate .. //depot/projects/arm/src/sys/dev/sio/sio.c#4 integrate .. //depot/projects/arm/src/sys/dev/sound/pci/atiixp.c#4 integrate .. //depot/projects/arm/src/sys/dev/sound/pci/atiixp.h#2 integrate .. //depot/projects/arm/src/sys/dev/sr/if_sr.c#3 integrate .. //depot/projects/arm/src/sys/dev/uart/uart_core.c#5 integrate .. //depot/projects/arm/src/sys/dev/usb/if_ural.c#7 integrate .. //depot/projects/arm/src/sys/dev/usb/usb_quirks.c#7 integrate .. //depot/projects/arm/src/sys/dev/usb/usb_quirks.h#5 integrate .. //depot/projects/arm/src/sys/dev/usb/usb_subr.c#6 integrate .. //depot/projects/arm/src/sys/dev/usb/usbdevs#12 integrate .. //depot/projects/arm/src/sys/fs/deadfs/dead_vnops.c#3 integrate .. //depot/projects/arm/src/sys/fs/devfs/devfs_devs.c#4 integrate .. //depot/projects/arm/src/sys/fs/nullfs/null_subr.c#4 integrate .. //depot/projects/arm/src/sys/fs/nullfs/null_vnops.c#4 integrate .. //depot/projects/arm/src/sys/fs/procfs/procfs_ctl.c#3 integrate .. //depot/projects/arm/src/sys/fs/pseudofs/pseudofs_vnops.c#4 integrate .. //depot/projects/arm/src/sys/geom/geom_slice.c#3 integrate .. //depot/projects/arm/src/sys/geom/geom_slice.h#2 integrate .. //depot/projects/arm/src/sys/geom/label/g_label.c#5 integrate .. //depot/projects/arm/src/sys/geom/label/g_label_ufs.c#5 integrate .. //depot/projects/arm/src/sys/geom/raid3/g_raid3.c#10 integrate .. //depot/projects/arm/src/sys/i386/include/mptable.h#2 integrate .. //depot/projects/arm/src/sys/i386/linux/linux_ptrace.c#3 integrate .. //depot/projects/arm/src/sys/ia64/ia64/machdep.c#7 integrate .. //depot/projects/arm/src/sys/kern/kern_condvar.c#4 integrate .. //depot/projects/arm/src/sys/kern/kern_exit.c#12 integrate .. //depot/projects/arm/src/sys/kern/kern_kse.c#6 integrate .. //depot/projects/arm/src/sys/kern/kern_kthread.c#3 integrate .. //depot/projects/arm/src/sys/kern/kern_resource.c#6 integrate .. //depot/projects/arm/src/sys/kern/kern_sig.c#9 integrate .. //depot/projects/arm/src/sys/kern/kern_synch.c#8 integrate .. //depot/projects/arm/src/sys/kern/subr_sleepqueue.c#7 integrate .. //depot/projects/arm/src/sys/kern/sys_process.c#6 integrate .. //depot/projects/arm/src/sys/kern/uipc_domain.c#2 integrate .. //depot/projects/arm/src/sys/kern/uipc_mbuf.c#10 integrate .. //depot/projects/arm/src/sys/kern/uipc_mqueue.c#4 integrate .. //depot/projects/arm/src/sys/kern/vfs_aio.c#4 integrate .. //depot/projects/arm/src/sys/kern/vfs_mount.c#11 integrate .. //depot/projects/arm/src/sys/kern/vfs_subr.c#11 integrate .. //depot/projects/arm/src/sys/kern/vfs_syscalls.c#10 integrate .. //depot/projects/arm/src/sys/modules/Makefile#13 integrate .. //depot/projects/arm/src/sys/modules/coda5/Makefile#3 integrate .. //depot/projects/arm/src/sys/modules/dummynet/Makefile#3 integrate .. //depot/projects/arm/src/sys/modules/firewire/firewire/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/firewire/fwe/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/firewire/sbp/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/firewire/sbp_targ/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/myri10ge/Makefile#1 branch .. //depot/projects/arm/src/sys/modules/myri10ge/myri10ge/Makefile#1 branch .. //depot/projects/arm/src/sys/modules/myri10ge/myri10ge_eth_z8e/Makefile#1 branch .. //depot/projects/arm/src/sys/modules/myri10ge/myri10ge_ethp_z8e/Makefile#1 branch .. //depot/projects/arm/src/sys/modules/netgraph/atm/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/netgraph/bluetooth/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/netgraph/bluetooth/bluetooth/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/netgraph/bluetooth/bt3c/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/netgraph/bluetooth/h4/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/netgraph/bluetooth/ubt/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/nfs4client/Makefile#3 integrate .. //depot/projects/arm/src/sys/modules/nfsclient/Makefile#3 integrate .. //depot/projects/arm/src/sys/modules/twa/Makefile#3 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_ioctl.c#7 integrate .. //depot/projects/arm/src/sys/netgraph/ng_ksocket.c#4 integrate .. //depot/projects/arm/src/sys/netinet/ip_dummynet.c#7 integrate .. //depot/projects/arm/src/sys/netinet/tcp.h#3 integrate .. //depot/projects/arm/src/sys/netinet/tcp_input.c#6 integrate .. //depot/projects/arm/src/sys/netinet/tcp_sack.c#6 integrate .. //depot/projects/arm/src/sys/pc98/cbus/fdc.c#3 integrate .. //depot/projects/arm/src/sys/pc98/cbus/pckbd.c#2 integrate .. //depot/projects/arm/src/sys/pc98/cbus/ppc.c#3 integrate .. //depot/projects/arm/src/sys/pc98/cbus/sio.c#3 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/db_trace.c#3 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/exception.S#5 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/trap.c#4 integrate .. //depot/projects/arm/src/sys/sys/proc.h#10 integrate .. //depot/projects/arm/src/sys/ufs/ufs/ufs_quota.c#7 integrate .. //depot/projects/arm/src/sys/vm/vm_object.c#7 integrate Differences ... ==== //depot/projects/arm/src/sys/alpha/alpha/machdep.c#5 (text+ko) ==== @@ -88,7 +88,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.237 2006/02/14 14:50:10 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.238 2006/02/22 18:57:48 jhb Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -1756,6 +1756,8 @@ { struct iovec iov; struct uio uio; + + PROC_LOCK_ASSERT(td->td_proc, MA_NOTOWNED); iov.iov_base = (caddr_t) v; iov.iov_len = sizeof(u_int32_t); uio.uio_iov = &iov; @@ -1773,6 +1775,8 @@ { struct iovec iov; struct uio uio; + + PROC_LOCK_ASSERT(td->td_proc, MA_NOTOWNED); iov.iov_base = (caddr_t) &v; iov.iov_len = sizeof(u_int32_t); uio.uio_iov = &iov; @@ -1836,6 +1840,8 @@ static int ptrace_clear_bpt(struct thread *td, struct mdbpt *bpt) { + + PROC_LOCK_ASSERT(td->td_proc, MA_NOTOWNED); return ptrace_write_int(td, bpt->addr, bpt->contents); } @@ -1844,6 +1850,8 @@ { int error; u_int32_t bpins = 0x00000080; + + PROC_LOCK_ASSERT(td->td_proc, MA_NOTOWNED); error = ptrace_read_int(td, bpt->addr, &bpt->contents); if (error) return error; @@ -1853,12 +1861,20 @@ int ptrace_clear_single_step(struct thread *td) { + struct proc *p; + + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); if (td->td_md.md_flags & MDTD_STEP2) { + PROC_UNLOCK(p); ptrace_clear_bpt(td, &td->td_md.md_sstep[1]); ptrace_clear_bpt(td, &td->td_md.md_sstep[0]); + PROC_LOCK(p); td->td_md.md_flags &= ~MDTD_STEP2; } else if (td->td_md.md_flags & MDTD_STEP1) { + PROC_UNLOCK(p); ptrace_clear_bpt(td, &td->td_md.md_sstep[0]); + PROC_LOCK(p); td->td_md.md_flags &= ~MDTD_STEP1; } return 0; @@ -1867,6 +1883,7 @@ int ptrace_single_step(struct thread *td) { + struct proc *p; int error; vm_offset_t pc = td->td_frame->tf_regs[FRAME_PC]; alpha_instruction ins; @@ -1876,9 +1893,11 @@ if (td->td_md.md_flags & (MDTD_STEP1|MDTD_STEP2)) panic("ptrace_single_step: step breakpoints not removed"); + p = td->td_proc; + PROC_UNLOCK(p); error = ptrace_read_int(td, pc, &ins.bits); if (error) - return (error); + goto out; switch (ins.branch_format.opcode) { @@ -1918,18 +1937,20 @@ td->td_md.md_sstep[0].addr = addr[0]; error = ptrace_set_bpt(td, &td->td_md.md_sstep[0]); if (error) - return (error); + goto out; if (count == 2) { td->td_md.md_sstep[1].addr = addr[1]; error = ptrace_set_bpt(td, &td->td_md.md_sstep[1]); if (error) { ptrace_clear_bpt(td, &td->td_md.md_sstep[0]); - return (error); + goto out; } td->td_md.md_flags |= MDTD_STEP2; } else td->td_md.md_flags |= MDTD_STEP1; +out: + PROC_LOCK(p); return (error); } ==== //depot/projects/arm/src/sys/alpha/alpha/trap.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.128 2006/02/08 08:09:14 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.129 2006/02/22 18:57:49 jhb Exp $"); /* #include "opt_fix_unaligned_vax_fp.h" */ #include "opt_ddb.h" @@ -403,8 +403,12 @@ case ALPHA_IF_CODE_BUGCHK: if (td->td_md.md_flags & (MDTD_STEP1|MDTD_STEP2)) { mtx_lock(&Giant); + PROC_LOCK(p); + _PHOLD(p); ptrace_clear_single_step(td); td->td_frame->tf_regs[FRAME_PC] -= 4; + _PRELE(p); + PROC_UNLOCK(p); mtx_unlock(&Giant); } ucode = a0; /* trap type */ ==== //depot/projects/arm/src/sys/arm/arm/machdep.c#6 (text+ko) ==== @@ -44,7 +44,7 @@ #include "opt_compat.h" #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/machdep.c,v 1.20 2005/11/24 08:16:17 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/machdep.c,v 1.21 2006/02/22 18:57:49 jhb Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -327,6 +327,8 @@ { struct iovec iov; struct uio uio; + + PROC_LOCK_ASSERT(td->td_proc, MA_NOTOWNED); iov.iov_base = (caddr_t) v; iov.iov_len = sizeof(u_int32_t); uio.uio_iov = &iov; @@ -344,6 +346,8 @@ { struct iovec iov; struct uio uio; + + PROC_LOCK_ASSERT(td->td_proc, MA_NOTOWNED); iov.iov_base = (caddr_t) &v; iov.iov_len = sizeof(u_int32_t); uio.uio_iov = &iov; @@ -359,28 +363,38 @@ int ptrace_single_step(struct thread *td) { + struct proc *p; int error; KASSERT(td->td_md.md_ptrace_instr == 0, ("Didn't clear single step")); + p = td->td_proc; + PROC_UNLOCK(p); error = ptrace_read_int(td, td->td_frame->tf_pc + 4, &td->td_md.md_ptrace_instr); if (error) - return (error); + goto out; error = ptrace_write_int(td, td->td_frame->tf_pc + 4, PTRACE_BREAKPOINT); if (error) td->td_md.md_ptrace_instr = 0; td->td_md.md_ptrace_addr = td->td_frame->tf_pc + 4; +out: + PROC_LOCK(p); return (error); } int ptrace_clear_single_step(struct thread *td) { + struct proc *p; + if (td->td_md.md_ptrace_instr) { + p = td->td_proc; + PROC_UNLOCK(p); ptrace_write_int(td, td->td_md.md_ptrace_addr, td->td_md.md_ptrace_instr); + PROC_LOCK(p); td->td_md.md_ptrace_instr = 0; } return (0); ==== //depot/projects/arm/src/sys/arm/arm/undefined.c#6 (text+ko) ==== @@ -48,7 +48,7 @@ #include "opt_ddb.h" #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/undefined.c,v 1.10 2006/02/03 06:27:51 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/undefined.c,v 1.11 2006/02/22 18:57:49 jhb Exp $"); #include <sys/param.h> #include <sys/malloc.h> @@ -261,7 +261,11 @@ break; if (fault_code & FAULT_USER && fault_instruction == PTRACE_BREAKPOINT) { + PROC_LOCK(td->td_proc); + _PHOLD(td->td_proc); ptrace_clear_single_step(td); + _PRELE(td->td_proc); + PROC_UNLOCK(td->td_proc); return; } ==== //depot/projects/arm/src/sys/conf/kmod.mk#7 (text+ko) ==== @@ -1,5 +1,5 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $FreeBSD: src/sys/conf/kmod.mk,v 1.203 2006/02/17 04:59:23 obrien Exp $ +# $FreeBSD: src/sys/conf/kmod.mk,v 1.205 2006/02/20 01:08:33 mlaier Exp $ # # The include file <bsd.kmod.mk> handles building and installing loadable # kernel modules. @@ -137,13 +137,15 @@ .for _firmw in ${FIRMWS} ${_firmw:C/\:.*$/.fwo/}: ${_firmw:C/\:.*$//} @${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}} -.if !exists(${.CURDIR}/${_firmw:C/\:.*$//}) - ln -s ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${_firmw:C/\:.*$//} - ${LD} -b binary ${LDFLAGS} -r -d -o ${.TARGET} ${_firmw:C/\:.*$//} - rm -f ${_firmw:C/\:.*$//} -.else - ${LD} -b binary ${LDFLAGS} -r -d -o ${.TARGET} ${_firmw:C/\:.*$//} -.endif + @if [ -e ${_firmw:C/\:.*$//} ]; then \ + ${LD} -b binary ${LDFLAGS} -r -d -o ${.TARGET} \ + ${_firmw:C/\:.*$//}; \ + else \ + ln -s ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${_firmw:C/\:.*$//}; \ + ${LD} -b binary ${LDFLAGS} -r -d -o ${.TARGET} \ + ${_firmw:C/\:.*$//}; \ + rm ${_firmw:C/\:.*$//}; \ + fi OBJS+= ${_firmw:C/\:.*$/.fwo/} .endfor ==== //depot/projects/arm/src/sys/dev/acpica/acpi_smbat.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_smbat.c,v 1.4 2006/01/12 21:56:37 bruno Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_smbat.c,v 1.5 2006/02/21 03:16:58 njl Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -134,9 +134,7 @@ static int acpi_smbat_shutdown(device_t dev) { - struct acpi_smbat_softc *sc; - sc = device_get_softc(dev); acpi_battery_remove(dev); return (0); } ==== //depot/projects/arm/src/sys/dev/acpica/acpi_throttle.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_throttle.c,v 1.8 2005/09/11 18:39:01 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_throttle.c,v 1.9 2006/02/21 03:15:26 njl Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -345,10 +345,8 @@ static int acpi_thr_settings(device_t dev, struct cf_setting *sets, int *count) { - struct acpi_throttle_softc *sc; int i, speed; - sc = device_get_softc(dev); if (sets == NULL || count == NULL) return (EINVAL); if (*count < CPU_MAX_SPEED) ==== //depot/projects/arm/src/sys/dev/ar/if_ar.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ar/if_ar.c,v 1.72 2005/08/09 10:19:42 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ar/if_ar.c,v 1.73 2006/02/22 18:16:24 jhb Exp $"); /* * Programming assumptions and other issues. @@ -258,7 +258,7 @@ arc_init(hc); - if(BUS_SETUP_INTR(device_get_parent(device), device, hc->res_irq, + if(bus_setup_intr(device, hc->res_irq, INTR_TYPE_NET, arintr, hc, &hc->intr_cookie) != 0) return (1); @@ -285,7 +285,7 @@ #ifndef NETGRAPH ifp = SC2IFP(sc) = if_alloc(IFT_PPP); if (ifp == NULL) { - if (BUS_TEARDOWN_INTR(device_get_parent(device), device, + if (bus_teardown_intr(device, hc->res_irq, hc->intr_cookie) != 0) { printf("intr teardown failed.. continuing\n"); } @@ -351,11 +351,10 @@ int ar_detach(device_t device) { - device_t parent = device_get_parent(device); struct ar_hardc *hc = device_get_softc(device); if (hc->intr_cookie != NULL) { - if (BUS_TEARDOWN_INTR(parent, device, + if (bus_teardown_intr(device, hc->res_irq, hc->intr_cookie) != 0) { printf("intr teardown failed.. continuing\n"); } ==== //depot/projects/arm/src/sys/dev/ed/if_ed_cbus.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ed/if_ed_cbus.c,v 1.25 2006/01/27 19:10:13 imp Exp $ + * $FreeBSD: src/sys/dev/ed/if_ed_cbus.c,v 1.26 2006/02/21 12:01:39 nyan Exp $ */ #include <sys/param.h> @@ -541,6 +541,8 @@ sc->port_rid = rid; sc->port_res = res; sc->port_used = n; + sc->port_bst = rman_get_bustag(res); + sc->port_bsh = rman_get_bushandle(res); /* Re-map i/o table if needed */ switch (sc->type) { ==== //depot/projects/arm/src/sys/dev/em/if_em.c#16 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.113 2006/02/15 14:27:38 glebius Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.114 2006/02/22 14:11:16 glebius Exp $*/ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" @@ -954,7 +954,13 @@ /* Get the latest mac address, User can use a LAA */ bcopy(IF_LLADDR(sc->ifp), sc->hw.mac_addr, ETHER_ADDR_LEN); - em_init_rx_addrs(&sc->hw); + + /* Initialize the hardware */ + if (em_hardware_init(sc)) { + device_printf(dev, "Unable to initialize the hardware\n"); + return; + } + em_update_link_status(sc); if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) em_enable_vlans(sc); ==== //depot/projects/arm/src/sys/dev/fdc/fdc_acpi.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc_acpi.c,v 1.11 2005/09/11 18:39:02 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc_acpi.c,v 1.12 2006/02/21 03:19:24 njl Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -98,7 +98,6 @@ device_t bus; int error, fde_count, i; ACPI_OBJECT *obj, *pkg; - ACPI_HANDLE h; uint32_t fde[ACPI_FDC_MAXDEVS]; /* Get our softc and use the same accessor as ISA. */ @@ -107,7 +106,6 @@ /* Initialize variables and get a temporary buffer for _FDE. */ error = ENXIO; - h = acpi_get_handle(dev); buf.Length = ACPI_FDC_BUFLEN; buf.Pointer = malloc(buf.Length, M_TEMP, M_NOWAIT | M_ZERO); if (buf.Pointer == NULL) ==== //depot/projects/arm/src/sys/dev/iwi/if_iwi.c#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.27 2006/01/29 12:03:03 damien Exp $ */ +/* $FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.28 2006/02/20 20:49:56 sam Exp $ */ /*- * Copyright (c) 2004-2006 @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.27 2006/01/29 12:03:03 damien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.28 2006/02/20 20:49:56 sam Exp $"); /*- * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver @@ -2380,7 +2380,7 @@ assoc.auth = ic->ic_crypto.cs_def_txkey << 4 | IWI_AUTH_SHARED; if ((ic->ic_flags & IEEE80211_F_WME) && ni->ni_wme_ie != NULL) assoc.policy |= htole16(IWI_POLICY_WME); - if (ic->ic_opt_ie != NULL) + if (ic->ic_flags & IEEE80211_F_WPA) assoc.policy |= htole16(IWI_POLICY_WPA); memcpy(assoc.tstamp, ni->ni_tstamp.data, 8); ==== //depot/projects/arm/src/sys/dev/le/am7990.c#2 (text+ko) ==== @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/le/am7990.c,v 1.1 2006/01/31 14:48:58 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/le/am7990.c,v 1.2 2006/02/21 20:20:43 marius Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -357,10 +357,7 @@ sc->sc_first_td = bix; - am7990_start_locked(sc); - - if (sc->sc_no_td == 0) - ifp->if_timer = 0; + ifp->if_timer = sc->sc_no_td > 0 ? 5 : 0; } /* @@ -392,6 +389,18 @@ return; } + /* + * Clear interrupt source flags and turn off interrupts. If we + * don't clear these flags before processing their sources we + * could completely miss some interrupt events as the the NIC + * can change these flags while we're in this handler. We turn + * of interrupts while processing them so we don't get another + * one while we still process the previous one in ifp->if_input() + * with the driver lock dropped. + */ + (*sc->sc_wrcsr)(sc, LE_CSR0, isr & ~(LE_C0_INEA | LE_C0_TDMD | + LE_C0_STOP | LE_C0_STRT | LE_C0_INIT)); + if (isr & LE_C0_ERR) { if (isr & LE_C0_BABL) { #ifdef LEDEBUG @@ -446,16 +455,11 @@ if (isr & LE_C0_TINT) am7990_tint(sc); - /* - * Note that since we drop the driver lock in lance_read() we might - * get another interrupt while in ifp->if_input(). Consequently we - * don't want to acknowledge a receive interrupt before it's fully - * serviced. We could acknowledge interrupts of other types earlier - * but that won't buy us much as as the driver lock is held until - * the end of this ISR. - */ - (*sc->sc_wrcsr)(sc, LE_CSR0, isr & (LE_C0_INEA | LE_C0_BABL | - LE_C0_MISS | LE_C0_MERR | LE_C0_RINT | LE_C0_TINT | LE_C0_IDON)); + /* Enable interrupts again. */ + (*sc->sc_wrcsr)(sc, LE_CSR0, LE_C0_INEA); + + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + am7990_start_locked(sc); LE_UNLOCK(sc); } @@ -471,7 +475,7 @@ struct ifnet *ifp = sc->sc_ifp; struct letmd tmd; struct mbuf *m; - int bix, len, rp; + int bix, enq, len, rp; LE_LOCK_ASSERT(sc, MA_OWNED); @@ -480,6 +484,7 @@ return; bix = sc->sc_last_td; + enq = 0; for (; sc->sc_no_td < sc->sc_ntbuf && !IFQ_DRV_IS_EMPTY(&ifp->if_snd);) { @@ -513,8 +518,6 @@ if_printf(ifp, "packet length %d\n", len); #endif - ifp->if_timer = 5; - /* * Init transmit registers, and set transmit start flag. */ @@ -530,6 +533,7 @@ #endif (*sc->sc_wrcsr)(sc, LE_CSR0, LE_C0_INEA | LE_C0_TDMD); + enq++; if (++bix == sc->sc_ntbuf) bix = 0; @@ -541,6 +545,9 @@ } sc->sc_last_td = bix; + + if (enq > 0) + ifp->if_timer = 5; } #ifdef LEDEBUG ==== //depot/projects/arm/src/sys/dev/le/am79900.c#2 (text+ko) ==== @@ -110,7 +110,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/le/am79900.c,v 1.1 2006/01/31 14:48:58 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/le/am79900.c,v 1.2 2006/02/21 20:20:43 marius Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -399,10 +399,7 @@ sc->sc_first_td = bix; - am79900_start_locked(sc); - - if (sc->sc_no_td == 0) - ifp->if_timer = 0; + ifp->if_timer = sc->sc_no_td > 0 ? 5 : 0; } /* @@ -434,6 +431,18 @@ return; } + /* + * Clear interrupt source flags and turn off interrupts. If we + * don't clear these flags before processing their sources we + * could completely miss some interrupt events as the the NIC + * can change these flags while we're in this handler. We turn + * of interrupts while processing them so we don't get another + * one while we still process the previous one in ifp->if_input() + * with the driver lock dropped. + */ + (*sc->sc_wrcsr)(sc, LE_CSR0, isr & ~(LE_C0_INEA | LE_C0_TDMD | + LE_C0_STOP | LE_C0_STRT | LE_C0_INIT)); + if (isr & LE_C0_ERR) { if (isr & LE_C0_BABL) { #ifdef LEDEBUG @@ -488,16 +497,11 @@ if (isr & LE_C0_TINT) am79900_tint(sc); - /* - * Note that since we drop the driver lock in lance_read() we might - * get another interrupt while in ifp->if_input(). Consequently we - * don't want to acknowledge a receive interrupt before it's fully - * serviced. We could acknowledge interrupts of other types earlier - * but that won't buy us much as as the driver lock is held until - * the end of this ISR. - */ - (*sc->sc_wrcsr)(sc, LE_CSR0, isr & (LE_C0_INEA | LE_C0_BABL | - LE_C0_MISS | LE_C0_MERR | LE_C0_RINT | LE_C0_TINT | LE_C0_IDON)); + /* Enable interrupts again. */ + (*sc->sc_wrcsr)(sc, LE_CSR0, LE_C0_INEA); + + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + am79900_start_locked(sc); LE_UNLOCK(sc); } @@ -513,7 +517,7 @@ struct ifnet *ifp = sc->sc_ifp; struct letmd tmd; struct mbuf *m; - int bix, len, rp; + int bix, enq, len, rp; LE_LOCK_ASSERT(sc, MA_OWNED); @@ -522,6 +526,7 @@ return; bix = sc->sc_last_td; + enq = 0; for (; sc->sc_no_td < sc->sc_ntbuf && !IFQ_DRV_IS_EMPTY(&ifp->if_snd);) { @@ -555,8 +560,6 @@ if_printf(ifp, "packet length %d\n", len); #endif - ifp->if_timer = 5; - /* * Init transmit registers, and set transmit start flag. */ @@ -573,6 +576,7 @@ #endif (*sc->sc_wrcsr)(sc, LE_CSR0, LE_C0_INEA | LE_C0_TDMD); + enq++; if (++bix == sc->sc_ntbuf) bix = 0; @@ -584,6 +588,9 @@ } sc->sc_last_td = bix; + + if (enq > 0) + ifp->if_timer = 5; } #ifdef LEDEBUG ==== //depot/projects/arm/src/sys/dev/mpt/mpt_cam.c#4 (text+ko) ==== @@ -60,7 +60,7 @@ * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_cam.c,v 1.4 2006/02/11 01:35:29 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_cam.c,v 1.5 2006/02/22 05:19:50 mjacob Exp $"); #include <dev/mpt/mpt.h> #include <dev/mpt/mpt_cam.h> @@ -375,8 +375,8 @@ bad: if (error != 0) { - /* if (error != EFBIG) */ - mpt_prt(mpt, "bus_dmamap_load returned %d\n", error); + if (error != EFBIG && error != ENOMEM) + mpt_prt(mpt, "mpt_execute_req: err %d\n", error); if (ccb->ccb_h.status == CAM_REQ_INPROG) { xpt_freeze_devq(ccb->ccb_h.path, 1); ccb->ccb_h.status = CAM_DEV_QFRZN; ==== //depot/projects/arm/src/sys/dev/mse/mse.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/mse/mse.c,v 1.72 2005/04/08 05:22:58 imp Exp $ + * $FreeBSD: src/sys/dev/mse/mse.c,v 1.73 2006/02/22 18:16:25 jhb Exp $ */ /* @@ -134,7 +134,7 @@ return ENXIO; } - if (BUS_SETUP_INTR(device_get_parent(dev), dev, sc->sc_intr, + if (bus_setup_intr(dev, sc->sc_intr, INTR_TYPE_TTY, mseintr, sc, &sc->sc_ih)) { bus_release_resource(dev, SYS_RES_IOPORT, rid, sc->sc_port); bus_release_resource(dev, SYS_RES_IRQ, rid, sc->sc_intr); ==== //depot/projects/arm/src/sys/dev/pcf/envctrl.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/pcf/envctrl.c,v 1.5 2005/06/04 20:29:28 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pcf/envctrl.c,v 1.6 2006/02/22 18:16:25 jhb Exp $"); /* * Device specific driver for the SUNW,envctrl device found on some @@ -133,7 +133,7 @@ /* reset the chip */ pcf_rst_card(dev, IIC_FASTEST, PCF_DEFAULT_ADDR, NULL); - rv = BUS_SETUP_INTR(device_get_parent(dev), dev, sc->res_irq, + rv = bus_setup_intr(dev, sc->res_irq, INTR_TYPE_NET /* | INTR_ENTROPY */, pcf_intr, sc, &sc->intr_cookie); if (rv) { @@ -180,8 +180,7 @@ return (rv); if (sc->res_irq != 0) { - BUS_TEARDOWN_INTR(device_get_parent(dev), dev, sc->res_irq, - sc->intr_cookie); + bus_teardown_intr(dev, sc->res_irq, sc->intr_cookie); bus_deactivate_resource(dev, SYS_RES_IRQ, sc->rid_irq, sc->res_irq); bus_release_resource(dev, SYS_RES_IRQ, sc->rid_irq, sc->res_irq); } ==== //depot/projects/arm/src/sys/dev/pcf/pcf_ebus.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/pcf/pcf_ebus.c,v 1.4 2005/06/04 20:29:28 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pcf/pcf_ebus.c,v 1.5 2006/02/22 18:16:25 jhb Exp $"); /* * Device specific driver for the EBus i2c devices found on some sun4u @@ -193,7 +193,7 @@ pcf_rst_card(dev, IIC_FASTEST, own_addr, NULL); if (sc->res_irq) { - rv = BUS_SETUP_INTR(device_get_parent(dev), dev, sc->res_irq, + rv = bus_setup_intr(dev, sc->res_irq, INTR_TYPE_NET /* | INTR_ENTROPY */, pcf_intr, sc, &sc->intr_cookie); if (rv) { @@ -241,7 +241,7 @@ return (rv); if (sc->res_irq != 0) { - BUS_TEARDOWN_INTR(device_get_parent(dev), dev, sc->res_irq, + bus_teardown_intr(dev, sc->res_irq, sc->intr_cookie); bus_deactivate_resource(dev, SYS_RES_IRQ, sc->rid_irq, sc->res_irq); ==== //depot/projects/arm/src/sys/dev/pcf/pcf_isa.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/pcf/pcf_isa.c,v 1.6 2006/02/02 23:57:31 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pcf/pcf_isa.c,v 1.7 2006/02/22 18:16:25 jhb Exp $"); /* * Hardware driver for a Philips PCF8584 I2C bus controller sitting @@ -153,7 +153,7 @@ pcf_rst_card(dev, IIC_FASTEST, PCF_DEFAULT_ADDR, NULL); if (sc->res_irq) { - rv = BUS_SETUP_INTR(device_get_parent(dev), dev, sc->res_irq, + rv = bus_setup_intr(dev, sc->res_irq, INTR_TYPE_NET /* | INTR_ENTROPY */, pcf_intr, sc, &sc->intr_cookie); if (rv) { @@ -201,8 +201,7 @@ return (rv); if (sc->res_irq != 0) { - BUS_TEARDOWN_INTR(device_get_parent(dev), dev, sc->res_irq, - sc->intr_cookie); + bus_teardown_intr(dev, sc->res_irq, sc->intr_cookie); bus_deactivate_resource(dev, SYS_RES_IRQ, sc->rid_irq, sc->res_irq); bus_release_resource(dev, SYS_RES_IRQ, sc->rid_irq, sc->res_irq); } ==== //depot/projects/arm/src/sys/dev/ppbus/if_plip.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ppbus/if_plip.c,v 1.40 2006/02/13 17:53:39 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ppbus/if_plip.c,v 1.41 2006/02/22 18:16:25 jhb Exp $"); /* * Parallel port TCP/IP interfaces added. I looked at the driver from @@ -357,7 +357,7 @@ } /* attach our interrupt handler, later detached when the bus is released */ - if ((error = BUS_SETUP_INTR(ppbus, dev, sc->res_irq, + if ((error = bus_setup_intr(dev, sc->res_irq, INTR_TYPE_NET, lp_intr, dev, &ih))) { ppb_release_bus(ppbus, dev); return (error); ==== //depot/projects/arm/src/sys/dev/ppbus/lpt.c#4 (text+ko) ==== @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ppbus/lpt.c,v 1.37 2005/12/21 10:54:46 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ppbus/lpt.c,v 1.38 2006/02/22 18:16:25 jhb Exp $"); /* * Device Driver for AT parallel printer port @@ -342,7 +342,7 @@ device_t dev; - dev = device_find_child(parent, LPT_NAME, 0); + dev = device_find_child(parent, LPT_NAME, -1); if (!dev) BUS_ADD_CHILD(parent, 0, LPT_NAME, -1); } @@ -744,7 +744,7 @@ /* if interrupts are working, register the handler */ if (sc->sc_irq & LP_USE_IRQ) { /* register our interrupt handler */ - err = BUS_SETUP_INTR(ppbus, lptdev, sc->intr_resource, + err = bus_setup_intr(lptdev, sc->intr_resource, INTR_TYPE_TTY, lpt_intr, lptdev, &sc->intr_cookie); if (err) { ==== //depot/projects/arm/src/sys/dev/ppbus/ppi.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ppbus/ppi.c,v 1.39 2005/12/21 10:54:46 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ppbus/ppi.c,v 1.40 2006/02/22 18:16:25 jhb Exp $"); #include "opt_ppb_1284.h" #include <sys/param.h> @@ -135,7 +135,7 @@ device_t dev; - dev = device_find_child(parent, "ppi", 0); + dev = device_find_child(parent, "ppi", -1); if (!dev) BUS_ADD_CHILD(parent, 0, "ppi", -1); } @@ -276,7 +276,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602231754.k1NHsSvU011372>