Sync with HEAD. yamt-idlelwp
authorrmind <rmind@NetBSD.org>
Mon, 12 Mar 2007 05:55:05 +0000
branchyamt-idlelwp
changeset 286687 aa79580d830a
parent 286686 a8c2bc2d8696
child 286688 83ba03a98ede
Sync with HEAD.
sys/dev/isapnp/atppc_isapnp.c
sys/dev/isapnp/if_le_isapnp.c
sys/dev/isapnp/isic_isapnp_ctx_s0P.c
sys/dev/isapnp/isic_isapnp_drn_ngo.c
sys/dev/isapnp/isic_isapnp_dynalink.c
sys/dev/isapnp/isic_isapnp_elsa_qs1i.c
sys/dev/isapnp/isic_isapnp_siemens_isurf.c
sys/dev/isapnp/isic_isapnp_sws.c
sys/dev/isapnp/isic_isapnp_tel_s0P.c
sys/dev/marvell/gtidma.c
sys/dev/marvell/gtidmavar.h
sys/dev/marvell/gtmpsc.c
sys/dev/marvell/if_gfe.c
sys/dev/marvell/if_gfevar.h
sys/dev/mca/ed_mca.c
sys/dev/mca/esp_mca.c
sys/dev/mca/espvar.h
sys/dev/mii/brgphy.c
sys/dev/mscp/mscp.c
sys/dev/mscp/mscp_disk.c
sys/dev/mscp/mscp_tape.c
sys/dev/mscp/mscpvar.h
sys/dev/mvme/if_ie_mvme.c
sys/dev/mvme/lpt_mvme.c
sys/dev/mvme/mvmebus.c
sys/dev/mvme/mvmebus.h
sys/dev/ofisa/atppc_ofisa.c
sys/dev/ofw/ofcons.c
sys/dev/ofw/ofdisk.c
sys/dev/ofw/ofnet.c
sys/dev/ofw/openfirmio.c
sys/dev/pci/aac_pci.c
sys/dev/pci/agp.c
sys/dev/pci/agp_amd.c
sys/dev/pci/agp_i810.c
sys/dev/pci/agpvar.h
sys/dev/pci/ahcisata.c
sys/dev/pci/amr.c
sys/dev/pci/atppc_puc.c
sys/dev/pci/auacer.c
sys/dev/pci/auich.c
sys/dev/pci/auixp.c
sys/dev/pci/auixpvar.h
sys/dev/pci/autrivar.h
sys/dev/pci/auvia.c
sys/dev/pci/azalia.c
sys/dev/pci/azalia_codec.c
sys/dev/pci/bktr/bktr_core.c
sys/dev/pci/bktr/bktr_core.h
sys/dev/pci/bktr/bktr_mem.c
sys/dev/pci/bktr/bktr_os.c
sys/dev/pci/cac_pci.c
sys/dev/pci/chipsfb.c
sys/dev/pci/cmpci.c
sys/dev/pci/cmpcivar.h
sys/dev/pci/cs428x.h
sys/dev/pci/cz.c
sys/dev/pci/eap.c
sys/dev/pci/emuxki.c
sys/dev/pci/emuxkivar.h
sys/dev/pci/esa.c
sys/dev/pci/esavar.h
sys/dev/pci/esm.c
sys/dev/pci/esmvar.h
sys/dev/pci/eso.c
sys/dev/pci/fms.c
sys/dev/pci/hifn7751.c
sys/dev/pci/if_bce.c
sys/dev/pci/if_bge.c
sys/dev/pci/if_bgereg.h
sys/dev/pci/if_bnx.c
sys/dev/pci/if_de.c
sys/dev/pci/if_devar.h
sys/dev/pci/if_dge.c
sys/dev/pci/if_fpa.c
sys/dev/pci/if_ipw.c
sys/dev/pci/if_iwi.c
sys/dev/pci/if_kse.c
sys/dev/pci/if_le_pci.c
sys/dev/pci/if_lmc.c
sys/dev/pci/if_lmc.h
sys/dev/pci/if_msk.c
sys/dev/pci/if_mskvar.h
sys/dev/pci/if_nfe.c
sys/dev/pci/if_nfereg.h
sys/dev/pci/if_nfevar.h
sys/dev/pci/if_pcn.c
sys/dev/pci/if_re_pci.c
sys/dev/pci/if_sip.c
sys/dev/pci/if_sk.c
sys/dev/pci/if_skvar.h
sys/dev/pci/if_ste.c
sys/dev/pci/if_stge.c
sys/dev/pci/if_ti.c
sys/dev/pci/if_tireg.h
sys/dev/pci/if_tl.c
sys/dev/pci/if_txp.c
sys/dev/pci/if_txpreg.h
sys/dev/pci/if_vge.c
sys/dev/pci/if_vr.c
sys/dev/pci/if_wm.c
sys/dev/pci/if_wpi.c
sys/dev/pci/if_wpivar.h
sys/dev/pci/if_xge.c
sys/dev/pci/ifpci.c
sys/dev/pci/ifpci2.c
sys/dev/pci/isp_pci.c
sys/dev/pci/machfb.c
sys/dev/pci/mly.c
sys/dev/pci/oboe.c
sys/dev/pci/pci_usrreq.c
sys/dev/pci/pcidevs
sys/dev/pci/pcidevs.h
sys/dev/pci/pcidevs_data.h
sys/dev/pci/pciide_common.c
sys/dev/pci/pcivar.h
sys/dev/pci/pcscp.c
sys/dev/pci/piixide.c
sys/dev/pci/piixpm.c
sys/dev/pci/radeonfb.c
sys/dev/pci/sv.c
sys/dev/pci/tga.c
sys/dev/pci/trm.c
sys/dev/pci/twa.c
sys/dev/pci/twavar.h
sys/dev/pci/twe.c
sys/dev/pci/twevar.h
sys/dev/pci/ubsec.c
sys/dev/pci/ubsecvar.h
sys/dev/pci/unichromefb.c
sys/dev/pci/vga_pci.c
sys/dev/pci/voodoofb.c
sys/dev/pci/ydsvar.h
sys/dev/pckbport/pckbd.c
sys/dev/pckbport/pms.c
sys/dev/pcmcia/esp_pcmcia.c
sys/dev/pcmcia/if_cnw.c
sys/dev/pcmcia/if_ray.c
sys/dev/pcmcia/if_xi.c
sys/dev/pcmcia/isic_pcmcia_avm_fritz.c
sys/dev/podulebus/sec.c
sys/dev/ppbus/if_plip.c
sys/dev/ppbus/lpt.c
sys/dev/ppbus/lptvar.h
sys/dev/ppbus/ppbus_base.c
sys/dev/ppbus/ppbus_base.h
sys/dev/ppbus/ppbus_conf.h
sys/dev/ppbus/pps_ppbus.c
sys/dev/qbus/dhu.c
sys/dev/qbus/dl.c
sys/dev/qbus/if_de.c
sys/dev/qbus/if_dmc.c
sys/dev/qbus/if_il.c
sys/dev/qbus/if_qe.c
sys/dev/qbus/if_qt.c
sys/dev/qbus/if_uba.c
sys/dev/qbus/if_uba.h
sys/dev/qbus/qd.c
sys/dev/qbus/qdioctl.h
sys/dev/qbus/rf.c
sys/dev/qbus/rl.c
sys/dev/qbus/rlvar.h
sys/dev/qbus/ts.c
sys/dev/qbus/uba.c
sys/dev/qbus/ubavar.h
sys/dev/raidframe/rf_aselect.c
sys/dev/raidframe/rf_dagfuncs.c
sys/dev/raidframe/rf_dagutils.c
sys/dev/raidframe/rf_decluster.c
sys/dev/raidframe/rf_desc.h
sys/dev/raidframe/rf_diskqueue.c
sys/dev/raidframe/rf_diskqueue.h
sys/dev/raidframe/rf_driver.c
sys/dev/raidframe/rf_driver.h
sys/dev/raidframe/rf_evenodd_dagfuncs.c
sys/dev/raidframe/rf_layout.h
sys/dev/raidframe/rf_map.c
sys/dev/raidframe/rf_map.h
sys/dev/raidframe/rf_netbsdkintf.c
sys/dev/raidframe/rf_paritylog.c
sys/dev/raidframe/rf_paritylog.h
sys/dev/raidframe/rf_paritylogDiskMgr.c
sys/dev/raidframe/rf_paritylogging.c
sys/dev/raidframe/rf_raid.h
sys/dev/raidframe/rf_raid1.c
sys/dev/raidframe/rf_reconbuffer.c
sys/dev/raidframe/rf_reconstruct.h
sys/dev/raidframe/rf_reconutil.c
sys/dev/rasops/rasops.h
sys/dev/rasops/rasops15.c
sys/dev/rasops/rasops24.c
sys/dev/rasops/rasops8.c
sys/dev/rcons/raster.h
sys/dev/rcons/raster_text.c
sys/dev/rcons/rcons_kern.c
sys/dev/sbus/be.c
sys/dev/sbus/bpp.c
sys/dev/sbus/bwtwo_sbus.c
sys/dev/sbus/cgsix_sbus.c
sys/dev/sbus/cgthree_sbus.c
sys/dev/sbus/dbri.c
sys/dev/sbus/dbrireg.h
sys/dev/sbus/dbrivar.h
sys/dev/sbus/esp_sbus.c
sys/dev/sbus/files.sbus
sys/dev/sbus/if_le.c
sys/dev/sbus/if_le_ledma.c
sys/dev/sbus/isp_sbus.c
sys/dev/sbus/lebuffervar.h
sys/dev/sbus/magma.c
sys/dev/sbus/magmareg.h
sys/dev/sbus/p9100.c
sys/dev/sbus/qe.c
sys/dev/sbus/qec.c
sys/dev/sbus/qecvar.h
sys/dev/sbus/spif.c
sys/dev/sbus/tcx.c
sys/dev/sbus/zx.c
sys/dev/scsipi/cd.c
sys/dev/scsipi/ch.c
sys/dev/scsipi/if_se.c
sys/dev/scsipi/scsiconf.c
sys/dev/scsipi/scsipi_ioctl.c
sys/dev/scsipi/scsipiconf.h
sys/dev/scsipi/sd.c
sys/dev/scsipi/ses.c
sys/dev/scsipi/ss.c
sys/dev/scsipi/ss_mustek.c
sys/dev/scsipi/st.c
sys/dev/scsipi/uk.c
sys/dev/spi/spiflash.c
sys/dev/sun/bwtwo.c
sys/dev/sun/cgsix.c
sys/dev/sun/cgthree.c
sys/dev/sun/event.c
sys/dev/sun/event_var.h
sys/dev/sun/fb.c
sys/dev/sun/fbvar.h
sys/dev/sun/kbd.c
sys/dev/sun/kbdsun.c
sys/dev/sun/ms.c
sys/dev/sun/sunms.c
sys/dev/sysmon/sysmon.c
sys/dev/sysmon/sysmon_envsys.c
sys/dev/sysmon/sysmon_power.c
sys/dev/sysmon/sysmon_wdog.c
sys/dev/sysmon/sysmonvar.h
sys/dev/tc/asc_tc.c
sys/dev/tc/asc_tcds.c
sys/dev/tc/ascvar.h
sys/dev/tc/bba.c
sys/dev/tc/cfb.c
sys/dev/tc/if_fta.c
sys/dev/tc/if_le_ioasic.c
sys/dev/tc/mfb.c
sys/dev/tc/px.c
sys/dev/tc/pxg.c
sys/dev/tc/sfb.c
sys/dev/tc/sfbplus.c
sys/dev/tc/stic.c
sys/dev/tc/sticvar.h
sys/dev/tc/tfb.c
sys/dev/tc/xcfb.c
sys/dev/tc/zskbd.c
sys/dev/tc/zsms.c
sys/dev/usb/if_atu.c
sys/dev/usb/if_aue.c
sys/dev/usb/if_axe.c
sys/dev/usb/if_cdce.c
sys/dev/usb/if_cue.c
sys/dev/usb/if_kue.c
sys/dev/usb/if_rum.c
sys/dev/usb/if_rumvar.h
sys/dev/usb/if_udav.c
sys/dev/usb/if_upl.c
sys/dev/usb/if_ural.c
sys/dev/usb/if_uralvar.h
sys/dev/usb/if_url.c
sys/dev/usb/ucom.c
sys/dev/usb/ucomvar.h
sys/dev/usb/ucycom.c
sys/dev/usb/uep.c
sys/dev/usb/uftdi.c
sys/dev/usb/ugen.c
sys/dev/usb/uhid.c
sys/dev/usb/ukbd.c
sys/dev/usb/ukyopon.c
sys/dev/usb/ulpt.c
sys/dev/usb/umass_scsipi.c
sys/dev/usb/umidireg.h
sys/dev/usb/umodem_common.c
sys/dev/usb/umodemvar.h
sys/dev/usb/ums.c
sys/dev/usb/uplcom.c
sys/dev/usb/urio.c
sys/dev/usb/usb.c
sys/dev/usb/usb_mem.c
sys/dev/usb/usb_mem.h
sys/dev/usb/usb_port.h
sys/dev/usb/usbdevs
sys/dev/usb/usbdevs.h
sys/dev/usb/usbdevs_data.h
sys/dev/usb/usbdi_util.c
sys/dev/usb/uscanner.c
sys/dev/usb/ustir.c
sys/dev/usb/utoppy.c
sys/dev/usb/xboxcontroller.c
sys/dev/videomode/edid.c
sys/dev/videomode/ediddevs
sys/dev/videomode/ediddevs.h
sys/dev/videomode/ediddevs_data.h
sys/dev/videomode/modelines
sys/dev/videomode/videomode.c
sys/dev/vme/si.c
sys/dev/vme/xd.c
sys/dev/vme/xio.h
sys/dev/vme/xy.c
sys/dev/wscons/tpcalib.c
sys/dev/wscons/tpcalibvar.h
sys/dev/wscons/wsdisplay.c
sys/dev/wscons/wsdisplay_compat_usl.c
sys/dev/wscons/wsdisplay_vcons.c
sys/dev/wscons/wsdisplay_vconsvar.h
sys/dev/wscons/wsdisplayvar.h
sys/dev/wscons/wskbd.c
sys/dev/wscons/wskbdvar.h
sys/dev/wscons/wsmouse.c
sys/dev/wscons/wsmousevar.h
sys/dev/wscons/wsmux.c
sys/dev/wscons/wsmuxvar.h
sys/dev/wsfont/wsfontdev.c
sys/dev/xmi/xmi.c
sys/dist/acpica/aclocal.h
sys/dist/acpica/acpiosxf.h
sys/dist/acpica/actypes.h
sys/dist/ipf/netinet/fil.c
sys/dist/ipf/netinet/ip_auth.c
sys/dist/ipf/netinet/ip_auth.h
sys/dist/ipf/netinet/ip_compat.h
sys/dist/ipf/netinet/ip_fil.h
sys/dist/ipf/netinet/ip_fil_netbsd.c
sys/dist/ipf/netinet/ip_h323_pxy.c
sys/dist/ipf/netinet/ip_irc_pxy.c
sys/dist/ipf/netinet/ip_log.c
sys/dist/ipf/netinet/ip_lookup.c
sys/dist/ipf/netinet/ip_lookup.h
sys/dist/ipf/netinet/ip_nat.c
sys/dist/ipf/netinet/ip_nat.h
sys/dist/ipf/netinet/ip_proxy.c
sys/dist/ipf/netinet/ip_proxy.h
sys/dist/ipf/netinet/ip_rpcb_pxy.c
sys/dist/ipf/netinet/ip_scan.c
sys/dist/ipf/netinet/ip_scan.h
sys/dist/ipf/netinet/ip_state.c
sys/dist/ipf/netinet/ip_state.h
sys/dist/ipf/netinet/ip_sync.c
sys/dist/ipf/netinet/ip_sync.h
sys/dist/pf/net/if_pflog.c
sys/dist/pf/net/pf.c
sys/dist/pf/net/pf_if.c
sys/dist/pf/net/pf_ioctl.c
sys/dist/pf/net/pf_table.c
sys/dist/pf/net/pfvar.h
sys/fs/Makefile
sys/fs/adosfs/advfsops.c
sys/fs/adosfs/advnops.c
sys/fs/cd9660/cd9660_rrip.c
sys/fs/cd9660/cd9660_vfsops.c
sys/fs/cd9660/cd9660_vnops.c
sys/fs/filecorefs/filecore_vfsops.c
sys/fs/filecorefs/filecore_vnops.c
sys/fs/msdosfs/msdosfs_denode.c
sys/fs/msdosfs/msdosfs_fat.c
sys/fs/msdosfs/msdosfs_lookup.c
sys/fs/msdosfs/msdosfs_vnops.c
sys/fs/msdosfs/msdosfsmount.h
sys/fs/ntfs/ntfs.h
sys/fs/ntfs/ntfs_ihash.c
sys/fs/ntfs/ntfs_inode.h
sys/fs/ntfs/ntfs_subr.c
sys/fs/ntfs/ntfs_subr.h
sys/fs/ntfs/ntfs_vfsops.c
sys/fs/ntfs/ntfs_vnops.c
sys/fs/puffs/puffs_msgif.c
sys/fs/puffs/puffs_subr.c
sys/fs/puffs/puffs_sys.h
sys/fs/smbfs/smbfs_smb.c
sys/fs/smbfs/smbfs_subr.h
sys/fs/smbfs/smbfs_vnops.c
sys/kern/core_elf32.c
sys/kern/exec_elf32.c
sys/kern/exec_script.c
sys/kern/exec_subr.c
sys/kern/init_main.c
sys/kern/init_sysctl.c
sys/kern/init_sysent.c
sys/kern/kern_acct.c
sys/kern/kern_core.c
sys/kern/kern_descrip.c
sys/kern/kern_drvctl.c
sys/kern/kern_event.c
sys/kern/kern_exec.c
sys/kern/kern_exit.c
sys/kern/kern_fileassoc.c
sys/kern/kern_fork.c
sys/kern/kern_ksyms.c
sys/kern/kern_ktrace.c
sys/kern/kern_lkm.c
sys/kern/kern_lock.c
sys/kern/kern_lwp.c
sys/kern/kern_malloc.c
sys/kern/kern_mutex.c
sys/kern/kern_ntptime.c
sys/kern/kern_physio.c
sys/kern/kern_proc.c
sys/kern/kern_prot.c
sys/kern/kern_ras.c
sys/kern/kern_resource.c
sys/kern/kern_rwlock.c
sys/kern/kern_sig.c
sys/kern/kern_stub.c
sys/kern/kern_subr.c
sys/kern/kern_synch.c
sys/kern/kern_sysctl.c
sys/kern/kern_systrace.c
sys/kern/kern_tc.c
sys/kern/kern_time.c
sys/kern/subr_autoconf.c
sys/kern/subr_disk.c
sys/kern/subr_disk_mbr.c
sys/kern/subr_extent.c
sys/kern/subr_kmem.c
sys/kern/subr_lockdebug.c
sys/kern/subr_log.c
sys/kern/subr_pool.c
sys/kern/subr_prof.c
sys/kern/subr_vmem.c
sys/kern/sys_generic.c
sys/kern/sys_lwp.c
sys/kern/sys_pipe.c
sys/kern/sys_process.c
sys/kern/sys_sig.c
sys/kern/sys_socket.c
sys/kern/syscalls.c
sys/kern/syscalls.master
sys/kern/sysv_sem.c
sys/kern/sysv_shm.c
sys/kern/tty.c
sys/kern/tty_conf.c
sys/kern/tty_ptm.c
sys/kern/tty_pty.c
sys/kern/tty_tty.c
sys/kern/uipc_mbuf.c
sys/kern/uipc_mbuf2.c
sys/kern/uipc_socket.c
sys/kern/uipc_socket2.c
sys/kern/uipc_syscalls.c
sys/kern/uipc_usrreq.c
sys/kern/vfs_bio.c
sys/kern/vfs_lockf.c
sys/kern/vfs_subr.c
sys/kern/vfs_syscalls.c
sys/kern/vfs_vnops.c
sys/lib/libkern/arch/hppa/bcopy.S
sys/lib/libkern/arch/powerpc/memset.S
sys/lib/libsa/cd9660.c
sys/lib/libsa/tftp.c
sys/lib/libsa/ustarfs.c
sys/lkm/vfs/Makefile
sys/miscfs/genfs/genfs_vnops.c
sys/miscfs/kernfs/kernfs_subr.c
sys/miscfs/procfs/procfs_ctl.c
sys/miscfs/procfs/procfs_linux.c
sys/miscfs/procfs/procfs_status.c
sys/miscfs/procfs/procfs_subr.c
sys/miscfs/procfs/procfs_vnops.c
sys/miscfs/specfs/spec_vnops.c
sys/net/agr/if_agr.c
sys/net/agr/if_agrether.c
sys/net/agr/if_agrsubr.c
sys/net/agr/if_agrvar_impl.h
sys/net/bpf.c
sys/net/bpfdesc.h
sys/net/bridgestp.c
sys/net/if.c
sys/net/if.h
sys/net/if_arp.h
sys/net/if_atmsubr.c
sys/net/if_bridge.c
sys/net/if_bridgevar.h
sys/net/if_ecosubr.c
sys/net/if_ether.h
sys/net/if_etherip.c
sys/net/if_ethersubr.c
sys/net/if_faith.c
sys/net/if_fddi.h
sys/net/if_fddisubr.c
sys/net/if_gif.c
sys/net/if_gif.h
sys/net/if_gre.c
sys/net/if_hippi.h
sys/net/if_hippisubr.c
sys/net/if_ieee1394.h
sys/net/if_ieee1394subr.c
sys/net/if_loop.c
sys/net/if_ppp.c
sys/net/if_pppoe.c
sys/net/if_pppoe.h
sys/net/if_pppvar.h
sys/net/if_sl.c
sys/net/if_spppsubr.c
sys/net/if_srt.c
sys/net/if_stf.c
sys/net/if_strip.c
sys/net/if_tap.c
sys/net/if_token.h
sys/net/if_tokensubr.c
sys/net/if_tun.c
sys/net/if_vlan.c
sys/net/net_osdep.h
sys/net/ppp_tty.c
sys/net/radix.c
sys/net/raw_cb.c
sys/net/raw_usrreq.c
sys/net/route.c
sys/net/route.h
sys/net/rtsock.c
sys/net/slcompress.c
sys/net80211/ieee80211_input.c
sys/net80211/ieee80211_ioctl.c
sys/net80211/ieee80211_netbsd.c
sys/net80211/ieee80211_netbsd.h
sys/net80211/ieee80211_output.c
sys/net80211/ieee80211_var.h
sys/netatalk/at_control.c
sys/netatalk/at_extern.h
sys/netatalk/ddp_input.c
sys/netatalk/ddp_usrreq.c
sys/netbt/hci_event.c
sys/netbt/hci_socket.c
sys/netbt/l2cap.h
sys/netbt/l2cap_lower.c
sys/netbt/l2cap_signal.c
sys/netbt/l2cap_socket.c
sys/netbt/l2cap_upper.c
sys/netbt/rfcomm_session.c
sys/netbt/rfcomm_socket.c
sys/netbt/rfcomm_upper.c
sys/netbt/sco_socket.c
sys/netbt/sco_upper.c
sys/netinet/if_arp.c
sys/netinet/if_atm.c
sys/netinet/if_inarp.h
sys/netinet/in.c
sys/netinet/in4_cksum.c
sys/netinet/in_gif.c
sys/netinet/in_pcb.c
sys/netinet/in_pcb_hdr.h
sys/netinet/in_proto.c
sys/netinet/in_var.h
sys/netinet/ip6.h
sys/netinet/ip_carp.c
sys/netinet/ip_encap.c
sys/netinet/ip_flow.c
sys/netinet/ip_icmp.c
sys/netinet/ip_input.c
sys/netinet/ip_mroute.c
sys/netinet/ip_mroute.h
sys/netinet/ip_output.c
sys/netinet/raw_ip.c
sys/netinet/tcp_debug.c
sys/netinet/tcp_debug.h
sys/netinet/tcp_input.c
sys/netinet/tcp_output.c
sys/netinet/tcp_subr.c
sys/netinet/tcp_usrreq.c
sys/netinet/tcp_var.h
sys/netinet/udp_usrreq.c
sys/netinet6/ah_core.c
sys/netinet6/ah_input.c
sys/netinet6/esp_aesctr.c
sys/netinet6/esp_core.c
sys/netinet6/esp_input.c
sys/netinet6/files.netinet6
sys/netinet6/frag6.c
sys/netinet6/icmp6.c
sys/netinet6/in6.c
sys/netinet6/in6_gif.c
sys/netinet6/in6_pcb.c
sys/netinet6/in6_proto.c
sys/netinet6/in6_src.c
sys/netinet6/in6_var.h
sys/netinet6/ip6_forward.c
sys/netinet6/ip6_input.c
sys/netinet6/ip6_mroute.c
sys/netinet6/ip6_mroute.h
sys/netinet6/ip6_output.c
sys/netinet6/ip6_var.h
sys/netinet6/ipcomp_input.c
sys/netinet6/ipsec.c
sys/netinet6/ipsec.h
sys/netinet6/mld6.c
sys/netinet6/nd6.c
sys/netinet6/nd6.h
sys/netinet6/nd6_nbr.c
sys/netinet6/nd6_rtr.c
sys/netinet6/raw_ip6.c
sys/netinet6/route6.c
sys/netinet6/udp6_output.c
sys/netinet6/udp6_usrreq.c
sys/netipsec/ipsec.c
sys/netipsec/ipsec.h
sys/netipsec/ipsec6.h
sys/netipsec/ipsec_input.c
sys/netipsec/ipsec_mbuf.c
sys/netipsec/ipsec_netbsd.c
sys/netipsec/key.c
sys/netipsec/key.h
sys/netipsec/key_debug.c
sys/netipsec/key_debug.h
sys/netipsec/keydb.h
sys/netipsec/keysock.c
sys/netipsec/xform.h
sys/netipsec/xform_ah.c
sys/netipsec/xform_esp.c
sys/netipsec/xform_ipcomp.c
sys/netipsec/xform_ipip.c
sys/netisdn/i4b_ctl.c
sys/netisdn/i4b_i4bdrv.c
sys/netisdn/i4b_ipr.c
sys/netisdn/i4b_isppp.c
sys/netisdn/i4b_isppp.h
sys/netisdn/i4b_l1l2.h
sys/netisdn/i4b_l2.c
sys/netisdn/i4b_l2.h
sys/netisdn/i4b_rbch.c
sys/netisdn/i4b_tel.c
sys/netisdn/i4b_trace.c
sys/netiso/clnp.h
sys/netiso/clnp_er.c
sys/netiso/clnp_frag.c
sys/netiso/clnp_input.c
sys/netiso/clnp_options.c
sys/netiso/clnp_output.c
sys/netiso/clnp_raw.c
sys/netiso/clnp_subr.c
sys/netiso/cltp_usrreq.c
sys/netiso/eonvar.h
sys/netiso/esis.c
sys/netiso/esis.h
sys/netiso/idrp_usrreq.c
sys/netiso/if_eon.c
sys/netiso/iso.c
sys/netiso/iso_chksum.c
sys/netiso/iso_pcb.c
sys/netiso/iso_pcb.h
sys/netiso/iso_snpac.c
sys/netiso/iso_var.h
sys/netiso/tp_cons.c
sys/netiso/tp_emit.c
sys/netiso/tp_inet.c
sys/netiso/tp_input.c
sys/netiso/tp_iso.c
sys/netiso/tp_meas.c
sys/netiso/tp_output.c
sys/netiso/tp_param.h
sys/netiso/tp_pcb.c
sys/netiso/tp_pcb.h
sys/netiso/tp_subr.c
sys/netiso/tp_subr2.c
sys/netiso/tp_timer.c
sys/netiso/tp_trace.c
sys/netiso/tp_usrreq.c
sys/netiso/tp_var.h
sys/netkey/key.c
sys/netkey/key.h
sys/netkey/key_debug.c
sys/netkey/key_debug.h
sys/netkey/keydb.h
sys/netkey/keysock.c
sys/netnatm/natm.c
sys/netsmb/mchain.h
sys/netsmb/smb_dev.c
sys/netsmb/smb_smb.c
sys/netsmb/smb_trantcp.c
sys/netsmb/smb_usr.c
sys/netsmb/subr_mchain.c
sys/nfs/krpc_subr.c
sys/nfs/nfs.h
sys/nfs/nfs_bio.c
sys/nfs/nfs_boot.c
sys/nfs/nfs_bootdhcp.c
sys/nfs/nfs_bootparam.c
sys/nfs/nfs_bootstatic.c
sys/nfs/nfs_export.c
sys/nfs/nfs_serv.c
sys/nfs/nfs_socket.c
sys/nfs/nfs_srvcache.c
sys/nfs/nfs_subs.c
sys/nfs/nfs_syscalls.c
sys/nfs/nfs_var.h
sys/nfs/nfs_vfsops.c
sys/nfs/nfs_vnops.c
sys/nfs/nfsm_subs.h
sys/opencrypto/criov.c
sys/opencrypto/cryptodev.c
sys/opencrypto/cryptodev.h
sys/opencrypto/cryptosoft.c
sys/opencrypto/cryptosoft.h
sys/opencrypto/cryptosoft_xform.c
sys/sys/ataio.h
sys/sys/buf.h
sys/sys/clockctl.h
sys/sys/conf.h
sys/sys/device.h
sys/sys/disk.h
sys/sys/disklabel.h
sys/sys/extent.h
sys/sys/filedesc.h
sys/sys/kcont.h
sys/sys/ksyms.h
sys/sys/lkm.h
sys/sys/lockdebug.h
sys/sys/lwp.h
sys/sys/malloc.h
sys/sys/mbuf.h
sys/sys/mount.h
sys/sys/mutex.h
sys/sys/param.h
sys/sys/pipe.h
sys/sys/proc.h
sys/sys/protosw.h
sys/sys/ptrace.h
sys/sys/ras.h
sys/sys/resourcevar.h
sys/sys/scsiio.h
sys/sys/socket.h
sys/sys/socketvar.h
sys/sys/syscall.h
sys/sys/syscallargs.h
sys/sys/sysctl.h
sys/sys/systm.h
sys/sys/systrace.h
sys/sys/time.h
sys/sys/timepps.h
sys/sys/tty.h
sys/sys/verified_exec.h
sys/sys/vnode.h
sys/ufs/ext2fs/ext2fs_inode.c
sys/ufs/ext2fs/ext2fs_lookup.c
sys/ufs/ext2fs/ext2fs_vfsops.c
sys/ufs/ext2fs/ext2fs_vnops.c
sys/ufs/ffs/ffs_alloc.c
sys/ufs/ffs/ffs_inode.c
sys/ufs/ffs/ffs_snapshot.c
sys/ufs/ffs/ffs_softdep.c
sys/ufs/ffs/ffs_softdep.stub.c
sys/ufs/ffs/softdep.h
sys/ufs/lfs/lfs_extern.h
sys/ufs/lfs/lfs_inode.c
sys/ufs/lfs/lfs_segment.c
sys/ufs/lfs/lfs_syscalls.c
sys/ufs/lfs/lfs_vnops.c
sys/ufs/mfs/mfs_extern.h
sys/ufs/mfs/mfs_vfsops.c
sys/ufs/mfs/mfs_vnops.c
sys/ufs/mfs/mfsnode.h
sys/ufs/ufs/inode.h
sys/ufs/ufs/quota.h
sys/ufs/ufs/ufs_dirhash.c
sys/ufs/ufs/ufs_extattr.c
sys/ufs/ufs/ufs_extern.h
sys/ufs/ufs/ufs_ihash.c
sys/ufs/ufs/ufs_lookup.c
sys/ufs/ufs/ufs_quota.c
sys/ufs/ufs/ufs_vnops.c
sys/ufs/ufs/ufsmount.h
sys/uvm/uvm_extern.h
sys/uvm/uvm_glue.c
sys/uvm/uvm_io.c
sys/uvm/uvm_map.c
sys/uvm/uvm_mmap.c
sys/uvm/uvm_swap.c
sys/uvm/uvm_vnode.c
--- a/sys/dev/isapnp/atppc_isapnp.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/isapnp/atppc_isapnp.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atppc_isapnp.c,v 1.5 2006/03/29 06:51:47 thorpej Exp $ */
+/* $NetBSD: atppc_isapnp.c,v 1.5.14.1 2007/03/12 05:55:05 rmind Exp $ */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atppc_isapnp.c,v 1.5 2006/03/29 06:51:47 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atppc_isapnp.c,v 1.5.14.1 2007/03/12 05:55:05 rmind Exp $");
 
 #include "opt_atppc.h"
 
@@ -79,9 +79,9 @@
 	u_int8_t);
 static int atppc_isapnp_dma_finish(struct atppc_softc *);
 static int atppc_isapnp_dma_abort(struct atppc_softc *);
-static int atppc_isapnp_dma_malloc(struct device *, caddr_t *, bus_addr_t *,
+static int atppc_isapnp_dma_malloc(struct device *, void **, bus_addr_t *,
 	bus_size_t);
-static void atppc_isapnp_dma_free(struct device *, caddr_t *, bus_addr_t *,
+static void atppc_isapnp_dma_free(struct device *, void **, bus_addr_t *,
 	bus_size_t);
 /*
  * atppc_isapnp_match: autoconf(9) match routine
@@ -173,7 +173,7 @@
 
 /* Allocate memory for DMA over ISA bus */
 int
-atppc_isapnp_dma_malloc(struct device * dev, caddr_t * buf, bus_addr_t * bus_addr,
+atppc_isapnp_dma_malloc(struct device * dev, void ** buf, bus_addr_t * bus_addr,
 	bus_size_t size)
 {
 	struct atppc_isapnp_softc * sc = (struct atppc_isapnp_softc *) dev;
@@ -183,7 +183,7 @@
 
 /* Free memory allocated by atppc_isa_dma_malloc() */
 void
-atppc_isapnp_dma_free(struct device * dev, caddr_t * buf, bus_addr_t * bus_addr,
+atppc_isapnp_dma_free(struct device * dev, void ** buf, bus_addr_t * bus_addr,
 	bus_size_t size)
 {
 	struct atppc_isapnp_softc * sc = (struct atppc_isapnp_softc *) dev;
--- a/sys/dev/isapnp/if_le_isapnp.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/isapnp/if_le_isapnp.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le_isapnp.c,v 1.30 2006/11/16 01:33:05 christos Exp $	*/
+/*	$NetBSD: if_le_isapnp.c,v 1.30.4.1 2007/03/12 05:55:05 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le_isapnp.c,v 1.30 2006/11/16 01:33:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_isapnp.c,v 1.30.4.1 2007/03/12 05:55:05 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -216,7 +216,7 @@
 		return;
 	}
 	if (bus_dmamem_map(dmat, &seg, rseg, LE_ISAPNP_MEMSIZE,
-	    (caddr_t *)&sc->sc_mem, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) {
+	    (void **)&sc->sc_mem, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) {
 		printf(": couldn't map memory for card\n");
 		return;
 	}
--- a/sys/dev/isapnp/isic_isapnp_ctx_s0P.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/isapnp/isic_isapnp_ctx_s0P.c	Mon Mar 12 05:55:05 2007 +0000
@@ -27,14 +27,14 @@
  *	isic - I4B Siemens ISDN Chipset Driver for Creatix PnP cards
  *	============================================================
  *
- *	$Id: isic_isapnp_ctx_s0P.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $
+ *	$Id: isic_isapnp_ctx_s0P.c,v 1.9.2.1 2007/03/12 05:55:06 rmind Exp $
  *
  *      last edit-date: [Fri Jan  5 11:38:29 2001]
  *
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_ctx_s0P.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_ctx_s0P.c,v 1.9.2.1 2007/03/12 05:55:06 rmind Exp $");
 
 #include "opt_isicpnp.h"
 #if ISICPNP_CRTX_S0_P
@@ -286,9 +286,9 @@
 
 	/* setup ISAC and HSCX base addr */
 
-	ISAC_BASE   = (caddr_t) dev->id_iobase - 0x20;
-	HSCX_A_BASE = (caddr_t) iobase2 - 0x20;
-	HSCX_B_BASE = (caddr_t) iobase2;
+	ISAC_BASE   = (void *) dev->id_iobase - 0x20;
+	HSCX_A_BASE = (void *) iobase2 - 0x20;
+	HSCX_B_BASE = (void *) iobase2;
 
 	/*
 	 * Read HSCX A/B VSTR.  Expected value for the Creatix PnP card is
--- a/sys/dev/isapnp/isic_isapnp_drn_ngo.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/isapnp/isic_isapnp_drn_ngo.c	Mon Mar 12 05:55:05 2007 +0000
@@ -27,14 +27,14 @@
  *	i4b_drn_ngo.c - Dr. Neuhaus Niccy GO@ and SAGEM Cybermod
  *	--------------------------------------------------------
  *
- *	$Id: isic_isapnp_drn_ngo.c,v 1.8 2005/12/11 12:22:16 christos Exp $
+ *	$Id: isic_isapnp_drn_ngo.c,v 1.8.26.1 2007/03/12 05:55:06 rmind Exp $
  *
  *      last edit-date: [Fri Jan  5 11:38:29 2001]
  *
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_drn_ngo.c,v 1.8 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_drn_ngo.c,v 1.8.26.1 2007/03/12 05:55:06 rmind Exp $");
 
 #include "opt_isicpnp.h"
 #ifdef ISICPNP_DRN_NGO
@@ -419,9 +419,9 @@
 
 	/* setup ISAC and HSCX base addr */
 
-	ISAC_BASE   = (caddr_t)dev->id_iobase;
-	HSCX_A_BASE = (caddr_t)(((u_int)dev->id_iobase) | HSCX_ABIT);
-	HSCX_B_BASE = (caddr_t)(((u_int)dev->id_iobase) | HSCX_BBIT);
+	ISAC_BASE   = (void *)dev->id_iobase;
+	HSCX_A_BASE = (void *)(((u_int)dev->id_iobase) | HSCX_ABIT);
+	HSCX_B_BASE = (void *)(((u_int)dev->id_iobase) | HSCX_BBIT);
 
 	/*
 	 * Read HSCX A/B VSTR.  Expected value for Dr. Neuhaus Niccy GO@ based
--- a/sys/dev/isapnp/isic_isapnp_dynalink.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/isapnp/isic_isapnp_dynalink.c	Mon Mar 12 05:55:05 2007 +0000
@@ -33,7 +33,7 @@
  *	isdn4bsd layer1 driver for Dynalink IS64PH isdn TA
  *	==================================================
  *
- *	$Id: isic_isapnp_dynalink.c,v 1.7 2005/12/11 12:22:16 christos Exp $
+ *	$Id: isic_isapnp_dynalink.c,v 1.7.26.1 2007/03/12 05:55:06 rmind Exp $
  *
  *      last edit-date: [Fri Jan  5 11:38:29 2001]
  *
@@ -75,7 +75,7 @@
 */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_dynalink.c,v 1.7 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_dynalink.c,v 1.7.26.1 2007/03/12 05:55:06 rmind Exp $");
 
 #include "opt_isicpnp.h"
 #ifdef ISICPNP_DYNALINK
@@ -247,9 +247,9 @@
 	sc->sc_bfifolen = HSCX_FIFO_LEN;
 
 	/* setup ISAC and HSCX base addr */
-	ISAC_BASE = (caddr_t) sc->sc_port;
-	HSCX_A_BASE = (caddr_t) sc->sc_port + 1;
-	HSCX_B_BASE = (caddr_t) sc->sc_port + 1 + HSCXB_HACK;
+	ISAC_BASE = (void *) sc->sc_port;
+	HSCX_A_BASE = (void *) sc->sc_port + 1;
+	HSCX_B_BASE = (void *) sc->sc_port + 1 + HSCXB_HACK;
 
 	/* Read HSCX A/B VSTR.  Expected value is 0x05 (V2.1). */
 	if( ((HSCX_READ(0, H_VSTR) & 0xf) != 0x5) ||
@@ -344,9 +344,9 @@
 	sc->sc_bfifolen = HSCX_FIFO_LEN;
 
 	/* setup ISAC and HSCX base addr */
-	ISAC_BASE = (caddr_t) sc->sc_port;
-	HSCX_A_BASE = (caddr_t) sc->sc_port + 1;
-	HSCX_B_BASE = (caddr_t) sc->sc_port + 1 + HSCXB_HACK;
+	ISAC_BASE = (void *) sc->sc_port;
+	HSCX_A_BASE = (void *) sc->sc_port + 1;
+	HSCX_B_BASE = (void *) sc->sc_port + 1 + HSCXB_HACK;
 	return 1;
 }
 
--- a/sys/dev/isapnp/isic_isapnp_elsa_qs1i.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/isapnp/isic_isapnp_elsa_qs1i.c	Mon Mar 12 05:55:05 2007 +0000
@@ -27,14 +27,14 @@
  *	isic - I4B Siemens ISDN Chipset Driver for ELSA Quickstep 1000pro ISA
  *	=====================================================================
  *
- *	$Id: isic_isapnp_elsa_qs1i.c,v 1.13 2005/12/11 12:22:16 christos Exp $
+ *	$Id: isic_isapnp_elsa_qs1i.c,v 1.13.26.1 2007/03/12 05:55:06 rmind Exp $
  *
  *      last edit-date: [Fri Jan  5 11:38:29 2001]
  *
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_elsa_qs1i.c,v 1.13 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_elsa_qs1i.c,v 1.13.26.1 2007/03/12 05:55:06 rmind Exp $");
 
 #include "opt_isicpnp.h"
 #if defined(ISICPNP_ELSA_QS1ISA) || defined(ISICPNP_ELSA_PCC16)
@@ -419,9 +419,9 @@
 
 	/* setup ISAC and HSCX base addr */
 
-	ISAC_BASE   = (caddr_t) ((u_int)dev->id_iobase | ELSA_IDISAC);
-	HSCX_A_BASE = (caddr_t) ((u_int)dev->id_iobase | ELSA_IDHSCXA);
-	HSCX_B_BASE = (caddr_t) ((u_int)dev->id_iobase | ELSA_IDHSCXB);
+	ISAC_BASE   = (void *) ((u_int)dev->id_iobase | ELSA_IDISAC);
+	HSCX_A_BASE = (void *) ((u_int)dev->id_iobase | ELSA_IDHSCXA);
+	HSCX_B_BASE = (void *) ((u_int)dev->id_iobase | ELSA_IDHSCXB);
 
 	/*
 	 * Read HSCX A/B VSTR.  Expected value for the ELSA QuickStep 1000pro
--- a/sys/dev/isapnp/isic_isapnp_siemens_isurf.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/isapnp/isic_isapnp_siemens_isurf.c	Mon Mar 12 05:55:05 2007 +0000
@@ -37,14 +37,14 @@
  *	Siemens I-Surf 2.0 PnP specific routines for isic driver
  *	--------------------------------------------------------
  *
- *	$Id: isic_isapnp_siemens_isurf.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $
+ *	$Id: isic_isapnp_siemens_isurf.c,v 1.9.2.1 2007/03/12 05:55:06 rmind Exp $
  *
  *      last edit-date: [Fri Jan  5 11:38:29 2001]
  *
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_siemens_isurf.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_siemens_isurf.c,v 1.9.2.1 2007/03/12 05:55:06 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -425,10 +425,10 @@
 
 	/* setup ISAC and HSCX base addr */
 
-	ISAC_BASE   = (caddr_t) ((u_int)sc->sc_port | SIE_ISURF_IDISAC);
-	HSCX_A_BASE = (caddr_t) ((u_int)sc->sc_port | SIE_ISURF_IDHSCXA);
-	HSCX_B_BASE = (caddr_t) ((u_int)sc->sc_port | SIE_ISURF_IDHSCXB);
-	IPAC_BASE   = (caddr_t) ((u_int)sc->sc_port | SIE_ISURF_IDIPAC);
+	ISAC_BASE   = (void *) ((u_int)sc->sc_port | SIE_ISURF_IDISAC);
+	HSCX_A_BASE = (void *) ((u_int)sc->sc_port | SIE_ISURF_IDHSCXA);
+	HSCX_B_BASE = (void *) ((u_int)sc->sc_port | SIE_ISURF_IDHSCXB);
+	IPAC_BASE   = (void *) ((u_int)sc->sc_port | SIE_ISURF_IDIPAC);
 
 	/* enable hscx/isac irq's */
 	IPAC_WRITE(IPAC_MASK, (IPAC_MASK_INT1 | IPAC_MASK_INT0));
--- a/sys/dev/isapnp/isic_isapnp_sws.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/isapnp/isic_isapnp_sws.c	Mon Mar 12 05:55:05 2007 +0000
@@ -47,7 +47,7 @@
  *		EXPERIMENTAL !!!!
  *		=================
  *
- *	$Id: isic_isapnp_sws.c,v 1.10 2007/01/29 01:52:45 hubertf Exp $
+ *	$Id: isic_isapnp_sws.c,v 1.10.2.1 2007/03/12 05:55:06 rmind Exp $
  *
  *	last edit-date: [Fri Jan  5 11:38:29 2001]
  *
@@ -57,7 +57,7 @@
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_sws.c,v 1.10 2007/01/29 01:52:45 hubertf Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_sws.c,v 1.10.2.1 2007/03/12 05:55:06 rmind Exp $");
 
 #include "opt_isicpnp.h"
 #ifdef ISICPNP_SEDLBAUER
@@ -302,9 +302,9 @@
 	sc->sc_bfifolen = HSCX_FIFO_LEN;
 	dev->id_msize   = 0;
 
-	ISAC_BASE   = (caddr_t) (((u_int) sc->sc_port) + SWS_ISAC);
-	HSCX_A_BASE = (caddr_t) (((u_int) sc->sc_port) + SWS_HSCX0);
-	HSCX_B_BASE = (caddr_t) (((u_int) sc->sc_port) + SWS_HSCX1);
+	ISAC_BASE   = (void *) (((u_int) sc->sc_port) + SWS_ISAC);
+	HSCX_A_BASE = (void *) (((u_int) sc->sc_port) + SWS_HSCX0);
+	HSCX_B_BASE = (void *) (((u_int) sc->sc_port) + SWS_HSCX1);
 
 	/*
 	 * Read HSCX A/B VSTR.  Expected value for the SWS PnP card is
--- a/sys/dev/isapnp/isic_isapnp_tel_s0P.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/isapnp/isic_isapnp_tel_s0P.c	Mon Mar 12 05:55:05 2007 +0000
@@ -38,14 +38,14 @@
  *		EXPERIMENTAL !!!
  *		================
  *
- *	$Id: isic_isapnp_tel_s0P.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $
+ *	$Id: isic_isapnp_tel_s0P.c,v 1.9.2.1 2007/03/12 05:55:06 rmind Exp $
  *
  *      last edit-date: [Fri Jan  5 11:38:29 2001]
  *
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_tel_s0P.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_tel_s0P.c,v 1.9.2.1 2007/03/12 05:55:06 rmind Exp $");
 
 #include "opt_isicpnp.h"
 #ifdef ISICPNP_TEL_S0_16_3_P
@@ -285,21 +285,21 @@
 	switch(dev->id_iobase)
 	{
 		case 0x580:
-		        ISAC_BASE = (caddr_t) 0x580 - 0x20;
-			HSCX_A_BASE = (caddr_t) 0x180 - 0x20;
-			HSCX_B_BASE = (caddr_t) 0x180;
+		        ISAC_BASE = (void *) 0x580 - 0x20;
+			HSCX_A_BASE = (void *) 0x180 - 0x20;
+			HSCX_B_BASE = (void *) 0x180;
 			break;
 
 		case 0x500:
-		        ISAC_BASE = (caddr_t) 0x500 - 0x20;
-			HSCX_A_BASE = (caddr_t) 0x100 - 0x20;
-			HSCX_B_BASE = (caddr_t) 0x100;
+		        ISAC_BASE = (void *) 0x500 - 0x20;
+			HSCX_A_BASE = (void *) 0x100 - 0x20;
+			HSCX_B_BASE = (void *) 0x100;
 			break;
 
 		case 0x680:
-		        ISAC_BASE = (caddr_t) 0x680 - 0x20;
-			HSCX_A_BASE = (caddr_t) 0x280 - 0x20;
-			HSCX_B_BASE = (caddr_t) 0x280;
+		        ISAC_BASE = (void *) 0x680 - 0x20;
+			HSCX_A_BASE = (void *) 0x280 - 0x20;
+			HSCX_B_BASE = (void *) 0x280;
 			break;
 	}
 
--- a/sys/dev/marvell/gtidma.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/marvell/gtidma.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtidma.c,v 1.9 2006/03/29 06:55:32 thorpej Exp $	*/
+/*	$NetBSD: gtidma.c,v 1.9.14.1 2007/03/12 05:55:06 rmind Exp $	*/
 
 /*
  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtidma.c,v 1.9 2006/03/29 06:55:32 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtidma.c,v 1.9.14.1 2007/03/12 05:55:06 rmind Exp $");
 
 #include "opt_idma.h"
 #include "opt_ddb.h"
@@ -150,7 +150,7 @@
 #define IDMA_LIST_SYNC_POST(c, p)	idma_list_sync_post(c, p)
 
 static inline void
-idma_cache_flush(void * p)
+idma_cache_flush(void *p)
 {
 	KASSERT(((unsigned int)p & (CACHELINESIZE-1)) == 0);
         __asm volatile ("eieio; dcbf 0,%0; eieio; lwz %0,0(%0); sync;"
@@ -158,7 +158,7 @@
 }
 
 static inline void
-idma_cache_invalidate(void * const p)
+idma_cache_invalidate(void *const p)
 {
 	KASSERT(((unsigned int)p & (CACHELINESIZE-1)) == 0);
 	__asm volatile ("eieio; dcbi 0,%0; sync;" :: "r"(p));
@@ -267,7 +267,7 @@
 idma_match(
 	struct device * const parent,
 	struct cfdata * const self,
-	void * const aux)
+	void *const aux)
 {
 	struct gt_attach_args * const ga = (struct gt_attach_args *)aux;
 
@@ -281,7 +281,7 @@
 idma_attach(
 	struct device * const parent,
 	struct device * const self,
-	void * const aux)
+	void *const aux)
 {
 	struct gt_softc * const gtsc = device_private(parent);
 	idma_softc_t * const sc = device_private(self);
@@ -433,7 +433,7 @@
 idma_chan_alloc(
 	const unsigned int ndesc,
 	int (* const callback)(void *, idma_desch_t *, u_int32_t),
-	void * const arg)
+	void *const arg)
 {
 	idma_softc_t * const sc = idma_sc;	/* XXX */
 	idma_chan_t *idcp;
@@ -1214,7 +1214,7 @@
 }
 
 STATIC int
-idma_intr0_1(void * const arg)
+idma_intr0_1(void *const arg)
 {
 	unsigned int reg = IDMA_CAUSE_REG(0);
 	unsigned int shift = IDMA_MASK_SHIFT(0);
@@ -1225,7 +1225,7 @@
 }
 
 STATIC int
-idma_intr2_3(void * const arg)
+idma_intr2_3(void *const arg)
 {
 	unsigned int reg = IDMA_CAUSE_REG(2);
 	unsigned int shift = IDMA_MASK_SHIFT(2);
@@ -1236,7 +1236,7 @@
 }
 
 STATIC int
-idma_intr4_5(void * const arg)
+idma_intr4_5(void *const arg)
 {
 	unsigned int reg = IDMA_CAUSE_REG(4);
 	unsigned int shift = IDMA_MASK_SHIFT(4);
@@ -1247,7 +1247,7 @@
 }
 
 STATIC int
-idma_intr6_7(void * const arg)
+idma_intr6_7(void *const arg)
 {
 	unsigned int reg = IDMA_CAUSE_REG(6);
 	unsigned int shift = IDMA_MASK_SHIFT(6);
@@ -1363,7 +1363,7 @@
 }
 
 STATIC void
-idma_time(void * const arg)
+idma_time(void *const arg)
 {
 	idma_softc_t * const sc = (idma_softc_t *)arg;
 	idma_chan_t *idcp;
--- a/sys/dev/marvell/gtidmavar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/marvell/gtidmavar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtidmavar.h,v 1.4 2005/12/11 12:22:16 christos Exp $	*/
+/*	$NetBSD: gtidmavar.h,v 1.4.26.1 2007/03/12 05:55:06 rmind Exp $	*/
 
 /*
  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -85,7 +85,7 @@
 #define IDMA_DMSEG_MAX 1
 typedef struct idma_dmamem {
 	bus_dmamap_t idm_map;		/* dmamem'ed memory */
-	caddr_t idm_kva;		/* kva of dmamem memory */
+	void *idm_kva;		/* kva of dmamem memory */
 	int idm_nsegs;			/* # of segment in idm_segs */
 	int idm_maxsegs;		/* maximum # of segments allowed */
 	size_t idm_size;		/* size of memory region */
--- a/sys/dev/marvell/gtmpsc.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/marvell/gtmpsc.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtmpsc.c,v 1.22 2007/01/29 01:52:44 hubertf Exp $	*/
+/*	$NetBSD: gtmpsc.c,v 1.22.2.1 2007/03/12 05:55:07 rmind Exp $	*/
 
 /*
  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.22 2007/01/29 01:52:44 hubertf Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.22.2.1 2007/03/12 05:55:07 rmind Exp $");
 
 #include "opt_kgdb.h"
 
@@ -435,7 +435,7 @@
 	gtmpsc_poll_sdma_t *vmps;
 	gtmpsc_poll_sdma_t *pmps;
 	struct tty *tp;
-	caddr_t kva;
+	void *kva;
 	int rsegs;
 	int err;
 	int s;
@@ -723,7 +723,7 @@
 }
 
 int
-gtmpscioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l)
+gtmpscioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
 {
 	struct gtmpsc_softc *sc = gtmpsc_cd.cd_devs[GTMPSCUNIT(dev)];
 	struct tty *tp = sc->gtmpsc_tty;
--- a/sys/dev/marvell/if_gfe.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/marvell/if_gfe.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gfe.c,v 1.20 2006/03/29 06:55:32 thorpej Exp $	*/
+/*	$NetBSD: if_gfe.c,v 1.20.14.1 2007/03/12 05:55:07 rmind Exp $	*/
 
 /*
  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.20 2006/03/29 06:55:32 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.20.14.1 2007/03/12 05:55:07 rmind Exp $");
 
 #include "opt_inet.h"
 #include "bpfilter.h"
@@ -151,7 +151,7 @@
 	size_t, int);
 STATIC void gfe_dmamem_free(struct gfe_softc *, struct gfe_dmamem *);
 
-STATIC int gfe_ifioctl (struct ifnet *, u_long, caddr_t);
+STATIC int gfe_ifioctl (struct ifnet *, u_long, void *);
 STATIC void gfe_ifstart (struct ifnet *);
 STATIC void gfe_ifwatchdog (struct ifnet *);
 
@@ -426,7 +426,7 @@
 }
 
 int
-gfe_ifioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+gfe_ifioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
 	struct gfe_softc * const sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *) data;
@@ -1120,7 +1120,7 @@
 	intrmask = sc->sc_intrmask;
 
 	m_copydata(m, 0, m->m_pkthdr.len,
-	    txq->txq_buf_mem.gdm_kva + txq->txq_outptr);
+	    (char *)txq->txq_buf_mem.gdm_kva + (int)txq->txq_outptr);
 	bus_dmamap_sync(sc->sc_dmat, txq->txq_buf_mem.gdm_map,
 	    txq->txq_outptr, buflen, BUS_DMASYNC_PREWRITE);
 	txd->ed_bufptr = htogt32(txq->txq_buf_busaddr + txq->txq_outptr);
--- a/sys/dev/marvell/if_gfevar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/marvell/if_gfevar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gfevar.h,v 1.7 2005/12/11 12:22:16 christos Exp $	*/
+/*	$NetBSD: if_gfevar.h,v 1.7.26.1 2007/03/12 05:55:07 rmind Exp $	*/
 
 /*
  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -46,7 +46,7 @@
 
 struct gfe_dmamem {
 	bus_dmamap_t gdm_map;		/* dmamem'ed memory */
-	caddr_t gdm_kva;		/* kva of tx memory */
+	void *gdm_kva;		/* kva of tx memory */
 	int gdm_nsegs;			/* # of segment in gdm_segs */
 	int gdm_maxsegs;		/* maximum # of segments allowed */
 	size_t gdm_size;		/* size of memory region */
--- a/sys/dev/mca/ed_mca.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/mca/ed_mca.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ed_mca.c,v 1.34 2006/11/16 01:33:05 christos Exp $	*/
+/*	$NetBSD: ed_mca.c,v 1.34.4.1 2007/03/12 05:55:07 rmind Exp $	*/
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.34 2006/11/16 01:33:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.34.4.1 2007/03/12 05:55:07 rmind Exp $");
 
 #include "rnd.h"
 
@@ -477,7 +477,7 @@
 edmcaioctl(dev, xfer, addr, flag, l)
 	dev_t dev;
 	u_long xfer;
-	caddr_t addr;
+	void *addr;
 	int flag;
 	struct lwp *l;
 {
@@ -663,7 +663,7 @@
 edmcadump(dev, blkno, va, size)
 	dev_t dev;
 	daddr_t blkno;
-	caddr_t va;
+	void *va;
 	size_t size;
 {
 	struct ed_softc *ed;	/* disk unit to do the I/O */
@@ -719,7 +719,7 @@
 		/* update block count */
 		nblks -= min(nblks, eddumpmulti);
 		blkno += min(nblks, eddumpmulti);
-		va += min(nblks, eddumpmulti) * lp->d_secsize;
+		va = (char *)va + min(nblks, eddumpmulti) * lp->d_secsize;
 	}
 
 	eddoingadump = 0;
--- a/sys/dev/mca/esp_mca.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/mca/esp_mca.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: esp_mca.c,v 1.14 2006/11/16 01:33:05 christos Exp $	*/
+/*	$NetBSD: esp_mca.c,v 1.14.4.1 2007/03/12 05:55:07 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp_mca.c,v 1.14 2006/11/16 01:33:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp_mca.c,v 1.14.4.1 2007/03/12 05:55:07 rmind Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -107,7 +107,7 @@
 static int	esp_dma_isintr(struct ncr53c9x_softc *);
 static void	esp_dma_reset(struct ncr53c9x_softc *);
 static int	esp_dma_intr(struct ncr53c9x_softc *);
-static int	esp_dma_setup(struct ncr53c9x_softc *, caddr_t *,
+static int	esp_dma_setup(struct ncr53c9x_softc *, void **,
 	    size_t *, int, size_t *);
 static void	esp_dma_go(struct ncr53c9x_softc *);
 static void	esp_dma_stop(struct ncr53c9x_softc *);
@@ -374,7 +374,7 @@
 static int
 esp_dma_setup(
 	struct ncr53c9x_softc *sc,
-	caddr_t *addr,
+	void **addr,
 	size_t *len,
 	int datain,
 	size_t *dmasize
--- a/sys/dev/mca/espvar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/mca/espvar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: espvar.h,v 1.2 2001/12/04 20:47:58 jdolecek Exp $	*/
+/*	$NetBSD: espvar.h,v 1.2.74.1 2007/03/12 05:55:07 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2001 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
 
 	bus_dmamap_t	sc_xfer;
 
-	caddr_t		*sc_xfer_addr;
+	void *		*sc_xfer_addr;
 	size_t		*sc_xfer_len;
 
 	volatile int sc_flags;
--- a/sys/dev/mii/brgphy.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/mii/brgphy.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: brgphy.c,v 1.31 2006/11/26 16:31:48 tsutsui Exp $	*/
+/*	$NetBSD: brgphy.c,v 1.31.4.1 2007/03/12 05:55:07 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.31 2006/11/26 16:31:48 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.31.4.1 2007/03/12 05:55:07 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -100,6 +100,8 @@
 
 static int	brgphy_service(struct mii_softc *, struct mii_data *, int);
 static void	brgphy_status(struct mii_softc *);
+static int	brgphy_mii_phy_auto(struct mii_softc *);
+static void	brgphy_loop(struct mii_softc *);
 
 static void	brgphy_5401_reset(struct mii_softc *);
 static void	brgphy_5411_reset(struct mii_softc *);
@@ -210,6 +212,7 @@
 
 	sc->mii_inst = mii->mii_instance;
 	sc->mii_phy = ma->mii_phyno;
+	sc->mii_mpd_model = MII_MODEL(ma->mii_id2);
 	sc->mii_pdata = mii;
 	sc->mii_flags = ma->mii_flags;
 	sc->mii_anegticks = MII_ANEGTICKS;
@@ -286,7 +289,7 @@
 brgphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
 {
 	struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
-	int reg;
+	int reg, speed, gig;
 
 	switch (cmd) {
 	case MII_POLLSTAT:
@@ -314,9 +317,50 @@
 		if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
 			break;
 
-		if (sc->mii_funcs != &brgphy_5705_funcs)
-			mii_phy_reset(sc);    /* XXX hardware bug work-around */
-		mii_phy_setmedia(sc);
+		PHY_RESET(sc); /* XXX hardware bug work-around */
+
+		switch (IFM_SUBTYPE(ife->ifm_media)) {
+		case IFM_AUTO:
+			(void) brgphy_mii_phy_auto(sc);
+			break;
+		case IFM_1000_T:
+			speed = BMCR_S1000;
+			goto setit;
+		case IFM_100_TX:
+			speed = BMCR_S100;
+			goto setit;
+		case IFM_10_T:
+			speed = BMCR_S10;
+setit:
+			brgphy_loop(sc);
+			if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
+				speed |= BMCR_FDX;
+				gig = GTCR_ADV_1000TFDX;
+			} else {
+				gig = GTCR_ADV_1000THDX;
+			}
+
+			PHY_WRITE(sc, MII_100T2CR, 0);
+			PHY_WRITE(sc, MII_BMCR, speed);
+			PHY_WRITE(sc, MII_ANAR, ANAR_CSMA);
+
+			if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T)
+				break;
+
+			PHY_WRITE(sc, MII_100T2CR, gig);
+			PHY_WRITE(sc, MII_BMCR,
+			    speed|BMCR_AUTOEN|BMCR_STARTNEG);
+
+			if (sc->mii_mpd_model != MII_MODEL_BROADCOM_BCM5701)
+ 				break;
+
+			if (mii->mii_media.ifm_media & IFM_ETH_MASTER)
+				gig |= GTCR_MAN_MS | GTCR_ADV_MS;
+			PHY_WRITE(sc, MII_100T2CR, gig);
+			break;
+		default:
+			return (EINVAL);
+		}
 		break;
 
 	case MII_TICK:
@@ -339,8 +383,8 @@
 	mii_phy_status(sc);
 
 	/*
-	 * Callback if something changed.  Note that we need to poke
-	 * the DSP on the Broadcom PHYs if the media changes.
+	 * Callback if something changed. Note that we need to poke the DSP on
+	 * the Broadcom PHYs if the media changes.
 	 */
 	if (sc->mii_media_active != mii->mii_media_active ||
 	    sc->mii_media_status != mii->mii_media_status ||
@@ -435,6 +479,47 @@
 		mii->mii_media_active = ife->ifm_media;
 }
 
+int
+brgphy_mii_phy_auto(struct mii_softc *sc)
+{
+	int anar, ktcr = 0;
+
+	brgphy_loop(sc);
+	PHY_RESET(sc);
+	ktcr = GTCR_ADV_1000TFDX|GTCR_ADV_1000THDX;
+	if (sc->mii_mpd_model == MII_MODEL_BROADCOM_BCM5701)
+		ktcr |= GTCR_MAN_MS|GTCR_ADV_MS;
+	PHY_WRITE(sc, MII_100T2CR, ktcr);
+	ktcr = PHY_READ(sc, MII_100T2CR);
+	DELAY(1000);
+	anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA;
+	if (sc->mii_flags & MIIF_DOPAUSE)
+		anar |= ANAR_FC| ANAR_X_PAUSE_ASYM;
+
+	PHY_WRITE(sc, MII_ANAR, anar);
+	DELAY(1000);
+	PHY_WRITE(sc, MII_BMCR,
+	    BMCR_AUTOEN | BMCR_STARTNEG);
+	PHY_WRITE(sc, BRGPHY_MII_IMR, 0xFF00);
+
+	return (EJUSTRETURN);
+}
+
+void
+brgphy_loop(struct mii_softc *sc)
+{
+	u_int32_t bmsr;
+	int i;
+
+	PHY_WRITE(sc, MII_BMCR, BMCR_LOOP);
+ 	for (i = 0; i < 15000; i++) {
+		bmsr = PHY_READ(sc, MII_BMSR);
+		if (!(bmsr & BMSR_LINK))
+			break;
+		DELAY(10);
+	}
+}
+
 static void
 brgphy_5401_reset(struct mii_softc *sc)
 {
--- a/sys/dev/mscp/mscp.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/mscp/mscp.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: mscp.c,v 1.24 2006/03/25 23:20:18 thorpej Exp $	*/
+/*	$NetBSD: mscp.c,v 1.24.14.1 2007/03/12 05:55:08 rmind Exp $	*/
 
 /*
  * Copyright (c) 1988 Regents of the University of California.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp.c,v 1.24 2006/03/25 23:20:18 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp.c,v 1.24.14.1 2007/03/12 05:55:08 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -189,7 +189,7 @@
 		mi->mi_rsp.mri_next = nextrsp;
 		if (mi->mi_wantcredits && mi->mi_credits > MSCP_MINCREDITS) {
 			mi->mi_wantcredits = 0;
-			wakeup((caddr_t) &mi->mi_wantcredits);
+			wakeup((void *) &mi->mi_wantcredits);
 		}
 		return;
 	}
--- a/sys/dev/mscp/mscp_disk.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/mscp/mscp_disk.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: mscp_disk.c,v 1.53 2006/03/29 07:06:24 thorpej Exp $	*/
+/*	$NetBSD: mscp_disk.c,v 1.53.14.1 2007/03/12 05:55:08 rmind Exp $	*/
 /*
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.53 2006/03/29 07:06:24 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.53.14.1 2007/03/12 05:55:08 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -283,7 +283,7 @@
 	 */
 #if notyet
 	while (ra->ra_state != DK_OPEN)
-		if ((error = tsleep((caddr_t)ra, (PZERO + 1) | PCATCH,
+		if ((error = tsleep((void *)ra, (PZERO + 1) | PCATCH,
 		    devopn, 0))) {
 			splx(s);
 			return (error);
@@ -439,7 +439,7 @@
 raioctl(dev, cmd, data, flag, l)
 	dev_t dev;
 	u_long cmd;
-	caddr_t data;
+	void *data;
 	int flag;
 	struct lwp *l;
 {
@@ -586,7 +586,7 @@
 radump(dev, blkno, va, size)
 	dev_t	dev;
 	daddr_t blkno;
-	caddr_t va;
+	void *va;
 	size_t	size;
 {
 	return ENXIO;
@@ -876,7 +876,7 @@
 rxioctl(dev, cmd, data, flag, l)
 	dev_t dev;
 	u_long cmd;
-	caddr_t data;
+	void *data;
 	int flag;
 	struct lwp *l;
 {
@@ -916,7 +916,7 @@
 rxdump(dev, blkno, va, size)
 	dev_t dev;
 	daddr_t blkno;
-	caddr_t va;
+	void *va;
 	size_t size;
 {
 
@@ -1019,7 +1019,7 @@
 	struct rx_softc *rx = (struct rx_softc *)usc;
 	struct disklabel *dl;
 
-	wakeup((caddr_t)&rx->ra_state);
+	wakeup((void *)&rx->ra_state);
 	if ((mp->mscp_status & M_ST_MASK) != M_ST_SUCCESS) {
 		printf("%s: attempt to bring on line failed: ", usc->dv_xname);
 		mscp_printevent(mp);
--- a/sys/dev/mscp/mscp_tape.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/mscp/mscp_tape.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: mscp_tape.c,v 1.29 2006/03/29 07:06:24 thorpej Exp $ */
+/*	$NetBSD: mscp_tape.c,v 1.29.14.1 2007/03/12 05:55:08 rmind Exp $ */
 /*
  * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp_tape.c,v 1.29 2006/03/29 07:06:24 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_tape.c,v 1.29.14.1 2007/03/12 05:55:08 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -363,7 +363,7 @@
 {
 	struct mt_softc *mt = (void *)usc;
 
-	wakeup((caddr_t)&mt->mt_state);
+	wakeup((void *)&mt->mt_state);
 	if ((mp->mscp_status & M_ST_MASK) == M_ST_SUCCESS)
 		mt->mt_state = MT_ONLINE;
 
@@ -438,7 +438,7 @@
 mtioctl(dev, cmd, data, flag, l)
 	dev_t dev;
 	u_long cmd;
-	caddr_t data;
+	void *data;
 	int flag;
 	struct lwp *l;
 {
@@ -477,7 +477,7 @@
 mtdump(dev, blkno, va, size)
 	dev_t	dev;
 	daddr_t blkno;
-	caddr_t va;
+	void *va;
 	size_t	size;
 {
 	return -1;
--- a/sys/dev/mscp/mscpvar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/mscp/mscpvar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: mscpvar.h,v 1.14 2005/12/11 12:22:47 christos Exp $	*/
+/*	$NetBSD: mscpvar.h,v 1.14.26.1 2007/03/12 05:55:08 rmind Exp $	*/
 /*
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
@@ -262,7 +262,7 @@
 #define MSCP_DOCMD(mi) { \
 	if ((mi)->mi_wantcmd) { \
 		(mi)->mi_wantcmd = 0; \
-		wakeup((caddr_t) &(mi)->mi_wantcmd); \
+		wakeup((void *) &(mi)->mi_wantcmd); \
 	} \
 }
 
--- a/sys/dev/mvme/if_ie_mvme.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/mvme/if_ie_mvme.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ie_mvme.c,v 1.9 2006/03/29 07:07:41 thorpej Exp $	*/
+/*	$NetBSD: if_ie_mvme.c,v 1.9.14.1 2007/03/12 05:55:08 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie_mvme.c,v 1.9 2006/03/29 07:07:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie_mvme.c,v 1.9.14.1 2007/03/12 05:55:08 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -297,7 +297,7 @@
 		return;
 	}
 	if (bus_dmamem_map(pa->pa_dmat, &seg, rseg, ether_data_buff_size,
-	    (caddr_t *) & sc->sc_maddr, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) {
+	    (void **) & sc->sc_maddr, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) {
 		printf("%s: Failed to map ether buffer\n", self->dv_xname);
 		bus_dmamem_free(pa->pa_dmat, &seg, rseg);
 		return;
--- a/sys/dev/mvme/lpt_mvme.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/mvme/lpt_mvme.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: lpt_mvme.c,v 1.7 2005/12/11 12:22:48 christos Exp $	*/
+/*	$NetBSD: lpt_mvme.c,v 1.7.26.1 2007/03/12 05:55:08 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lpt_mvme.c,v 1.7 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lpt_mvme.c,v 1.7.26.1 2007/03/12 05:55:08 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -207,7 +207,7 @@
 			return (EBUSY);
 		}
 		/* wait 1/4 second, give up if we get a signal */
-		error = tsleep((caddr_t) sc, LPTPRI | PCATCH, "lptopen", STEP);
+		error = tsleep((void *) sc, LPTPRI | PCATCH, "lptopen", STEP);
 		if (error != EWOULDBLOCK) {
 			sc->sc_state = 0;
 			return (error);
@@ -294,7 +294,7 @@
 					tic = tic + tic + 1;
 					if (tic > TIMEOUT)
 						tic = TIMEOUT;
-					error = tsleep((caddr_t) sc,
+					error = tsleep((void *) sc,
 					    LPTPRI | PCATCH, "lptpsh", tic);
 					if (error != EWOULDBLOCK)
 						return (error);
@@ -319,7 +319,7 @@
 				(void) lpt_intr(sc);
 				splx(s);
 			}
-			error = tsleep((caddr_t) sc, LPTPRI | PCATCH,
+			error = tsleep((void *) sc, LPTPRI | PCATCH,
 			    "lptwrite2", 0);
 			if (error)
 				return (error);
@@ -381,7 +381,7 @@
 
 	if (sc->sc_count == 0) {
 		/* none, wake up the top half to get more */
-		wakeup((caddr_t) sc);
+		wakeup((void *) sc);
 	}
 
 	return (1);
@@ -392,7 +392,7 @@
 lptioctl(dev, cmd, data, flag, l)
 	dev_t dev;
 	u_long cmd;
-	caddr_t data;
+	void *data;
 	int flag;
 	struct lwp *l;
 {
--- a/sys/dev/mvme/mvmebus.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/mvme/mvmebus.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvmebus.c,v 1.10 2005/12/11 12:22:48 christos Exp $	*/
+/*	$NetBSD: mvmebus.c,v 1.10.26.1 2007/03/12 05:55:08 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvmebus.c,v 1.10 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvmebus.c,v 1.10.26.1 2007/03/12 05:55:08 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -871,7 +871,7 @@
 	bus_dma_segment_t *segs;
 	int nsegs;
 	size_t size;
-	caddr_t *kvap;
+	void **kvap;
 	int flags;
 {
 	struct mvmebus_softc *sc = t->_cookie;
@@ -882,7 +882,7 @@
 void
 mvmebus_dmamem_unmap(t, kva, size)
 	bus_dma_tag_t t;
-	caddr_t kva;
+	void *kva;
 	size_t size;
 {
 	struct mvmebus_softc *sc = t->_cookie;
--- a/sys/dev/mvme/mvmebus.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/mvme/mvmebus.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvmebus.h,v 1.1 2002/02/12 20:38:48 scw Exp $	*/
+/*	$NetBSD: mvmebus.h,v 1.1.74.1 2007/03/12 05:55:09 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2002 The NetBSD Foundation, Inc.
@@ -150,8 +150,8 @@
 	    vme_swap_t, bus_dma_segment_t *, int, int *, int);
 void	mvmebus_dmamem_free(void *, bus_dma_segment_t *, int);
 int	mvmebus_dmamem_map(bus_dma_tag_t, bus_dma_segment_t *, int,
-	    size_t, caddr_t *, int);
-void	mvmebus_dmamem_unmap(bus_dma_tag_t, caddr_t, size_t);
+	    size_t, void **, int);
+void	mvmebus_dmamem_unmap(bus_dma_tag_t, void *, size_t);
 paddr_t	mvmebus_dmamem_mmap(bus_dma_tag_t, bus_dma_segment_t *, int,
 	    off_t, int, int);
 
--- a/sys/dev/ofisa/atppc_ofisa.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/ofisa/atppc_ofisa.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atppc_ofisa.c,v 1.4 2006/03/29 07:09:33 thorpej Exp $ */
+/* $NetBSD: atppc_ofisa.c,v 1.4.14.1 2007/03/12 05:55:09 rmind Exp $ */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atppc_ofisa.c,v 1.4 2006/03/29 07:09:33 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atppc_ofisa.c,v 1.4.14.1 2007/03/12 05:55:09 rmind Exp $");
 
 #include "opt_atppc.h"
 
@@ -76,9 +76,9 @@
 	u_int8_t);
 static int atppc_ofisa_dma_finish(struct atppc_softc *);
 static int atppc_ofisa_dma_abort(struct atppc_softc *);
-static int atppc_ofisa_dma_malloc(struct device *, caddr_t *, bus_addr_t *,
+static int atppc_ofisa_dma_malloc(struct device *, void **, bus_addr_t *,
 	bus_size_t);
-static void atppc_ofisa_dma_free(struct device *, caddr_t *, bus_addr_t *,
+static void atppc_ofisa_dma_free(struct device *, void **, bus_addr_t *,
 	bus_size_t);
 /*
  * atppc_ofisa_match: autoconf(9) match routine
@@ -206,7 +206,7 @@
 
 /* Allocate memory for DMA over ISA bus */
 int
-atppc_ofisa_dma_malloc(struct device * dev, caddr_t * buf, bus_addr_t * bus_addr,
+atppc_ofisa_dma_malloc(struct device * dev, void ** buf, bus_addr_t * bus_addr,
 	bus_size_t size)
 {
 	struct atppc_ofisa_softc * sc = (struct atppc_ofisa_softc *) dev;
@@ -216,7 +216,7 @@
 
 /* Free memory allocated by atppc_isa_dma_malloc() */
 void
-atppc_ofisa_dma_free(struct device * dev, caddr_t * buf, bus_addr_t * bus_addr,
+atppc_ofisa_dma_free(struct device * dev, void ** buf, bus_addr_t * bus_addr,
 	bus_size_t size)
 {
 	struct atppc_ofisa_softc * sc = (struct atppc_ofisa_softc *) dev;
--- a/sys/dev/ofw/ofcons.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/ofw/ofcons.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofcons.c,v 1.29 2006/10/01 19:28:44 elad Exp $	*/
+/*	$NetBSD: ofcons.c,v 1.29.4.1 2007/03/12 05:55:09 rmind Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.29 2006/10/01 19:28:44 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.29.4.1 2007/03/12 05:55:09 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -214,7 +214,7 @@
 ofcons_ioctl(dev, cmd, data, flag, l)
 	dev_t dev;
 	u_long cmd;
-	caddr_t data;
+	void *data;
 	int flag;
 	struct lwp *l;
 {
--- a/sys/dev/ofw/ofdisk.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/ofw/ofdisk.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofdisk.c,v 1.34 2007/01/29 01:52:45 hubertf Exp $	*/
+/*	$NetBSD: ofdisk.c,v 1.34.2.1 2007/03/12 05:55:09 rmind Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.34 2007/01/29 01:52:45 hubertf Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.34.2.1 2007/03/12 05:55:09 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -339,7 +339,7 @@
 }
 
 int
-ofdisk_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l)
+ofdisk_ioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
 {
 	struct ofdisk_softc *of = ofdisk_cd.cd_devs[DISKUNIT(dev)];
 	int error;
@@ -466,7 +466,7 @@
 }
 
 int
-ofdisk_dump(dev_t dev, daddr_t blkno, caddr_t va, size_t size)
+ofdisk_dump(dev_t dev, daddr_t blkno, void *va, size_t size)
 {
 	return EINVAL;
 }
--- a/sys/dev/ofw/ofnet.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/ofw/ofnet.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofnet.c,v 1.37 2006/05/14 21:42:28 elad Exp $	*/
+/*	$NetBSD: ofnet.c,v 1.37.14.1 2007/03/12 05:55:09 rmind Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofnet.c,v 1.37 2006/05/14 21:42:28 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofnet.c,v 1.37.14.1 2007/03/12 05:55:09 rmind Exp $");
 
 #include "ofnet.h"
 #include "opt_inet.h"
@@ -96,7 +96,7 @@
 static void ofnet_stop (struct ofnet_softc *);
 
 static void ofnet_start (struct ifnet *);
-static int ofnet_ioctl (struct ifnet *, u_long, caddr_t);
+static int ofnet_ioctl (struct ifnet *, u_long, void *);
 static void ofnet_watchdog (struct ifnet *);
 
 static int
@@ -245,7 +245,7 @@
 			 * XXX then so does other code in this driver.
 			 */
 			if (head == NULL) {
-				caddr_t newdata = (caddr_t)ALIGN(m->m_data +
+				char *newdata = (char *)ALIGN(m->m_data +
 				      sizeof(struct ether_header)) -
 				    sizeof(struct ether_header);
 				l -= newdata - m->m_data;
@@ -366,7 +366,7 @@
 }
 
 static int
-ofnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+ofnet_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
 	struct ofnet_softc *of = ifp->if_softc;
 	struct ifaddr *ifa = (struct ifaddr *)data;
--- a/sys/dev/ofw/openfirmio.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/ofw/openfirmio.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: openfirmio.c,v 1.9 2005/12/11 12:22:48 christos Exp $ */
+/*	$NetBSD: openfirmio.c,v 1.9.26.1 2007/03/12 05:55:09 rmind Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: openfirmio.c,v 1.9 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: openfirmio.c,v 1.9.26.1 2007/03/12 05:55:09 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -108,7 +108,7 @@
 }
 
 int
-openfirmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct lwp *l)
+openfirmioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l)
 {
 	struct ofiocdesc *of;
 	int node, len, ok, error, s;
@@ -168,7 +168,7 @@
 		error = copyout(value, of->of_buf, len);
 		break;
 
-#if 0
+
 	case OFIOCSET:
 		if ((flags & FWRITE) == 0)
 			return (EBADF);
@@ -183,10 +183,16 @@
 		s = splhigh();
 		len = OF_setprop(node, name, value, of->of_buflen + 1);
 		splx(s);
-		if (len != of->of_buflen)
+
+		/* 
+		 * XXX
+		 * some OF implementations return the buffer length including 
+		 * the trailing zero ( like macppc ) and some without ( like
+		 * FirmWorks OF used in Shark )
+		 */
+		if ((len != (of->of_buflen + 1)) && (len != of->of_buflen))
 			error = EINVAL;
 		break;
-#endif
 
 	case OFIOCNEXTPROP: {
 		char newname[32];
--- a/sys/dev/pci/aac_pci.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/aac_pci.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: aac_pci.c,v 1.19 2006/11/16 01:33:08 christos Exp $	*/
+/*	$NetBSD: aac_pci.c,v 1.19.4.1 2007/03/12 05:55:09 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aac_pci.c,v 1.19 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aac_pci.c,v 1.19.4.1 2007/03/12 05:55:09 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -304,6 +304,15 @@
 		"Adaptec ASR-2410SA"
 	},
 	{
+		PCI_VENDOR_ADP2,
+		PCI_PRODUCT_ADP2_ASR2200S,
+		PCI_VENDOR_HP,
+		PCI_PRODUCT_ADP2_HP_M110_G2,
+		AAC_HWIF_I960RX,
+		0,
+		"HP ML110 G2 (Adaptec ASR-2610SA)"
+	},
+	{
 		PCI_VENDOR_DEC,
 		PCI_PRODUCT_DEC_21554,
 		PCI_VENDOR_ADP2,
--- a/sys/dev/pci/agp.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/agp.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp.c,v 1.44 2006/12/18 12:01:48 christos Exp $	*/
+/*	$NetBSD: agp.c,v 1.44.2.1 2007/03/12 05:55:10 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -65,7 +65,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.44 2006/12/18 12:01:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.44.2.1 2007/03/12 05:55:10 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -77,6 +77,7 @@
 #include <sys/fcntl.h>
 #include <sys/agpio.h>
 #include <sys/proc.h>
+#include <sys/mutex.h>
 
 #include <uvm/uvm_extern.h>
 
@@ -276,10 +277,10 @@
 	sc->as_maxmem = agp_max[i][1] << 20U;
 
 	/*
-	 * The lock is used to prevent re-entry to
+	 * The mutex is used to prevent re-entry to
 	 * agp_generic_bind_memory() since that function can sleep.
 	 */
-	lockinit(&sc->as_lock, PZERO|PCATCH, "agplk", 0, 0);
+	mutex_init(&sc->as_mtx, MUTEX_DRIVER, IPL_NONE);
 
 	TAILQ_INIT(&sc->as_memory);
 
@@ -318,7 +319,7 @@
 	u_int32_t apsize = AGP_GET_APERTURE(sc);
 	u_int32_t entries = apsize >> AGP_PAGE_SHIFT;
 	struct agp_gatt *gatt;
-	caddr_t virtual;
+	void *virtual;
 	int dummyseg;
 
 	gatt = malloc(sizeof(struct agp_gatt), M_AGP, M_NOWAIT);
@@ -343,7 +344,7 @@
 agp_free_gatt(struct agp_softc *sc, struct agp_gatt *gatt)
 {
 	agp_free_dmamem(sc->as_dmat, gatt->ag_size, gatt->ag_dmamap,
-	    (caddr_t)gatt->ag_virtual, &gatt->ag_dmaseg, 1);
+	    (void *)gatt->ag_virtual, &gatt->ag_dmaseg, 1);
 	free(gatt, M_AGP);
 }
 
@@ -351,7 +352,7 @@
 int
 agp_generic_detach(struct agp_softc *sc)
 {
-	lockmgr(&sc->as_lock, LK_DRAIN, 0);
+	mutex_destroy(&sc->as_mtx);
 	agp_flush_cache();
 	return 0;
 }
@@ -492,11 +493,11 @@
 	bus_addr_t pa;
 	int contigpages, nseg;
 
-	lockmgr(&sc->as_lock, LK_EXCLUSIVE, 0);
+	mutex_enter(&sc->as_mtx);
 
 	if (mem->am_is_bound) {
 		printf("%s: memory already bound\n", sc->as_dev.dv_xname);
-		lockmgr(&sc->as_lock, LK_RELEASE, 0);
+		mutex_exit(&sc->as_mtx);
 		return EINVAL;
 	}
 
@@ -505,7 +506,7 @@
 	    || offset + mem->am_size > AGP_GET_APERTURE(sc)) {
 		printf("%s: binding memory at bad offset %#lx\n",
 			      sc->as_dev.dv_xname, (unsigned long) offset);
-		lockmgr(&sc->as_lock, LK_RELEASE, 0);
+		mutex_exit(&sc->as_mtx);
 		return EINVAL;
 	}
 
@@ -528,7 +529,7 @@
 		nseg = (mem->am_size / (contigpages * PAGE_SIZE)) + 1;
 		segs = malloc(nseg * sizeof *segs, M_AGP, M_WAITOK);
 		if (segs == NULL) {
-			lockmgr(&sc->as_lock, LK_RELEASE, 0);
+			mutex_exit(&sc->as_mtx);
 			return ENOMEM;
 		}
 		if (bus_dmamem_alloc(sc->as_dmat, mem->am_size, PAGE_SIZE, 0,
@@ -557,7 +558,7 @@
 	}
 
 	if (contigpages == 0) {
-		lockmgr(&sc->as_lock, LK_RELEASE, 0);
+		mutex_exit(&sc->as_mtx);
 		return ENOMEM;
 	}
 
@@ -596,7 +597,7 @@
 				bus_dmamem_free(sc->as_dmat, mem->am_dmaseg,
 						mem->am_nseg);
 				free(mem->am_dmaseg, M_AGP);
-				lockmgr(&sc->as_lock, LK_RELEASE, 0);
+				mutex_exit(&sc->as_mtx);
 				return error;
 			}
 		}
@@ -617,7 +618,7 @@
 	mem->am_offset = offset;
 	mem->am_is_bound = 1;
 
-	lockmgr(&sc->as_lock, LK_RELEASE, 0);
+	mutex_exit(&sc->as_mtx);
 
 	return 0;
 }
@@ -627,11 +628,11 @@
 {
 	int i;
 
-	lockmgr(&sc->as_lock, LK_EXCLUSIVE, 0);
+	mutex_enter(&sc->as_mtx);
 
 	if (!mem->am_is_bound) {
 		printf("%s: memory is not bound\n", sc->as_dev.dv_xname);
-		lockmgr(&sc->as_lock, LK_RELEASE, 0);
+		mutex_exit(&sc->as_mtx);
 		return EINVAL;
 	}
 
@@ -655,7 +656,7 @@
 	mem->am_offset = 0;
 	mem->am_is_bound = 0;
 
-	lockmgr(&sc->as_lock, LK_RELEASE, 0);
+	mutex_exit(&sc->as_mtx);
 
 	return 0;
 }
@@ -834,7 +835,7 @@
 }
 
 static int
-agpioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct lwp *l)
+agpioctl(dev_t dev, u_long cmd, void *data, int fflag, struct lwp *l)
 {
 	struct agp_softc *sc = device_lookup(&agp_cd, AGPUNIT(dev));
 
@@ -982,7 +983,7 @@
 
 int
 agp_alloc_dmamem(bus_dma_tag_t tag, size_t size, int flags,
-		 bus_dmamap_t *mapp, caddr_t *vaddr, bus_addr_t *baddr,
+		 bus_dmamap_t *mapp, void **vaddr, bus_addr_t *baddr,
 		 bus_dma_segment_t *seg, int nseg, int *rseg)
 
 {
@@ -1030,7 +1031,7 @@
 
 void
 agp_free_dmamem(bus_dma_tag_t tag, size_t size, bus_dmamap_t map,
-		caddr_t vaddr, bus_dma_segment_t *seg, int nseg)
+		void *vaddr, bus_dma_segment_t *seg, int nseg)
 {
 
 	bus_dmamap_unload(tag, map);
--- a/sys/dev/pci/agp_amd.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/agp_amd.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp_amd.c,v 1.17 2006/11/16 01:33:08 christos Exp $	*/
+/*	$NetBSD: agp_amd.c,v 1.17.4.1 2007/03/12 05:55:10 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp_amd.c,v 1.17 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp_amd.c,v 1.17.4.1 2007/03/12 05:55:10 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -102,7 +102,7 @@
 	u_int32_t entries = apsize >> AGP_PAGE_SHIFT;
 	struct agp_amd_gatt *gatt;
 	int i, npages;
-	caddr_t vdir;
+	void *vdir;
 
 	gatt = malloc(sizeof(struct agp_amd_gatt), M_AGP, M_NOWAIT);
 	if (!gatt)
@@ -119,7 +119,7 @@
 
 	gatt->ag_vdir = (u_int32_t *)vdir;
 	gatt->ag_entries = entries;
-	gatt->ag_virtual = (u_int32_t *)(vdir + AGP_PAGE_SIZE);
+	gatt->ag_virtual = (u_int32_t *)((char *)vdir + AGP_PAGE_SIZE);
 	gatt->ag_physical = gatt->ag_pdir + AGP_PAGE_SIZE;
 	gatt->ag_size = AGP_PAGE_SIZE + entries * sizeof(u_int32_t);
 
@@ -148,7 +148,7 @@
 agp_amd_free_gatt(struct agp_softc *sc, struct agp_amd_gatt *gatt)
 {
 	agp_free_dmamem(sc->as_dmat, gatt->ag_size,
-	    gatt->ag_dmamap, (caddr_t)gatt->ag_virtual, &gatt->ag_dmaseg,
+	    gatt->ag_dmamap, (void *)gatt->ag_virtual, &gatt->ag_dmaseg,
 	    gatt->ag_nseg);
 	free(gatt, M_AGP);
 }
--- a/sys/dev/pci/agp_i810.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/agp_i810.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp_i810.c,v 1.35 2006/11/16 01:33:08 christos Exp $	*/
+/*	$NetBSD: agp_i810.c,v 1.35.4.1 2007/03/12 05:55:10 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.35 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.35.4.1 2007/03/12 05:55:10 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -255,7 +255,7 @@
 	gatt->ag_entries = AGP_GET_APERTURE(sc) >> AGP_PAGE_SHIFT;
 
 	if (isc->chiptype == CHIP_I810) {
-		caddr_t virtual;
+		void *virtual;
 		int dummyseg;
 
 		/* Some i810s have on-chip memory called dcache */
@@ -436,7 +436,7 @@
 
 	if (sc->chiptype == CHIP_I810) {
 		agp_free_dmamem(sc->as_dmat, gatt->ag_size, gatt->ag_dmamap,
-		    (caddr_t)gatt->ag_virtual, &gatt->ag_dmaseg, 1);
+		    (void *)gatt->ag_virtual, &gatt->ag_dmaseg, 1);
 	}
 	free(sc->gatt, M_AGP);
 
--- a/sys/dev/pci/agpvar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/agpvar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: agpvar.h,v 1.12 2006/08/17 17:11:28 christos Exp $	*/
+/*	$NetBSD: agpvar.h,v 1.12.8.1 2007/03/12 05:55:10 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -32,7 +32,7 @@
 #define _PCI_AGPVAR_H_
 
 #include <sys/mallocvar.h>
-#include <sys/lock.h>
+#include <sys/mutex.h>
 
 struct agpbus_attach_args {
 	char	*_apa_busname; /* XXX placeholder */
@@ -92,7 +92,7 @@
 	off_t		am_offset;		/* page offset if bound */
 	int		am_is_bound;		/* non-zero if bound */
 	bus_addr_t	  am_physical;
-	caddr_t		  am_virtual;
+	void *		  am_virtual;
 	bus_dmamap_t	  am_dmamap;
 	bus_dma_segment_t *am_dmaseg;
 	int		  am_nseg;
@@ -144,7 +144,7 @@
 #if 0
 	dev_t			as_devnode;	/* from make_dev */
 #endif
-	struct lock		as_lock;	/* lock for access to GATT */
+	kmutex_t		as_mtx;		/* mutex for access to GATT */
 	struct agp_methods	*as_methods;	/* chipset-dependent API */
 	void			*as_chipc;	/* chipset-dependent state */
 	pci_chipset_tag_t	as_pc;
@@ -189,9 +189,9 @@
 int agp_via_attach(struct device *, struct device *, void *);
 int agp_sis_attach(struct device *, struct device *, void *);
 
-int agp_alloc_dmamem(bus_dma_tag_t, size_t, int, bus_dmamap_t *, caddr_t *,
+int agp_alloc_dmamem(bus_dma_tag_t, size_t, int, bus_dmamap_t *, void **,
 		     bus_addr_t *, bus_dma_segment_t *, int, int *);
-void agp_free_dmamem(bus_dma_tag_t, size_t, bus_dmamap_t, caddr_t,
+void agp_free_dmamem(bus_dma_tag_t, size_t, bus_dmamap_t, void *,
 		     bus_dma_segment_t *, int) ;
 
 MALLOC_DECLARE(M_AGP);
--- a/sys/dev/pci/ahcisata.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/ahcisata.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata.c,v 1.3 2007/01/03 18:58:26 bouyer Exp $	*/
+/*	$NetBSD: ahcisata.c,v 1.3.4.1 2007/03/12 05:55:10 rmind Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata.c,v 1.3 2007/01/03 18:58:26 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata.c,v 1.3.4.1 2007/03/12 05:55:10 rmind Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -72,7 +72,7 @@
 	bus_space_tag_t sc_ahcit; /* ahci registers mapping */
 	bus_space_handle_t sc_ahcih;
 	bus_dma_tag_t sc_dmat; /* DMA memory mappings: */
-	caddr_t sc_cmd_hdr; /* command tables and received FIS */
+	void *sc_cmd_hdr; /* command tables and received FIS */
 	bus_dmamap_t sc_cmd_hdrd;
 
 	int sc_ncmds; /* number of command slots */
@@ -100,10 +100,10 @@
 
 #define AHCI_CMDH_SYNC(sc, achp, cmd, op) bus_dmamap_sync((sc)->sc_dmat, \
     (sc)->sc_cmd_hdrd, \
-    (caddr_t)(&(achp)->ahcic_cmdh[(cmd)]) - (sc)->sc_cmd_hdr, \
+    (char *)(&(achp)->ahcic_cmdh[(cmd)]) - (char *)(sc)->sc_cmd_hdr, \
     sizeof(struct ahci_cmd_header), (op))
 #define AHCI_RFIS_SYNC(sc, achp, op) bus_dmamap_sync((sc)->sc_dmat, \
-    (sc)->sc_cmd_hdrd, (caddr_t)(achp)->ahcic_rfis - (sc)->sc_cmd_hdr, \
+    (sc)->sc_cmd_hdrd, (void *)(achp)->ahcic_rfis - (sc)->sc_cmd_hdr, \
     AHCI_RFIS_SIZE, (op))
 #define AHCI_CMDTBL_SYNC(sc, achp, cmd, op) bus_dmamap_sync((sc)->sc_dmat, \
     (achp)->ahcic_cmd_tbld, AHCI_CMDTBL_SIZE * (cmd), \
@@ -202,8 +202,8 @@
 	bus_dma_segment_t seg;
 	int rseg;
 	int dmasize;
-	caddr_t cmdhp;
-	caddr_t cmdtblp;
+	void *cmdhp;
+	void *cmdtblp;
 	const char *intrstr;
 	pci_intr_handle_t intrhandle;
 	void *ih;
@@ -364,11 +364,11 @@
 			break;
 		}
 		achp->ahcic_cmdh  = (struct ahci_cmd_header *)
-		    (cmdhp + AHCI_CMDH_SIZE * port);
+		    ((char *)cmdhp + AHCI_CMDH_SIZE * port);
 		achp->ahcic_bus_cmdh = sc->sc_cmd_hdrd->dm_segs[0].ds_addr +
 		    AHCI_CMDH_SIZE * port;
 		achp->ahcic_rfis = (struct ahci_r_fis *)
-		    (cmdhp + 
+		    ((char *)cmdhp + 
 		     AHCI_CMDH_SIZE * sc->sc_atac.atac_nchannels + 
 		     AHCI_RFIS_SIZE * port);
 		achp->ahcic_bus_rfis = sc->sc_cmd_hdrd->dm_segs[0].ds_addr +
@@ -381,7 +381,7 @@
 		    
 		for (j = 0; j < sc->sc_ncmds; j++) {
 			achp->ahcic_cmd_tbl[j] = (struct ahci_cmd_tbl *)
-			    (cmdtblp + AHCI_CMDTBL_SIZE * j);
+			    ((char *)cmdtblp + AHCI_CMDTBL_SIZE * j);
 			achp->ahcic_bus_cmd_tbl[j] =
 			     achp->ahcic_cmd_tbld->dm_segs[0].ds_addr +
 			     AHCI_CMDTBL_SIZE * j;
--- a/sys/dev/pci/amr.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/amr.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: amr.c,v 1.43 2006/12/02 03:10:43 elad Exp $	*/
+/*	$NetBSD: amr.c,v 1.43.2.1 2007/03/12 05:55:10 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.43 2006/12/02 03:10:43 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.43.2.1 2007/03/12 05:55:10 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -367,7 +367,7 @@
 	amr->amr_flags |= AMRF_DMA_ALLOC;
 
 	if ((rv = bus_dmamem_map(amr->amr_dmat, &amr->amr_dmaseg, rseg, size,
-	    (caddr_t *)&amr->amr_mbox,
+	    (void **)&amr->amr_mbox,
 	    BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) {
 		aprint_error("%s: unable to map buffer, rv = %d\n",
 		    amr->amr_dv.dv_xname, rv);
@@ -398,7 +398,7 @@
 
 	amr->amr_mbox_paddr = amr->amr_dmamap->dm_segs[0].ds_addr;
 	amr->amr_sgls_paddr = (amr->amr_mbox_paddr + 0x1fff) & ~0x1fff;
-	amr->amr_sgls = (struct amr_sgentry *)((caddr_t)amr->amr_mbox +
+	amr->amr_sgls = (struct amr_sgentry *)((char *)amr->amr_mbox +
 	    amr->amr_sgls_paddr - amr->amr_dmamap->dm_segs[0].ds_addr);
 
 	/*
@@ -523,7 +523,7 @@
 	if ((fl & AMRF_DMA_LOAD) != 0)
 		bus_dmamap_unload(amr->amr_dmat, amr->amr_dmamap);
 	if ((fl & AMRF_DMA_MAP) != 0)
-		bus_dmamem_unmap(amr->amr_dmat, (caddr_t)amr->amr_mbox,
+		bus_dmamem_unmap(amr->amr_dmat, (void *)amr->amr_mbox,
 		    amr->amr_dmasize);
 	if ((fl & AMRF_DMA_ALLOC) != 0)
 		bus_dmamem_free(amr->amr_dmat, &amr->amr_dmaseg, 1);
@@ -1077,7 +1077,7 @@
 		mb->mb_nsgelem = nsegs;
 		mb->mb_physaddr = htole32(amr->amr_sgls_paddr + sgloff);
 
-		sge = (struct amr_sgentry *)((caddr_t)amr->amr_sgls + sgloff);
+		sge = (struct amr_sgentry *)((char *)amr->amr_sgls + sgloff);
 		for (i = 0; i < nsegs; i++, sge++) {
 			sge->sge_addr = htole32(xfer->dm_segs[i].ds_addr);
 			sge->sge_count = htole32(xfer->dm_segs[i].ds_len);
@@ -1356,7 +1356,7 @@
 }
 
 static int
-amrioctl(dev_t dev, u_long cmd, caddr_t data, int flag,
+amrioctl(dev_t dev, u_long cmd, void *data, int flag,
     struct lwp *l)
 {
 	struct amr_softc *amr;
--- a/sys/dev/pci/atppc_puc.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/atppc_puc.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atppc_puc.c,v 1.4 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: atppc_puc.c,v 1.4.26.1 2007/03/12 05:55:10 rmind Exp $ */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include "opt_atppc.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atppc_puc.c,v 1.4 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atppc_puc.c,v 1.4.26.1 2007/03/12 05:55:10 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -76,9 +76,9 @@
 	u_int8_t);
 static int atppc_puc_dma_finish(struct atppc_softc *);
 static int atppc_puc_dma_abort(struct atppc_softc *);
-static int atppc_puc_dma_malloc(struct device *, caddr_t *, bus_addr_t *,
+static int atppc_puc_dma_malloc(struct device *, void **, bus_addr_t *,
 	bus_size_t);
-static void atppc_puc_dma_free(struct device *, caddr_t *, bus_addr_t *,
+static void atppc_puc_dma_free(struct device *, void **, bus_addr_t *,
 	bus_size_t);
 
 /*
@@ -210,7 +210,7 @@
 
 /* Allocate memory for DMA over PCI bus */
 int
-atppc_puc_dma_malloc(struct device *dev, caddr_t *buf, bus_addr_t *bus_addr,
+atppc_puc_dma_malloc(struct device *dev, void **buf, bus_addr_t *bus_addr,
 	bus_size_t size)
 {
 	struct atppc_puc_softc *psc = (struct atppc_puc_softc *) dev;
@@ -228,7 +228,7 @@
 
 /* Free memory allocated by atppc_isa_dma_malloc() */
 void
-atppc_puc_dma_free(struct device *dev, caddr_t *buf, bus_addr_t *bus_addr,
+atppc_puc_dma_free(struct device *dev, void **buf, bus_addr_t *bus_addr,
 	bus_size_t size)
 {
 	struct atppc_puc_softc *psc = (struct atppc_puc_softc *) dev;
--- a/sys/dev/pci/auacer.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/auacer.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: auacer.c,v 1.15 2006/11/16 01:33:08 christos Exp $	*/
+/*	$NetBSD: auacer.c,v 1.15.4.1 2007/03/12 05:55:10 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -51,7 +51,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auacer.c,v 1.15 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auacer.c,v 1.15.4.1 2007/03/12 05:55:10 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -79,7 +79,7 @@
 
 struct auacer_dma {
 	bus_dmamap_t map;
-	caddr_t addr;
+	void *addr;
 	bus_dma_segment_t segs[1];
 	int nsegs;
 	size_t size;
@@ -994,7 +994,7 @@
 
 	if ((error = bus_dmamem_map(sc->dmat, &seg, rseg,
 				    sizeof(struct auacer_cdata),
-				    (caddr_t *) &sc->sc_cdata,
+				    (void **) &sc->sc_cdata,
 				    sc->sc_dmamap_flags)) != 0) {
 		printf("%s: unable to map control data, error = %d\n",
 		    sc->sc_dev.dv_xname, error);
@@ -1022,7 +1022,7 @@
  fail_3:
 	bus_dmamap_destroy(sc->dmat, sc->sc_cddmamap);
  fail_2:
-	bus_dmamem_unmap(sc->dmat, (caddr_t) sc->sc_cdata,
+	bus_dmamem_unmap(sc->dmat, (void *) sc->sc_cdata,
 	    sizeof(struct auacer_cdata));
  fail_1:
 	bus_dmamem_free(sc->dmat, &seg, rseg);
--- a/sys/dev/pci/auich.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/auich.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: auich.c,v 1.115.4.1 2007/02/27 16:53:56 yamt Exp $	*/
+/*	$NetBSD: auich.c,v 1.115.4.2 2007/03/12 05:55:11 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2004, 2005 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.115.4.1 2007/02/27 16:53:56 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.115.4.2 2007/03/12 05:55:11 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -147,7 +147,7 @@
 
 struct auich_dma {
 	bus_dmamap_t map;
-	caddr_t addr;
+	void *addr;
 	bus_dma_segment_t segs[1];
 	int nsegs;
 	size_t size;
@@ -1422,7 +1422,7 @@
 		return EINVAL;
 	}
 
-	size = (size_t)((caddr_t)end - (caddr_t)start);
+	size = (size_t)((char *)end - (char *)start);
 
 	sc->pcmo.intr = intr;
 	sc->pcmo.arg = arg;
@@ -1458,7 +1458,7 @@
 		return EINVAL;
 	}
 
-	size = (size_t)((caddr_t)end - (caddr_t)start);
+	size = (size_t)((char *)end - (char *)start);
 
 	sc->pcmi.intr = intr;
 	sc->pcmi.arg = arg;
@@ -1573,7 +1573,7 @@
 
 	if ((error = bus_dmamem_map(sc->dmat, &seg, rseg,
 				    sizeof(struct auich_cdata),
-				    (caddr_t *) &sc->sc_cdata,
+				    (void **) &sc->sc_cdata,
 				    sc->sc_dmamap_flags)) != 0) {
 		printf("%s: unable to map control data, error = %d\n",
 		    sc->sc_dev.dv_xname, error);
@@ -1605,7 +1605,7 @@
  fail_3:
 	bus_dmamap_destroy(sc->dmat, sc->sc_cddmamap);
  fail_2:
-	bus_dmamem_unmap(sc->dmat, (caddr_t) sc->sc_cdata,
+	bus_dmamem_unmap(sc->dmat, (void *) sc->sc_cdata,
 	    sizeof(struct auich_cdata));
  fail_1:
 	bus_dmamem_free(sc->dmat, &seg, rseg);
--- a/sys/dev/pci/auixp.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/auixp.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auixp.c,v 1.21 2006/11/16 01:33:08 christos Exp $ */
+/* $NetBSD: auixp.c,v 1.21.4.1 2007/03/12 05:55:11 rmind Exp $ */
 
 /*
  * Copyright (c) 2004, 2005 Reinoud Zandijk <reinoud@netbsd.org>
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auixp.c,v 1.21 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auixp.c,v 1.21.4.1 2007/03/12 05:55:11 rmind Exp $");
 
 #include <sys/types.h>
 #include <sys/errno.h>
@@ -775,7 +775,7 @@
 	 * NOTE, we can assume its in one block since we asked for it to be in
 	 * one contiguous blob; XXX change this? XXX
 	 */
-	blocks = (size_t) (((caddr_t) end) - ((caddr_t) start)) / blksize;
+	blocks = (size_t) (((char *) end) - ((char *) start)) / blksize;
 
 	/* lookup `start' address in our list of DMA area's */
 	SLIST_FOREACH(sound_dma, &sc->sc_dma_list, dma_chain) {
@@ -850,7 +850,7 @@
 	 * NOTE, we can assume its in one block since we asked for it to be in
 	 * one contiguous blob; XXX change this? XXX
 	 */
-	blocks = (size_t) (((caddr_t) end) - ((caddr_t) start)) / blksize;
+	blocks = (size_t) (((char *) end) - ((char *) start)) / blksize;
 
 	/* lookup `start' address in our list of DMA area's */
 	SLIST_FOREACH(sound_dma, &sc->sc_dma_list, dma_chain) {
--- a/sys/dev/pci/auixpvar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/auixpvar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auixpvar.h,v 1.4 2005/12/11 12:22:48 christos Exp $*/
+/* $NetBSD: auixpvar.h,v 1.4.26.1 2007/03/12 05:55:11 rmind Exp $*/
 
 /*
  * Copyright (c) 2004, 2005 Reinoud Zandijk <reinoud@netbsd.org>
@@ -64,7 +64,7 @@
 struct auixp_dma {
 	/* bus mappings */
 	bus_dmamap_t		 map;
-	caddr_t			 addr;
+	void *			 addr;
 	bus_dma_segment_t	 segs[1];
 	int			 nsegs;
 	size_t			 size;
--- a/sys/dev/pci/autrivar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/autrivar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: autrivar.h,v 1.2 2001/11/18 17:15:48 augustss Exp $	*/
+/*	$NetBSD: autrivar.h,v 1.2.74.1 2007/03/12 05:55:11 rmind Exp $	*/
 
 /*
  * Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
@@ -33,7 +33,7 @@
  */
 struct autri_dma {
 	bus_dmamap_t		map;
-	caddr_t			addr;		/* VA */
+	void *			addr;		/* VA */
 	bus_dma_segment_t	segs[1];
 	int			nsegs;
 	size_t			size;
--- a/sys/dev/pci/auvia.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/auvia.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: auvia.c,v 1.58.4.1 2007/02/27 16:53:56 yamt Exp $	*/
+/*	$NetBSD: auvia.c,v 1.58.4.2 2007/03/12 05:55:11 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.58.4.1 2007/02/27 16:53:56 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.58.4.2 2007/03/12 05:55:11 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -71,7 +71,7 @@
 
 struct auvia_dma {
 	struct auvia_dma *next;
-	caddr_t addr;
+	void *addr;
 	size_t size;
 	bus_dmamap_t map;
 	bus_dma_segment_t seg;
--- a/sys/dev/pci/azalia.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/azalia.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: azalia.c,v 1.43.2.1 2007/02/27 16:53:56 yamt Exp $	*/
+/*	$NetBSD: azalia.c,v 1.43.2.2 2007/03/12 05:55:11 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.43.2.1 2007/02/27 16:53:56 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.43.2.2 2007/03/12 05:55:11 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -78,7 +78,7 @@
 
 typedef struct {
 	bus_dmamap_t map;
-	caddr_t addr;		/* kernel virtual address */
+	void *addr;		/* kernel virtual address */
 	bus_dma_segment_t segments[1];
 	size_t size;
 } azalia_dma_t;
@@ -181,12 +181,12 @@
 static int	azalia_codec_connect_stream(codec_t *, int, uint16_t, int);
 static int	azalia_codec_disconnect_stream(codec_t *, int);
 
-static int	azalia_widget_init(widget_t *, const codec_t *, int);
-static int	azalia_widget_init_audio(widget_t *, const codec_t *);
+static int	azalia_widget_init(widget_t *, const codec_t *, int, const char *);
+static int	azalia_widget_init_audio(widget_t *, const codec_t *, const char *);
 static int	azalia_widget_print_audio(const widget_t *, const char *, int);
 static int	azalia_widget_init_pin(widget_t *, const codec_t *);
-static int	azalia_widget_print_pin(const widget_t *);
-static int	azalia_widget_init_connection(widget_t *, const codec_t *);
+static int	azalia_widget_print_pin(const widget_t *, const char *);
+static int	azalia_widget_init_connection(widget_t *, const codec_t *, const char *);
 
 static int	azalia_stream_init(stream_t *, azalia_t *, int, int, int);
 static int	azalia_stream_delete(stream_t *, azalia_t *);
@@ -974,6 +974,8 @@
 static int
 azalia_codec_init(codec_t *this)
 {
+#define LEAD_LEN	100
+	char lead[LEAD_LEN];
 	uint32_t rev, id, result;
 	int err, addr, n, i;
 
@@ -1080,14 +1082,16 @@
 	this->comresp(this, this->audiofunc, CORB_GET_PARAMETER,
 	    COP_OUTPUT_AMPCAP, &result);
 	this->w[this->audiofunc].outamp_cap = result;
+	lead[0] = 0;
 #ifdef AZALIA_DEBUG
-	azalia_widget_print_audio(&this->w[this->audiofunc], "\t", -1);
+	snprintf(lead, LEAD_LEN, "%s:    ", XNAME(this->az));
+	azalia_widget_print_audio(&this->w[this->audiofunc], lead, -1);
 	result = this->w[this->audiofunc].inamp_cap;
-	DPRINTF(("\tinamp: mute=%u size=%u steps=%u offset=%u\n",
+	DPRINTF(("%sinamp: mute=%u size=%u steps=%u offset=%u\n", lead,
 	    (result & COP_AMPCAP_MUTE) != 0, COP_AMPCAP_STEPSIZE(result),
 	    COP_AMPCAP_NUMSTEPS(result), COP_AMPCAP_OFFSET(result)));
 	result = this->w[this->audiofunc].outamp_cap;
-	DPRINTF(("\toutamp: mute=%u size=%u steps=%u offset=%u\n",
+	DPRINTF(("%soutamp: mute=%u size=%u steps=%u offset=%u\n", lead,
 	    (result & COP_AMPCAP_MUTE) != 0, COP_AMPCAP_STEPSIZE(result),
 	    COP_AMPCAP_NUMSTEPS(result), COP_AMPCAP_OFFSET(result)));
 #endif
@@ -1097,7 +1101,7 @@
 	strlcpy(this->w[this->audiofunc].name, "hdaudio",
 	    sizeof(this->w[this->audiofunc].name));
 	FOR_EACH_WIDGET(this, i) {
-		err = azalia_widget_init(&this->w[i], this, i);
+		err = azalia_widget_init(&this->w[i], this, i, lead);
 		if (err)
 			return err;
 	}
@@ -1231,7 +1235,7 @@
 	const convgroup_t *group;
 	uint32_t bits_rates;
 	int prev_dac, prev_adc;
-	int pvariation, rvariation;
+	int variation;
 	int nbits, c, chan, i, err;
 	nid_t nid;
 
@@ -1255,7 +1259,7 @@
 		    XNAME(this->az), bits_rates);
 		return -1;
 	}
-	pvariation = group->nconv * nbits;
+	variation = group->nconv * nbits;
 
 	prev_adc = this->adcs.cur;
 	this->adcs.cur = newadc;
@@ -1277,13 +1281,13 @@
 		    XNAME(this->az), bits_rates);
 		return -1;
 	}
-	rvariation = group->nconv * nbits;
+	variation += group->nconv * nbits;
 
 	if (this->formats != NULL)
 		free(this->formats, M_DEVBUF);
 	this->nformats = 0;
-	this->formats = malloc(sizeof(struct audio_format) *
-	    (pvariation + rvariation), M_DEVBUF, M_ZERO | M_NOWAIT);
+	this->formats = malloc(sizeof(struct audio_format) * variation,
+	    M_DEVBUF, M_ZERO | M_NOWAIT);
 	if (this->formats == NULL) {
 		aprint_error("%s: out of memory in %s\n",
 		    XNAME(this->az), __func__);
@@ -1327,6 +1331,15 @@
 		azalia_widget_print_audio(&this->w[group->conv[0]], flagbuf, chan);
 	}
 
+#ifdef DIAGNOSTIC
+	if (this->nformats > variation) {
+		aprint_error("%s: Internal error: the format buffer is too small: "
+		    "nformats=%d variation=%d\n", XNAME(this->az),
+		    this->nformats, variation);
+		return ENOMEM;
+	}
+#endif
+
 	err = auconv_create_encodings(this->formats, this->nformats,
 	    &this->encodings);
 	if (err)
@@ -1383,6 +1396,7 @@
 	default:
 		f->channel_mask = 0;
 	}
+	f->frequency_type = 0;
 	if (rates & COP_PCM_R80)
 		f->frequency[f->frequency_type++] = 8000;
 	if (rates & COP_PCM_R110)
@@ -1510,7 +1524,8 @@
  * ================================================================ */
 
 static int
-azalia_widget_init(widget_t *this, const codec_t *codec, nid_t nid)
+azalia_widget_init(widget_t *this, const codec_t *codec,
+		   nid_t nid, const char *lead)
 {
 	char flagbuf[FLAGBUFLEN];
 	uint32_t result;
@@ -1535,12 +1550,12 @@
 	case COP_AWTYPE_AUDIO_OUTPUT:
 		snprintf(this->name, sizeof(this->name), "dac%2.2x", nid);
 		DPRINTF(("%s wcap=%s\n", this->name, flagbuf));
-		azalia_widget_init_audio(this, codec);
+		azalia_widget_init_audio(this, codec, lead);
 		break;
 	case COP_AWTYPE_AUDIO_INPUT:
 		snprintf(this->name, sizeof(this->name), "adc%2.2x", nid);
 		DPRINTF(("%s wcap=%s\n", this->name, flagbuf));
-		azalia_widget_init_audio(this, codec);
+		azalia_widget_init_audio(this, codec, lead);
 		break;
 	case COP_AWTYPE_AUDIO_MIXER:
 		snprintf(this->name, sizeof(this->name), "mix%2.2x", nid);
@@ -1555,7 +1570,7 @@
 		snprintf(this->name, sizeof(this->name), "%s%2.2x",
 		    pin_colors[this->d.pin.color], nid);
 		DPRINTF(("%s wcap=%s\n", this->name, flagbuf));
-		azalia_widget_print_pin(this);
+		azalia_widget_print_pin(this, lead);
 		break;
 	case COP_AWTYPE_POWER:
 		snprintf(this->name, sizeof(this->name), "pow%2.2x", nid);
@@ -1568,7 +1583,7 @@
 		    COP_VOLUME_KNOB_CAPABILITIES, &result);
 		if (!err) {
 			this->d.volume.cap = result;
-			DPRINTF(("\tdelta=%d steps=%d\n",
+			DPRINTF(("%sdelta=%d steps=%d\n", lead,
 			    !!(result & COP_VKCAP_DELTA),
 			    COP_VKCAP_NUMSTEPS(result)));
 		}
@@ -1582,7 +1597,7 @@
 		DPRINTF(("%s wcap=%s\n", this->name, flagbuf));
 		break;
 	}
-	azalia_widget_init_connection(this, codec);
+	azalia_widget_init_connection(this, codec, lead);
 
 	/* amplifier information */
 	if (this->widgetcap & COP_AWCAP_INAMP) {
@@ -1591,8 +1606,8 @@
 			    COP_INPUT_AMPCAP, &this->inamp_cap);
 		else
 			this->inamp_cap = codec->w[codec->audiofunc].inamp_cap;
-		DPRINTF(("\tinamp: mute=%u size=%u steps=%u offset=%u\n",
-		    (this->inamp_cap & COP_AMPCAP_MUTE) != 0,
+		DPRINTF(("%sinamp: mute=%u size=%u steps=%u offset=%u\n",
+		    lead, (this->inamp_cap & COP_AMPCAP_MUTE) != 0,
 		    COP_AMPCAP_STEPSIZE(this->inamp_cap),
 		    COP_AMPCAP_NUMSTEPS(this->inamp_cap),
 		    COP_AMPCAP_OFFSET(this->inamp_cap)));
@@ -1603,8 +1618,8 @@
 			    COP_OUTPUT_AMPCAP, &this->outamp_cap);
 		else
 			this->outamp_cap = codec->w[codec->audiofunc].outamp_cap;
-		DPRINTF(("\toutamp: mute=%u size=%u steps=%u offset=%u\n",
-		    (this->outamp_cap & COP_AMPCAP_MUTE) != 0,
+		DPRINTF(("%soutamp: mute=%u size=%u steps=%u offset=%u\n",
+		    lead, (this->outamp_cap & COP_AMPCAP_MUTE) != 0,
 		    COP_AMPCAP_STEPSIZE(this->outamp_cap),
 		    COP_AMPCAP_NUMSTEPS(this->outamp_cap),
 		    COP_AMPCAP_OFFSET(this->outamp_cap)));
@@ -1615,7 +1630,7 @@
 }
 
 static int
-azalia_widget_init_audio(widget_t *this, const codec_t *codec)
+azalia_widget_init_audio(widget_t *this, const codec_t *codec, const char *lead)
 {
 	uint32_t result;
 	int err;
@@ -1652,7 +1667,7 @@
 		    codec->w[codec->audiofunc].d.audio.bits_rates;
 	}
 #ifdef AZALIA_DEBUG
-	azalia_widget_print_audio(this, "\t", -1);
+	azalia_widget_print_audio(this, lead, -1);
 #endif
 	return 0;
 }
@@ -1707,11 +1722,11 @@
 }
 
 static int
-azalia_widget_print_pin(const widget_t *this)
+azalia_widget_print_pin(const widget_t *this, const char *lead)
 {
 	char flagbuf[FLAGBUFLEN];
 
-	DPRINTF(("\tpin config; device=%s color=%s assoc=%d seq=%d",
+	DPRINTF(("%spin config; device=%s color=%s assoc=%d seq=%d", lead,
 	    pin_devices[this->d.pin.device], pin_colors[this->d.pin.color],
 	    this->d.pin.association, this->d.pin.sequence));
 	bitmask_snprintf(this->d.pin.cap, "\20\021EAPD\07BALANCE\06INPUT"
@@ -1722,7 +1737,8 @@
 }
 
 static int
-azalia_widget_init_connection(widget_t *this, const codec_t *codec)
+azalia_widget_init_connection(widget_t *this, const codec_t *codec,
+			      const char *lead)
 {
 	uint32_t result;
 	int err;
@@ -1770,7 +1786,7 @@
 		}
 	}
 	if (length > 0) {
-		DPRINTF(("\tconnections=0x%x", this->connections[0]));
+		DPRINTF(("%sconnections=0x%x", lead, this->connections[0]));
 		for (i = 1; i < length; i++) {
 			DPRINTF((",0x%x", this->connections[i]));
 		}
@@ -1870,7 +1886,7 @@
 
 	/* setup BDL */
 	dmaaddr = AZALIA_DMA_DMAADDR(&this->buffer);
-	this->dmaend = dmaaddr + ((caddr_t)end - (caddr_t)start);
+	this->dmaend = dmaaddr + ((char *)end - (char *)start);
 	bdlist = (bdlist_entry_t*)this->bdlist.addr;
 	for (index = 0; index < HDA_BDL_MAX; index++) {
 		bdlist[index].low = dmaaddr;
@@ -1893,7 +1909,7 @@
 	ctl2 = STR_READ_1(this, CTL2);
 	STR_WRITE_1(this, CTL2,
 	    (ctl2 & ~HDA_SD_CTL2_STRM) | (this->number << HDA_SD_CTL2_STRM_SHIFT));
-	STR_WRITE_4(this, CBL, ((caddr_t)end - (caddr_t)start));
+	STR_WRITE_4(this, CBL, ((char *)end - (char *)start));
 
 	STR_WRITE_2(this, FMT, fmt);
 
--- a/sys/dev/pci/azalia_codec.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/azalia_codec.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: azalia_codec.c,v 1.28.2.1 2007/02/27 16:53:57 yamt Exp $	*/
+/*	$NetBSD: azalia_codec.c,v 1.28.2.2 2007/03/12 05:55:12 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: azalia_codec.c,v 1.28.2.1 2007/02/27 16:53:57 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: azalia_codec.c,v 1.28.2.2 2007/03/12 05:55:12 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -110,19 +110,29 @@
 static int	alc260_set_port(codec_t *, mixer_ctrl_t *);
 static int	alc260_get_port(codec_t *, mixer_ctrl_t *);
 static int	alc260_unsol_event(codec_t *, int);
+static int	alc861_init_dacgroup(codec_t *);
+static int	alc861vdgr_init_dacgroup(codec_t *);
 static int	alc880_init_dacgroup(codec_t *);
 static int	alc880_mixer_init(codec_t *);
 static int	alc882_init_dacgroup(codec_t *);
 static int	alc882_mixer_init(codec_t *);
 static int	alc882_set_port(codec_t *, mixer_ctrl_t *);
 static int	alc882_get_port(codec_t *, mixer_ctrl_t *);
+static int	alc883_init_dacgroup(codec_t *);
+static int	alc885_init_dacgroup(codec_t *);
+static int	alc888_init_dacgroup(codec_t *);
 static int	ad1981hd_init_widget(const codec_t *, widget_t *, nid_t);
 static int	ad1981hd_mixer_init(codec_t *);
+static int	ad1988_init_dacgroup(codec_t *);
 static int	cmi9880_init_dacgroup(codec_t *);
 static int	cmi9880_mixer_init(codec_t *);
 static int	stac9221_init_dacgroup(codec_t *);
 static int	stac9221_mixer_init(codec_t *);
+static int	stac9221_gpio_unmute(codec_t *, int);
 static int	stac9220_mixer_init(codec_t *);
+static int	stac9220_set_port(codec_t *, mixer_ctrl_t *);
+static int	stac9220_get_port(codec_t *, mixer_ctrl_t *);
+static int	stac9220_unsol_event(codec_t *, int);
 
 
 int
@@ -151,6 +161,20 @@
 		this->unsol_event = alc260_unsol_event;
 		extra_size = 1;
 		break;
+	case 0x10ec0262:
+		this->name = "Realtek ALC262";
+		break;
+	case 0x10ec0268:
+		this->name = "Realtek ALC268";
+		break;
+	case 0x10ec0861:
+		this->name = "Realtek ALC861";
+		this->init_dacgroup = alc861_init_dacgroup;
+		break;
+	case 0x10ec0862:
+		this->name = "Realtek ALC861-VD-GR";
+		this->init_dacgroup = alc861vdgr_init_dacgroup;
+		break;
 	case 0x10ec0880:
 		this->name = "Realtek ALC880";
 		this->init_dacgroup = alc880_init_dacgroup;
@@ -163,6 +187,18 @@
 		this->get_port = alc882_get_port;
 		this->set_port = alc882_set_port;
 		break;
+	case 0x10ec0883:
+		this->name = "Realtek ALC883";
+		this->init_dacgroup = alc883_init_dacgroup;
+		break;
+	case 0x10ec0885:
+		this->name = "Realtek ALC885";
+		this->init_dacgroup = alc885_init_dacgroup;
+		break;
+	case 0x10ec0888:
+		this->name = "Realtek ALC888";
+		this->init_dacgroup = alc888_init_dacgroup;
+		break;
 	case 0x11d41981:
 		/* http://www.analog.com/en/prod/0,2877,AD1981HD,00.html */
 		this->name = "Analog Devices AD1981HD";
@@ -173,6 +209,16 @@
 		/* http://www.analog.com/en/prod/0,2877,AD1983,00.html */
 		this->name = "Analog Devices AD1983";
 		break;
+	case 0x11d41988:
+		/* http://www.analog.com/en/prod/0,2877,AD1988A,00.html */
+		this->name = "Analog Devices AD1988A";
+		this->init_dacgroup = ad1988_init_dacgroup;
+		break;
+	case 0x11d4198b:
+		/* http://www.analog.com/en/prod/0,2877,AD1988B,00.html */
+		this->name = "Analog Devices AD1988B";
+		this->init_dacgroup = ad1988_init_dacgroup;
+		break;
 	case 0x434d4980:
 		this->name = "CMedia CMI9880";
 		this->init_dacgroup = cmi9880_init_dacgroup;
@@ -190,6 +236,9 @@
 	case 0x83847690:
 		this->name = "Sigmatel STAC9220";
 		this->mixer_init = stac9220_mixer_init;
+		this->set_port = stac9220_set_port;
+		this->unsol_event = stac9220_unsol_event;
+		extra_size = 1;
 		break;
 	}
 	if (extra_size > 0) {
@@ -377,6 +426,8 @@
  * Generic mixer functions
  * ---------------------------------------------------------------- */
 
+#define GMIDPRINTF(x)	do {} while (0/*CONSTCOND*/)
+
 static int
 generic_mixer_init(codec_t *this)
 {
@@ -460,7 +511,7 @@
 		/* selector */
 		if (w->type != COP_AWTYPE_AUDIO_MIXER && w->nconnections >= 2) {
 			MIXER_REG_PROLOG;
-			DPRINTF(("%s: selector %s\n", __func__, w->name));
+			GMIDPRINTF(("%s: selector %s\n", __func__, w->name));
 			snprintf(d->label.name, sizeof(d->label.name),
 			    "%s.source", w->name);
 			d->type = AUDIO_MIXER_ENUM;
@@ -474,7 +525,7 @@
 			for (j = 0, k = 0; j < w->nconnections && k < 32; j++) {
 				if (!VALID_WIDGET_NID(w->connections[j], this))
 					continue;
-				DPRINTF(("%s: selector %d=%s\n", __func__, j,
+				GMIDPRINTF(("%s: selector %d=%s\n", __func__, j,
 				    this->w[w->connections[j]].name));
 				d->un.e.member[k].ord = j;
 				strlcpy(d->un.e.member[k].label.name,
@@ -490,7 +541,7 @@
 		if (w->widgetcap & COP_AWCAP_OUTAMP &&
 		    w->outamp_cap & COP_AMPCAP_MUTE) {
 			MIXER_REG_PROLOG;
-			DPRINTF(("%s: output mute %s\n", __func__, w->name));
+			GMIDPRINTF(("%s: output mute %s\n", __func__, w->name));
 			snprintf(d->label.name, sizeof(d->label.name),
 			    "%s.mute", w->name);
 			d->type = AUDIO_MIXER_ENUM;
@@ -517,7 +568,7 @@
 		if (w->widgetcap & COP_AWCAP_OUTAMP
 		    && COP_AMPCAP_NUMSTEPS(w->outamp_cap)) {
 			MIXER_REG_PROLOG;
-			DPRINTF(("%s: output gain %s\n", __func__, w->name));
+			GMIDPRINTF(("%s: output gain %s\n", __func__, w->name));
 			snprintf(d->label.name, sizeof(d->label.name),
 			    "%s", w->name);
 			d->type = AUDIO_MIXER_VALUE;
@@ -545,7 +596,7 @@
 		/* input mute */
 		if (w->widgetcap & COP_AWCAP_INAMP &&
 		    w->inamp_cap & COP_AMPCAP_MUTE) {
-			DPRINTF(("%s: input mute %s\n", __func__, w->name));
+			GMIDPRINTF(("%s: input mute %s\n", __func__, w->name));
 			if (w->type != COP_AWTYPE_AUDIO_SELECTOR &&
 			    w->type != COP_AWTYPE_AUDIO_MIXER) {
 				MIXER_REG_PROLOG;
@@ -572,7 +623,7 @@
 					MIXER_REG_PROLOG;
 					if (!VALID_WIDGET_NID(w->connections[j], this))
 						continue;
-					DPRINTF(("%s: input mute %s.%s\n", __func__,
+					GMIDPRINTF(("%s: input mute %s.%s\n", __func__,
 					    w->name, this->w[w->connections[j]].name));
 					snprintf(d->label.name, sizeof(d->label.name),
 					    "%s.%s.mute", w->name,
@@ -600,7 +651,7 @@
 		/* input gain */
 		if (w->widgetcap & COP_AWCAP_INAMP
 		    && COP_AMPCAP_NUMSTEPS(w->inamp_cap)) {
-			DPRINTF(("%s: input gain %s\n", __func__, w->name));
+			GMIDPRINTF(("%s: input gain %s\n", __func__, w->name));
 			if (w->type != COP_AWTYPE_AUDIO_SELECTOR &&
 			    w->type != COP_AWTYPE_AUDIO_MIXER) {
 				MIXER_REG_PROLOG;
@@ -630,7 +681,7 @@
 					MIXER_REG_PROLOG;
 					if (!VALID_WIDGET_NID(w->connections[j], this))
 						continue;
-					DPRINTF(("%s: input gain %s.%s\n", __func__,
+					GMIDPRINTF(("%s: input gain %s.%s\n", __func__,
 					    w->name, this->w[w->connections[j]].name));
 					snprintf(d->label.name, sizeof(d->label.name),
 					    "%s.%s", w->name,
@@ -663,7 +714,7 @@
 		    w->d.pin.cap & COP_PINCAP_OUTPUT &&
 		    w->d.pin.cap & COP_PINCAP_INPUT) {
 			MIXER_REG_PROLOG;
-			DPRINTF(("%s: pin dir %s\n", __func__, w->name));
+			GMIDPRINTF(("%s: pin dir %s\n", __func__, w->name));
 			snprintf(d->label.name, sizeof(d->label.name),
 			    "%s.dir", w->name);
 			d->type = AUDIO_MIXER_ENUM;
@@ -683,7 +734,7 @@
 		if (w->type == COP_AWTYPE_PIN_COMPLEX &&
 		    w->d.pin.cap & COP_PINCAP_HEADPHONE) {
 			MIXER_REG_PROLOG;
-			DPRINTF(("%s: hpboost %s\n", __func__, w->name));
+			GMIDPRINTF(("%s: hpboost %s\n", __func__, w->name));
 			snprintf(d->label.name, sizeof(d->label.name),
 			    "%s.boost", w->name);
 			d->type = AUDIO_MIXER_ENUM;
@@ -702,7 +753,7 @@
 		if (w->type == COP_AWTYPE_PIN_COMPLEX &&
 		    w->d.pin.cap & COP_PINCAP_EAPD) {
 			MIXER_REG_PROLOG;
-			DPRINTF(("%s: eapd %s\n", __func__, w->name));
+			GMIDPRINTF(("%s: eapd %s\n", __func__, w->name));
 			snprintf(d->label.name, sizeof(d->label.name),
 			    "%s.eapd", w->name);
 			d->type = AUDIO_MIXER_ENUM;
@@ -721,7 +772,7 @@
 		if (w->type == COP_AWTYPE_PIN_COMPLEX &&
 		    w->d.pin.cap & COP_PINCAP_BALANCE) {
 			MIXER_REG_PROLOG;
-			DPRINTF(("%s: balance %s\n", __func__, w->name));
+			GMIDPRINTF(("%s: balance %s\n", __func__, w->name));
 			snprintf(d->label.name, sizeof(d->label.name),
 			    "%s.balance", w->name);
 			d->type = AUDIO_MIXER_ENUM;
@@ -744,7 +795,7 @@
 
 		if (w->widgetcap & COP_AWCAP_LRSWAP) {
 			MIXER_REG_PROLOG;
-			DPRINTF(("%s: lrswap %s\n", __func__, w->name));
+			GMIDPRINTF(("%s: lrswap %s\n", __func__, w->name));
 			snprintf(d->label.name, sizeof(d->label.name),
 			    "%s.lrswap", w->name);
 			d->type = AUDIO_MIXER_ENUM;
@@ -769,7 +820,7 @@
 		if (w->type == COP_AWTYPE_VOLUME_KNOB &&
 		    w->d.volume.cap & COP_VKCAP_DELTA) {
 			MIXER_REG_PROLOG;
-			DPRINTF(("%s: volume knob %s\n", __func__, w->name));
+			GMIDPRINTF(("%s: volume knob %s\n", __func__, w->name));
 			strlcpy(d->label.name, w->name, sizeof(d->label.name));
 			d->type = AUDIO_MIXER_VALUE;
 			d->mixer_class = AZ_CLASS_OUTPUT;
@@ -785,7 +836,7 @@
 	/* if the codec has multiple DAC groups, create "playback.mode" */
 	if (this->dacs.ngroups > 1) {
 		MIXER_REG_PROLOG;
-		DPRINTF(("%s: create playback.mode\n", __func__));
+		GMIDPRINTF(("%s: create playback.mode\n", __func__));
 		strlcpy(d->label.name, AudioNmode, sizeof(d->label.name));
 		d->type = AUDIO_MIXER_ENUM;
 		d->mixer_class = AZ_CLASS_PLAYBACK;
@@ -807,7 +858,7 @@
 	/* if the codec has multiple ADC groups, create "record.mode" */
 	if (this->adcs.ngroups > 1) {
 		MIXER_REG_PROLOG;
-		DPRINTF(("%s: create record.mode\n", __func__));
+		GMIDPRINTF(("%s: create record.mode\n", __func__));
 		strlcpy(d->label.name, AudioNmode, sizeof(d->label.name));
 		d->type = AUDIO_MIXER_ENUM;
 		d->mixer_class = AZ_CLASS_RECORD;
@@ -1915,6 +1966,46 @@
 }
 
 /* ----------------------------------------------------------------
+ * Realtek ALC861
+ * ---------------------------------------------------------------- */
+
+static int
+alc861_init_dacgroup(codec_t *this)
+{
+	static const convgroupset_t dacs = {
+		-1, 2,
+		{{4, {0x03, 0x04, 0x05, 0x06}}, /* analog 8ch */
+		 {1, {0x07}}}};	/* digital */
+	static const convgroupset_t adcs = {
+		-1, 1,
+		{{1, {0x08}}}};	/* analog 2ch */
+
+	this->dacs = dacs;
+	this->adcs = adcs;
+	return 0;
+}
+
+/* ----------------------------------------------------------------
+ * Realtek ALC861-VD-GR
+ * ---------------------------------------------------------------- */
+
+static int
+alc861vdgr_init_dacgroup(codec_t *this)
+{
+	static const convgroupset_t dacs = {
+		-1, 2,
+		{{4, {0x02, 0x03, 0x04, 0x05}}, /* analog 8ch */
+		 {1, {0x06}}}};	/* digital */
+	static const convgroupset_t adcs = {
+		-1, 1,
+		{{1, {0x09}}}};	/* analog 2ch */
+
+	this->dacs = dacs;
+	this->adcs = adcs;
+	return 0;
+}
+
+/* ----------------------------------------------------------------
  * Realtek ALC880
  * ---------------------------------------------------------------- */
 
@@ -2349,6 +2440,73 @@
 }
 
 /* ----------------------------------------------------------------
+ * Realtek ALC883
+ * ---------------------------------------------------------------- */
+
+static int
+alc883_init_dacgroup(codec_t *this)
+{
+	static const convgroupset_t dacs = {
+		-1, 2,
+		{{4, {0x02, 0x03, 0x04, 0x05}}, /* analog 8ch */
+		 {1, {0x06}}}};	/* digital */
+		/* don't support for 0x25 dac */
+	static const convgroupset_t adcs = {
+		-1, 2,
+		{{2, {0x08, 0x09}},	/* analog 4ch */
+		 {1, {0x0a}}}};	/* digital */
+
+	this->dacs = dacs;
+	this->adcs = adcs;
+	return 0;
+}
+
+/* ----------------------------------------------------------------
+ * Realtek ALC885
+ * ---------------------------------------------------------------- */
+
+static int
+alc885_init_dacgroup(codec_t *this)
+{
+	static const convgroupset_t dacs = {
+		-1, 2,
+		{{4, {0x02, 0x03, 0x04, 0x05}}, /* analog 8ch */
+		 {1, {0x06}}}};	/* digital */
+		/* don't support for 0x25 dac */
+	static const convgroupset_t adcs = {
+		-1, 2,
+		{{3, {0x07, 0x08, 0x09}},	/* analog 6ch */
+		 {1, {0x0a}}}};	/* digital */
+
+	this->dacs = dacs;
+	this->adcs = adcs;
+	return 0;
+}
+
+/* ----------------------------------------------------------------
+ * Realtek ALC888
+ * ---------------------------------------------------------------- */
+
+static int
+alc888_init_dacgroup(codec_t *this)
+{
+	static const convgroupset_t dacs = {
+		-1, 2,
+		{{4, {0x02, 0x03, 0x04, 0x05}}, /* analog 8ch */
+		 {1, {0x06}}}};	/* digital */
+		/* don't support for 0x25 dac */
+		/* ALC888S has another SPDIF-out 0x10 */
+	static const convgroupset_t adcs = {
+		-1, 2,
+		{{2, {0x08, 0x09}},	/* analog 4ch */
+		 {1, {0x0a}}}};	/* digital */
+
+	this->dacs = dacs;
+	this->adcs = adcs;
+	return 0;
+}
+
+/* ----------------------------------------------------------------
  * Analog Devices AD1981HD
  * ---------------------------------------------------------------- */
 
@@ -2411,6 +2569,28 @@
 }
 
 /* ----------------------------------------------------------------
+ * Analog Devices AD1988A/AD1988B
+ * ---------------------------------------------------------------- */
+
+static int
+ad1988_init_dacgroup(codec_t *this)
+{
+	static const convgroupset_t dacs = {
+		-1, 3,
+		{{4, {0x03, 0x04, 0x05, 0x06}},	/* analog 8ch */
+		 {1, {0x02}},	/* digital */
+		 {1, {0x0a}}}};	/* another analog */
+	static const convgroupset_t adcs = {
+		-1, 2,
+		{{2, {0x08, 0x09, 0x0f}}, /* analog 6ch */
+		 {1, {0x07}}}};	/* digital */
+
+	this->dacs = dacs;
+	this->adcs = adcs;
+	return 0;
+}
+
+/* ----------------------------------------------------------------
  * CMedia CMI9880
  * ---------------------------------------------------------------- */
 
@@ -2539,22 +2719,29 @@
 	err = generic_mixer_init(this);
 	if (err)
 		return err;
-#if 0
-	if (this->subid == STAC9221_MAC) {
-		uint32_t data, mask, dir;
-		this->comresp(this, 0, CORB_GET_GPIO_DATA, 0, &data);
-		this->comresp(this, 0, CORB_GET_GPIO_ENABLE_MASK, 0, &mask);
-		this->comresp(this, 0, CORB_GET_GPIO_DIRECTION, 0, &dir);
-		data |= 0x3;
-		mask |= 0x3;
-		dir |= 0x3;
-		this->comresp(this, 0, 0x7e7, 0, NULL);
-		this->comresp(this, 0, CORB_SET_GPIO_ENABLE_MASK, mask, NULL);
-		this->comresp(this, 0, CORB_SET_GPIO_DIRECTION, dir, NULL);
-		DELAY(1000);
-		this->comresp(this, 0, CORB_SET_GPIO_DATA, data, NULL);
+	if (false && this->subid == STAC9221_MAC) {
+		stac9221_gpio_unmute(this, 0);
+		stac9221_gpio_unmute(this, 1);
 	}
-#endif
+	return 0;
+}
+
+static int
+stac9221_gpio_unmute(codec_t *this, int pin)
+{
+	uint32_t data, mask, dir;
+
+	this->comresp(this, 0, CORB_GET_GPIO_DATA, 0, &data);
+	this->comresp(this, 0, CORB_GET_GPIO_ENABLE_MASK, 0, &mask);
+	this->comresp(this, 0, CORB_GET_GPIO_DIRECTION, 0, &dir);
+	data &= ~(1 << pin);
+	mask |= 1 << pin;
+	dir |= 1 << pin;
+	this->comresp(this, 0, 0x7e7, 0, NULL);
+	this->comresp(this, 0, CORB_SET_GPIO_ENABLE_MASK, mask, NULL);
+	this->comresp(this, 0, CORB_SET_GPIO_DIRECTION, dir, NULL);
+	DELAY(1000);
+	this->comresp(this, 0, CORB_SET_GPIO_DATA, data, NULL);
 	return 0;
 }
 
@@ -2606,6 +2793,7 @@
 stac9220_mixer_init(codec_t *this)
 {
 	mixer_ctrl_t mc;
+	uint32_t value;
 
 	this->nmixers = sizeof(stac9220_mixer_items) / sizeof(mixer_item_t);
 	this->mixers = malloc(sizeof(mixer_item_t) * this->nmixers,
@@ -2633,5 +2821,110 @@
 	mc.un.value.level[1] = mc.un.value.level[0];
 	generic_mixer_set(this, 0x0c, MI_TARGET_OUTAMP, &mc);
 
+#define STAC9220_DELL_INSPIRON9400_ID	0x01cd1028
+#define STAC9220_DELL_640M_ID		0x01d81028
+#define STAC9220_EVENT_HP	0
+#define STAC9220_EXTRA_MASTER	0
+#define STAC9220_NID_MASTER	0x0b
+#define STAC9220_NID_HP		0x0d
+	if (false && (this->subid == STAC9220_DELL_INSPIRON9400_ID ||
+		      this->subid == STAC9220_DELL_640M_ID)) {
+		/* setup a unsolicited event for the headphones */
+		this->comresp(this, STAC9220_NID_HP, CORB_SET_UNSOLICITED_RESPONSE,
+		    CORB_UNSOL_ENABLE | STAC9220_EVENT_HP, NULL);
+		this->extra[STAC9220_EXTRA_MASTER] = 0; /* unmute */
+		/* If the headphone presents, mute the internal speaker */
+		this->comresp(this, STAC9220_NID_HP, CORB_GET_PIN_SENSE, 0, &value);
+		mc.un.ord = value & CORB_PS_PRESENSE ? 1 : 0;
+		generic_mixer_set(this, STAC9220_NID_MASTER, MI_TARGET_OUTAMP, &mc);
+		this->get_port = stac9220_get_port;
+	}
 	return 0;
 }
+
+static int
+stac9220_set_port(codec_t *this, mixer_ctrl_t *mc)
+{
+	const mixer_item_t *m;
+	uint32_t value;
+	int err;
+
+	if (mc->dev >= this->nmixers)
+		return ENXIO;
+	m = &this->mixers[mc->dev];
+	if (mc->type != m->devinfo.type)
+		return EINVAL;
+	if (mc->type == AUDIO_MIXER_CLASS)
+		return 0;
+	if ((this->subid == STAC9220_DELL_INSPIRON9400_ID ||
+	     this->subid == STAC9220_DELL_640M_ID) &&
+	    m->nid == STAC9220_NID_MASTER &&
+	    m->target == MI_TARGET_OUTAMP && mc->type == AUDIO_MIXER_ENUM) {
+		if (mc->un.ord != 0 && mc->un.ord != 1)
+			return EINVAL;
+		this->extra[STAC9220_EXTRA_MASTER] = mc->un.ord;
+		err = this->comresp(this, STAC9220_NID_HP,
+		    CORB_GET_PIN_SENSE, 0, &value);
+		if (err)
+			return err;
+		if (!(value & CORB_PS_PRESENSE)) {
+			return generic_mixer_set(this, m->nid, m->target, mc);
+		}
+		return 0;
+	}
+	return generic_mixer_set(this, m->nid, m->target, mc);
+}
+
+static int
+stac9220_get_port(codec_t *this, mixer_ctrl_t *mc)
+{
+	const mixer_item_t *m;
+
+	if (mc->dev >= this->nmixers)
+		return ENXIO;
+	m = &this->mixers[mc->dev];
+	mc->type = m->devinfo.type;
+	if (mc->type == AUDIO_MIXER_CLASS)
+		return 0;
+	if ((this->subid == STAC9220_DELL_INSPIRON9400_ID ||
+	     this->subid == STAC9220_DELL_640M_ID) &&
+	    m->nid == STAC9220_NID_MASTER &&
+	    m->target == MI_TARGET_OUTAMP && mc->type == AUDIO_MIXER_ENUM) {
+		mc->un.ord = this->extra[STAC9220_EXTRA_MASTER];
+		return 0;
+	}
+	return generic_mixer_get(this, m->nid, m->target, mc);
+}
+
+static int
+stac9220_unsol_event(codec_t *this, int tag)
+{
+	int err;
+	uint32_t value;
+	mixer_ctrl_t mc;
+
+	switch (tag) {
+	case STAC9220_EVENT_HP:
+		err = this->comresp(this, STAC9220_NID_HP,
+		    CORB_GET_PIN_SENSE, 0, &value);
+		if (err)
+			break;
+		mc.dev = -1;
+		mc.type = AUDIO_MIXER_ENUM;
+		if (value & CORB_PS_PRESENSE) {
+			DPRINTF(("%s: headphone has been inserted.\n", __func__));
+			mc.un.ord = 1; /* mute */
+			generic_mixer_set(this, STAC9220_NID_MASTER,
+			    MI_TARGET_OUTAMP, &mc);
+		} else {
+			DPRINTF(("%s: headphone has been pulled out.\n", __func__));
+			mc.un.ord = this->extra[ALC260_EXTRA_MASTER];
+			generic_mixer_set(this, STAC9220_NID_MASTER,
+			    MI_TARGET_OUTAMP, &mc);
+		}
+		break;
+	default:
+		printf("%s: unknown tag: %d\n", __func__, tag);
+	}
+	return 0;
+}
--- a/sys/dev/pci/bktr/bktr_core.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/bktr/bktr_core.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,6 +1,6 @@
 /* $SourceForge: bktr_core.c,v 1.6 2003/03/11 23:11:22 thomasklausner Exp $ */
 
-/*	$NetBSD: bktr_core.c,v 1.41 2007/02/09 21:55:29 ad Exp $	*/
+/*	$NetBSD: bktr_core.c,v 1.41.2.1 2007/03/12 05:56:45 rmind Exp $	*/
 /* $FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp$ */
 
 /*
@@ -98,7 +98,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bktr_core.c,v 1.41 2007/02/09 21:55:29 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bktr_core.c,v 1.41.2.1 2007/03/12 05:56:45 rmind Exp $");
 
 #include "opt_bktr.h"		/* Include any kernel config options */
 
@@ -453,7 +453,7 @@
 /*
  * ioctls common to both video & tuner.
  */
-static int	common_ioctl(bktr_ptr_t bktr, ioctl_cmd_t cmd, caddr_t arg);
+static int	common_ioctl(bktr_ptr_t bktr, ioctl_cmd_t cmd, void *arg);
 
 
 #if !defined(BKTR_USE_FREEBSD_SMBUS)
@@ -566,7 +566,7 @@
 	if (sbuf != 0) {
 		bktr->bigbuf = sbuf;
 		bktr->alloc_pages = BROOKTREE_ALLOC_PAGES;
-		bzero((caddr_t) bktr->bigbuf, BROOKTREE_ALLOC);
+		bzero((void *) bktr->bigbuf, BROOKTREE_ALLOC);
 	} else {
 		bktr->alloc_pages = 0;
 	}
@@ -1082,8 +1082,8 @@
 	bktr->vbi_sequence_number = 0;
 	bktr->vbi_read_blocked = FALSE;
 
-	bzero((caddr_t) bktr->vbibuffer, VBI_BUFFER_SIZE);
-	bzero((caddr_t) bktr->vbidata,  VBI_DATA_SIZE);
+	bzero((void *) bktr->vbibuffer, VBI_BUFFER_SIZE);
+	bzero((void *) bktr->vbidata,  VBI_DATA_SIZE);
 
 	return(0);
 }
@@ -1217,7 +1217,7 @@
 
 	status = tsleep(BKTR_SLEEP, BKTRPRI, "captur", 0);
 	if (!status)		/* successful capture */
-		status = uiomove((caddr_t)bktr->bigbuf, count, uio);
+		status = uiomove((void *)bktr->bigbuf, count, uio);
 	else
 		printf ("%s: read: tsleep error %d\n",
 			bktr_name(bktr), status);
@@ -1267,11 +1267,11 @@
 		/* We need to wrap around */
 
 		readsize2 = VBI_BUFFER_SIZE - bktr->vbistart;
-		status = uiomove((caddr_t)bktr->vbibuffer + bktr->vbistart, readsize2, uio);
-		status += uiomove((caddr_t)bktr->vbibuffer, (readsize - readsize2), uio);
+		status = uiomove((char *)bktr->vbibuffer + bktr->vbistart, readsize2, uio);
+		status += uiomove((char *)bktr->vbibuffer, (readsize - readsize2), uio);
 	} else {
 		/* We do not need to wrap around */
-		status = uiomove((caddr_t)bktr->vbibuffer + bktr->vbistart, readsize, uio);
+		status = uiomove((char *)bktr->vbibuffer + bktr->vbistart, readsize, uio);
 	}
 
 	/* Update the number of bytes left to read */
@@ -1292,10 +1292,10 @@
  */
 #ifdef __FreeBSD__
 int
-video_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thread* td)
+video_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, void *arg, struct thread* td)
 #else
 int
-video_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg,
+video_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, void *arg,
     struct lwp* l)
 #endif
 {
@@ -1915,10 +1915,10 @@
  */
 #ifdef __FreeBSD__
 int
-tuner_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thread* td)
+tuner_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, void *arg, struct thread* td)
 #else
 int
-tuner_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg,
+tuner_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, void *arg,
     struct lwp* l)
 #endif
 {
@@ -2330,7 +2330,7 @@
  * common ioctls
  */
 static int
-common_ioctl(bktr_ptr_t bktr, ioctl_cmd_t cmd, caddr_t arg)
+common_ioctl(bktr_ptr_t bktr, ioctl_cmd_t cmd, void *arg)
 {
         int                           pixfmt;
 	unsigned int	              temp;
@@ -3647,7 +3647,7 @@
 
 	/*  If requested, clear out capture buf first  */
 	if (bktr->clr_on_start && (bktr->video.addr == 0)) {
-		bzero((caddr_t)bktr->bigbuf,
+		bzero((void *)bktr->bigbuf,
 		      (size_t)bktr->rows * bktr->cols * bktr->frames *
 			pixfmt_table[bktr->pixfmt].public.Bpp);
 	}
--- a/sys/dev/pci/bktr/bktr_core.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/bktr/bktr_core.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,6 +1,6 @@
 /* $SourceForge: bktr_core.h,v 1.3 2003/03/11 23:11:23 thomasklausner Exp $ */
 
-/*	$NetBSD: bktr_core.h,v 1.8 2006/09/03 19:06:32 bouyer Exp $	*/
+/*	$NetBSD: bktr_core.h,v 1.8.8.1 2007/03/12 05:56:45 rmind Exp $	*/
 /* $FreeBSD: src/sys/dev/bktr/bktr_core.h,v 1.4 2000/06/26 09:41:32 roger Exp$ */
 
 /*
@@ -67,8 +67,8 @@
  *   For /dev/vbi[n] use memory address of bktr structure + 1
  *                   this is ok as the bktr structure is > 1 byte
  */
-#define BKTR_SLEEP  ((caddr_t)bktr)
-#define VBI_SLEEP   ((caddr_t)bktr + 1)
+#define BKTR_SLEEP  ((void *)bktr)
+#define VBI_SLEEP   ((char *)bktr + 1)
 
 
 /* device name for printf */
@@ -85,13 +85,13 @@
 int	video_close(bktr_ptr_t bktr);
 int	video_read(bktr_ptr_t bktr, int unit, dev_t dev, struct uio *uio);
 int	video_ioctl(bktr_ptr_t bktr, int unit,
-			ioctl_cmd_t cmd, caddr_t arg, struct lwp* pr);
+			ioctl_cmd_t cmd, void *arg, struct lwp* pr);
 
 
 int	tuner_open(bktr_ptr_t bktr);
 int	tuner_close(bktr_ptr_t bktr);
 int	tuner_ioctl(bktr_ptr_t bktr, int unit,
-			ioctl_cmd_t cmd, caddr_t arg, struct lwp* pr);
+			ioctl_cmd_t cmd, void *arg, struct lwp* pr);
 
 int	vbi_open(bktr_ptr_t bktr);
 int	vbi_close(bktr_ptr_t bktr);
--- a/sys/dev/pci/bktr/bktr_mem.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/bktr/bktr_mem.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,6 +1,6 @@
 /* $SourceForge: bktr_mem.c,v 1.3 2003/03/11 23:11:25 thomasklausner Exp $ */
 
-/*	$NetBSD: bktr_mem.c,v 1.3 2003/03/12 00:14:41 wiz Exp $	*/
+/*	$NetBSD: bktr_mem.c,v 1.3.56.1 2007/03/12 05:56:45 rmind Exp $	*/
 /* $FreeBSD: src/sys/dev/bktr/bktr_mem.c,v 1.4 2000/09/11 12:23:50 roger Exp$ */
 
 /*
@@ -49,7 +49,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bktr_mem.c,v 1.3 2003/03/12 00:14:41 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bktr_mem.c,v 1.3.56.1 2007/03/12 05:56:45 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -79,7 +79,7 @@
 		printf("bktr_mem: memory holder loaded\n");
 /*
  * bzero causes a panic.
-		bzero((caddr_t)memory_list, sizeof(memory_list));
+		bzero((void *)memory_list, sizeof(memory_list));
  * So use a simple for loop for now.
 */
 		{int x;
--- a/sys/dev/pci/bktr/bktr_os.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/bktr/bktr_os.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,6 +1,6 @@
 /* $SourceForge: bktr_os.c,v 1.5 2003/03/11 23:11:25 thomasklausner Exp $ */
 
-/*	$NetBSD: bktr_os.c,v 1.45 2006/11/16 01:33:20 christos Exp $	*/
+/*	$NetBSD: bktr_os.c,v 1.45.4.1 2007/03/12 05:56:45 rmind Exp $	*/
 /* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp$ */
 
 /*
@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bktr_os.c,v 1.45 2006/11/16 01:33:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bktr_os.c,v 1.45.4.1 2007/03/12 05:56:45 rmind Exp $");
 
 #ifdef __FreeBSD__
 #include "bktr.h"
@@ -739,7 +739,7 @@
  *
  */
 int
-bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct proc* pr)
+bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, void *arg, int flag, struct proc* pr)
 {
 	bktr_ptr_t	bktr;
 	int		unit;
@@ -1211,7 +1211,7 @@
  *
  */
 int
-bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct proc* pr)
+bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, void *arg, int flag, struct proc* pr)
 {
 	bktr_ptr_t	bktr;
 	int		unit;
@@ -1557,7 +1557,7 @@
         bus_dma_segment_t seg;
         bus_size_t align;
         int rseg;
-        caddr_t kva;
+        void *kva;
 
         /*
          * Allocate a DMA area
@@ -1621,9 +1621,9 @@
         bus_dma_tag_t dmat = bktr->dmat;
 
 #ifdef __NetBSD__
-        bus_dmamem_unmap(dmat, (caddr_t)kva, dmap->dm_mapsize);
+        bus_dmamem_unmap(dmat, (void *)kva, dmap->dm_mapsize);
 #else
-        bus_dmamem_unmap(dmat, (caddr_t)kva, bktr->dm_mapsize);
+        bus_dmamem_unmap(dmat, (void *)kva, bktr->dm_mapsize);
 #endif
         bus_dmamem_free(dmat, dmap->dm_segs, 1);
         bus_dmamap_destroy(dmat, dmap);
@@ -1743,7 +1743,7 @@
  *
  */
 int
-bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag,
+bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, void *arg, int flag,
     struct lwp *l)
 {
 	bktr_ptr_t	bktr;
--- a/sys/dev/pci/cac_pci.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/cac_pci.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: cac_pci.c,v 1.24 2006/11/28 20:29:14 ad Exp $	*/
+/*	$NetBSD: cac_pci.c,v 1.24.4.1 2007/03/12 05:55:12 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cac_pci.c,v 1.24 2006/11/28 20:29:14 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cac_pci.c,v 1.24.4.1 2007/03/12 05:55:12 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -234,7 +234,8 @@
 cac_pci_l0_submit(struct cac_softc *sc, struct cac_ccb *ccb)
 {
 
-	bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, (caddr_t)ccb - sc->sc_ccbs,
+	bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap,
+	    (char *)ccb - (char *)sc->sc_ccbs,
 	    sizeof(struct cac_ccb), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
 	cac_outl(sc, CAC_42REG_CMD_FIFO, ccb->ccb_paddr);
 }
@@ -255,7 +256,7 @@
 		    sc->sc_dv.dv_xname, (long)off);
 
 	off = (off & ~3) - sc->sc_ccbs_paddr;
-	ccb = (struct cac_ccb *)(sc->sc_ccbs + off);
+	ccb = (struct cac_ccb *)((char *)sc->sc_ccbs + off);
 
 	bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, off, sizeof(struct cac_ccb),
 	    BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
--- a/sys/dev/pci/chipsfb.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/chipsfb.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: chipsfb.c,v 1.8 2007/01/22 00:12:24 macallan Exp $	*/
+/*	$NetBSD: chipsfb.c,v 1.8.2.1 2007/03/12 05:55:12 rmind Exp $	*/
 
 /*
  * Copyright (c) 2006 Michael Lorenz
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: chipsfb.c,v 1.8 2007/01/22 00:12:24 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: chipsfb.c,v 1.8.2.1 2007/03/12 05:55:12 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -173,7 +173,7 @@
 	sizeof(_chipsfb_scrlist) / sizeof(struct wsscreen_descr *), _chipsfb_scrlist
 };
 
-static int	chipsfb_ioctl(void *, void *, u_long, caddr_t, int,
+static int	chipsfb_ioctl(void *, void *, u_long, void *, int,
 		    struct lwp *);
 static paddr_t	chipsfb_mmap(void *, void *, off_t, int);
 static void	chipsfb_clearscreen(struct chipsfb_softc *);
@@ -808,7 +808,7 @@
  */
 
 static int
-chipsfb_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag,
+chipsfb_ioctl(void *v, void *vs, u_long cmd, void *data, int flag,
 	struct lwp *l)
 {
 	struct vcons_data *vd = v;
--- a/sys/dev/pci/cmpci.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/cmpci.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmpci.c,v 1.34 2006/11/16 01:33:08 christos Exp $	*/
+/*	$NetBSD: cmpci.c,v 1.34.4.1 2007/03/12 05:55:12 rmind Exp $	*/
 
 /*
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.34 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.34.4.1 2007/03/12 05:55:12 rmind Exp $");
 
 #if defined(AUDIO_DEBUG) || defined(DEBUG)
 #define DPRINTF(x) if (cmpcidebug) printf x
@@ -120,11 +120,11 @@
  * DMA stuffs
  */
 static int cmpci_alloc_dmamem(struct cmpci_softc *, size_t,
-	struct malloc_type *, int, caddr_t *);
-static int cmpci_free_dmamem(struct cmpci_softc *, caddr_t,
+	struct malloc_type *, int, void **);
+static int cmpci_free_dmamem(struct cmpci_softc *, void *,
 	struct malloc_type *);
 static struct cmpci_dmanode * cmpci_find_dmamem(struct cmpci_softc *,
-	caddr_t);
+	void *);
 
 
 /*
@@ -1011,7 +1011,7 @@
 
 static int
 cmpci_alloc_dmamem(struct cmpci_softc *sc, size_t size, struct malloc_type *type,
-		   int flags, caddr_t *r_addr)
+		   int flags, void **r_addr)
 {
 	int error;
 	struct cmpci_dmanode *n;
@@ -1066,7 +1066,7 @@
 }
 
 static int
-cmpci_free_dmamem(struct cmpci_softc *sc, caddr_t addr, struct malloc_type *type)
+cmpci_free_dmamem(struct cmpci_softc *sc, void *addr, struct malloc_type *type)
 {
 	struct cmpci_dmanode **nnp;
 
@@ -1086,7 +1086,7 @@
 }
 
 static struct cmpci_dmanode *
-cmpci_find_dmamem(struct cmpci_softc *sc, caddr_t addr)
+cmpci_find_dmamem(struct cmpci_softc *sc, void *addr)
 {
 	struct cmpci_dmanode *p;
 
@@ -1113,7 +1113,7 @@
 cmpci_allocm(void *handle, int direction, size_t size,
 	     struct malloc_type *type, int flags)
 {
-	caddr_t addr;
+	void *addr;
 
 	addr = NULL;	/* XXX gcc */
 
@@ -1691,7 +1691,7 @@
 	    DMAADDR(p));
 	delay(10);
 	bus_space_write_2(sc->sc_iot, sc->sc_ioh, CMPCI_REG_DMA0_BYTES,
-	    ((caddr_t)end - (caddr_t)start + 1) / bps - 1);
+	    ((char *)end - (char *)start + 1) / bps - 1);
 	delay(10);
 
 	/* set interrupt count */
@@ -1730,7 +1730,7 @@
 	    DMAADDR(p));
 	delay(10);
 	bus_space_write_2(sc->sc_iot, sc->sc_ioh, CMPCI_REG_DMA1_BYTES,
-	    ((caddr_t)end - (caddr_t)start + 1) / bps - 1);
+	    ((char *)end - (char *)start + 1) / bps - 1);
 	delay(10);
 
 	/* set interrupt count */
--- a/sys/dev/pci/cmpcivar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/cmpcivar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmpcivar.h,v 1.9 2005/12/11 12:22:48 christos Exp $	*/
+/*	$NetBSD: cmpcivar.h,v 1.9.26.1 2007/03/12 05:55:12 rmind Exp $	*/
 
 /*
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
 	int			cd_nsegs;
 	bus_dma_segment_t	cd_segs[1];
 	bus_dmamap_t		cd_map;
-	caddr_t			cd_addr;
+	void *			cd_addr;
 	size_t			cd_size;
 	struct cmpci_dmanode	*cd_next;
 };
--- a/sys/dev/pci/cs428x.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/cs428x.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: cs428x.h,v 1.11 2006/08/06 16:21:11 jmcneill Exp $	*/
+/*	$NetBSD: cs428x.h,v 1.11.10.1 2007/03/12 05:55:13 rmind Exp $	*/
 
 /*
  * Copyright (c) 2000 Tatoku Ogaito.  All rights reserved.
@@ -48,8 +48,8 @@
 /* DMA */
 struct cs428x_dma {
 	bus_dmamap_t map;
-	caddr_t addr;		/* real DMA buffer */
-	caddr_t dum;		/* dummy buffer for audio driver */
+	void *addr;		/* real DMA buffer */
+	void *dum;		/* dummy buffer for audio driver */
 	bus_dma_segment_t segs[1];
 	int nsegs;
 	size_t size;
--- a/sys/dev/pci/cz.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/cz.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: cz.c,v 1.42 2006/11/16 01:33:08 christos Exp $	*/
+/*	$NetBSD: cz.c,v 1.42.4.1 2007/03/12 05:55:13 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2000 Zembu Labs, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cz.c,v 1.42 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cz.c,v 1.42.4.1 2007/03/12 05:55:13 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1134,7 +1134,7 @@
  *	Perform a control operation on a Cyclades-Z serial port.
  */
 static int
-czttyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l)
+czttyioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
 {
 	struct cztty_softc *sc = CZTTY_SOFTC(dev);
 	struct tty *tp = sc->sc_tty;
--- a/sys/dev/pci/eap.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/eap.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: eap.c,v 1.88 2006/11/16 01:33:08 christos Exp $	*/
+/*	$NetBSD: eap.c,v 1.88.4.1 2007/03/12 05:55:13 rmind Exp $	*/
 /*      $OpenBSD: eap.c,v 1.6 1999/10/05 19:24:42 csapuntz Exp $ */
 
 /*
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: eap.c,v 1.88 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eap.c,v 1.88.4.1 2007/03/12 05:55:13 rmind Exp $");
 
 #include "midi.h"
 #include "joy_eap.h"
@@ -107,7 +107,7 @@
 
 struct eap_dma {
 	bus_dmamap_t map;
-	caddr_t addr;
+	void *addr;
 	bus_dma_segment_t segs[1];
 	int nsegs;
 	size_t size;
--- a/sys/dev/pci/emuxki.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/emuxki.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: emuxki.c,v 1.49 2006/11/16 01:33:08 christos Exp $	*/
+/*	$NetBSD: emuxki.c,v 1.49.4.1 2007/03/12 05:55:13 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1.49 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1.49.4.1 2007/03/12 05:55:13 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -2432,7 +2432,7 @@
 	    params->precision == 16, params->sample_rate)))
 		return error;
 	if ((error = emuxki_voice_set_bufparms(voice, start,
-	    (caddr_t)end - (caddr_t)start, blksize)))
+	    (char *)end - (char *)start, blksize)))
 		return error;
 	emuxki_voice_commit_parms(voice);
 	emuxki_voice_start(voice, inth, inthparam);
@@ -2457,7 +2457,7 @@
 	    params->precision == 16, params->sample_rate)))
 		return error;
 	if ((error = emuxki_voice_set_bufparms(voice, start,
-	    (caddr_t)end - (caddr_t)start, blksize)))
+	    (char *)end - (char *)start, blksize)))
 		return error;
 	emuxki_voice_start(voice, inth, inthparam);
 
--- a/sys/dev/pci/emuxkivar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/emuxkivar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: emuxkivar.h,v 1.9 2005/12/11 12:22:49 christos Exp $	*/
+/*	$NetBSD: emuxkivar.h,v 1.9.26.1 2007/03/12 05:55:13 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@
 	bus_dma_segment_t *segs;
 	int		nsegs;
 	int		rsegs;
-	caddr_t		kaddr;
+	void *		kaddr;
 	bus_dmamap_t    map;
 };
 
--- a/sys/dev/pci/esa.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/esa.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: esa.c,v 1.40 2006/11/16 01:33:08 christos Exp $ */
+/* $NetBSD: esa.c,v 1.40.4.1 2007/03/12 05:55:13 rmind Exp $ */
 
 /*
  * Copyright (c) 2001, 2002, 2006 Jared D. McNeill <jmcneill@invisible.ca>
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esa.c,v 1.40 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esa.c,v 1.40.4.1 2007/03/12 05:55:13 rmind Exp $");
 
 #include <sys/types.h>
 #include <sys/errno.h>
@@ -600,7 +600,7 @@
 	vc->play.pos = 0;
 	vc->play.count = 0;
 	vc->play.buf = start;
-	vc->play.bufsize = size = (size_t)(((caddr_t)end - (caddr_t)start));
+	vc->play.bufsize = size = (size_t)(((char *)end - (char *)start));
 	vc->play.blksize = blksize;
 	bufaddr = DMAADDR(p);
 	vc->play.start = bufaddr;
@@ -740,7 +740,7 @@
 	vc->rec.pos = 0;
 	vc->rec.count = 0;
 	vc->rec.buf = start;
-	vc->rec.bufsize = size = (size_t)(((caddr_t)end - (caddr_t)start));
+	vc->rec.bufsize = size = (size_t)(((char *)end - (char *)start));
 	vc->rec.blksize = blksize;
 	bufaddr = DMAADDR(p);
 	vc->rec.start = bufaddr;
--- a/sys/dev/pci/esavar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/esavar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: esavar.h,v 1.7 2005/12/11 12:22:49 christos Exp $ */
+/* $NetBSD: esavar.h,v 1.7.26.1 2007/03/12 05:55:14 rmind Exp $ */
 
 /*
  * Copyright (c) 2001, 2002 Jared D. McNeill <jmcneill@invisible.ca>
@@ -61,7 +61,7 @@
 
 struct esa_dma {
 	bus_dmamap_t		map;
-	caddr_t			addr;
+	void *			addr;
 	bus_dma_segment_t	segs[1];
 	int			nsegs;
 	size_t			size;
--- a/sys/dev/pci/esm.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/esm.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: esm.c,v 1.41 2006/11/16 01:33:08 christos Exp $      */
+/*      $NetBSD: esm.c,v 1.41.4.1 2007/03/12 05:55:14 rmind Exp $      */
 
 /*-
  * Copyright (c) 2002, 2003 Matt Fredette
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esm.c,v 1.41 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esm.c,v 1.41.4.1 2007/03/12 05:55:14 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -685,7 +685,7 @@
 
 	ess = sc;
 	p = &ess->sc_dma;
-	if ((caddr_t)start != p->addr + MAESTRO_PLAYBUF_OFF) {
+	if ((char *)start != (char *)p->addr + MAESTRO_PLAYBUF_OFF) {
 		printf("%s: esm_init_output: bad addr %p\n",
 		    ess->sc_dev.dv_xname, start);
 		return EINVAL;
@@ -707,7 +707,7 @@
 
 	ess = sc;
 	p = &ess->sc_dma;
-	if ((caddr_t)start != p->addr + MAESTRO_RECBUF_OFF) {
+	if ((char *)start != (char *)p->addr + MAESTRO_RECBUF_OFF) {
 		printf("%s: esm_init_input: bad addr %p\n",
 		    ess->sc_dev.dv_xname, start);
 		return EINVAL;
@@ -762,7 +762,7 @@
 	ess->sc_pintr = intr;
 	ess->sc_parg = arg;
 	p = &ess->sc_dma;
-	if ((caddr_t)start != p->addr + MAESTRO_PLAYBUF_OFF) {
+	if ((char *)start != (char *)p->addr + MAESTRO_PLAYBUF_OFF) {
 		printf("%s: esm_trigger_output: bad addr %p\n",
 		    ess->sc_dev.dv_xname, start);
 		return EINVAL;
@@ -772,7 +772,7 @@
 	ess->pch.apublk = blksize >> 1;
 	ess->pactive = 1;
 
-	size = (size_t)(((caddr_t)end - (caddr_t)start) >> 1);
+	size = (size_t)(((char *)end - (char *)start) >> 1);
 	choffset = MAESTRO_PLAYBUF_OFF;
 	offset = choffset >> 1;
 	wpwa = APU_USE_SYSMEM | ((offset >> 8) & APU_64KPAGE_MASK);
@@ -878,20 +878,20 @@
 	ess->sc_rintr = intr;
 	ess->sc_rarg = arg;
 	p = &ess->sc_dma;
-	if ((caddr_t)start != p->addr + MAESTRO_RECBUF_OFF) {
+	if ((char *)start != (char *)p->addr + MAESTRO_RECBUF_OFF) {
 		printf("%s: esm_trigger_input: bad addr %p\n",
 		    ess->sc_dev.dv_xname, start);
 		return EINVAL;
 	}
 
-	ess->rch.buffer = (caddr_t)start;
+	ess->rch.buffer = (void *)start;
 	ess->rch.offset = 0;
 	ess->rch.blocksize = blksize;
-	ess->rch.bufsize = ((caddr_t)end - (caddr_t)start);
+	ess->rch.bufsize = ((char *)end - (char *)start);
 	ess->rch.apublk = blksize >> 1;
 	ess->ractive = 1;
 
-	size = (size_t)(((caddr_t)end - (caddr_t)start) >> 1);
+	size = (size_t)(((char *)end - (char *)start) >> 1);
 	choffset = MAESTRO_RECBUF_OFF;
 	switch (ch->aputype) {
 	case APUTYPE_16BITSTEREO:
@@ -1149,15 +1149,15 @@
 	while (resid > 0) {
 
 		/* The 32-bit words for the left channel. */
-		left32s = (const uint32_t *)(ess->sc_dma.addr +
+		left32s = (const uint32_t *)((char *)ess->sc_dma.addr +
 		    MAESTRO_RECBUF_L_OFF + offset / 2);
 
 		/* The 32-bit words for the right channel. */
-		right32s = (const uint32_t *)(ess->sc_dma.addr +
+		right32s = (const uint32_t *)((char *)ess->sc_dma.addr +
 		    MAESTRO_RECBUF_R_OFF + offset / 2);
 
 		/* The pointer to the 32-bit words we will write. */
-		dst32s = (uint32_t *)(ch->buffer + offset);
+		dst32s = (uint32_t *)((char *)ch->buffer + offset);
 
 		/* Get the number of bytes we will combine now. */
 		count = ch->bufsize - offset;
@@ -1336,9 +1336,9 @@
 	off = (direction == AUMODE_PLAY ?
 		MAESTRO_PLAYBUF_OFF : MAESTRO_RECBUF_OFF);
 	DPRINTF(ESM_DEBUG_DMA, (" = %p (DMAADDR 0x%x)\n",
-				ess->sc_dma.addr + off,
+				(char *)ess->sc_dma.addr + off,
 				(int)DMAADDR(&ess->sc_dma) + off));
-	return ess->sc_dma.addr + off;
+	return (char *)ess->sc_dma.addr + off;
 }
 
 void
@@ -1350,9 +1350,9 @@
 	    ("esm_free(%p, %p, %p)\n",
 	    sc, ptr, pool));
 	ess = sc;
-	if ((caddr_t)ptr == ess->sc_dma.addr + MAESTRO_PLAYBUF_OFF)
+	if ((char *)ptr == (char *)ess->sc_dma.addr + MAESTRO_PLAYBUF_OFF)
 		ess->rings_alloced &= ~AUMODE_PLAY;
-	else if ((caddr_t)ptr == ess->sc_dma.addr + MAESTRO_RECBUF_OFF)
+	else if ((char *)ptr == (char *)ess->sc_dma.addr + MAESTRO_RECBUF_OFF)
 		ess->rings_alloced &= ~AUMODE_RECORD;
 }
 
@@ -1379,9 +1379,9 @@
 	if (off < 0)
 		return -1;
 
-	if ((caddr_t)mem == ess->sc_dma.addr + MAESTRO_PLAYBUF_OFF)
+	if ((char *)mem == (char *)ess->sc_dma.addr + MAESTRO_PLAYBUF_OFF)
 		off += MAESTRO_PLAYBUF_OFF;
-	else if ((caddr_t)mem == ess->sc_dma.addr + MAESTRO_RECBUF_OFF)
+	else if ((char *)mem == (char *)ess->sc_dma.addr + MAESTRO_RECBUF_OFF)
 		off += MAESTRO_RECBUF_OFF;
 	else
 		return -1;
--- a/sys/dev/pci/esmvar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/esmvar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: esmvar.h,v 1.13 2005/12/11 12:22:49 christos Exp $	*/
+/*	$NetBSD: esmvar.h,v 1.13.26.1 2007/03/12 05:55:14 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2003 Matt Fredette
@@ -123,7 +123,7 @@
 
 struct esm_dma {
 	bus_dmamap_t		map;
-	caddr_t			addr;
+	void *			addr;
 	bus_dma_segment_t	segs[1];
 	int			nsegs;
 	size_t			size;
@@ -135,7 +135,7 @@
 
 struct esm_chinfo {
 	uint32_t		base;		/* DMA base */
-	caddr_t			buffer;		/* upper layer buffer */
+	void *			buffer;		/* upper layer buffer */
 	uint32_t		offset;		/* offset into buffer */
 	uint32_t		blocksize;	/* block size in bytes */
 	uint32_t		bufsize;	/* buffer size in bytes */
--- a/sys/dev/pci/eso.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/eso.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: eso.c,v 1.49 2007/01/11 22:56:49 kleink Exp $	*/
+/*	$NetBSD: eso.c,v 1.49.2.1 2007/03/12 05:55:14 rmind Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2004 Klaus J. Klein
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.49 2007/01/11 22:56:49 kleink Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.49.2.1 2007/03/12 05:55:14 rmind Exp $");
 
 #include "mpu.h"
 
@@ -83,7 +83,7 @@
 struct eso_dma {
 	bus_dma_tag_t		ed_dmat;
 	bus_dmamap_t		ed_map;
-	caddr_t			ed_kva;
+	void *			ed_kva;
 	bus_dma_segment_t	ed_segs[1];
 	int			ed_nsegs;
 	size_t			ed_size;
@@ -206,7 +206,7 @@
 static int	eso_allocmem(struct eso_softc *, size_t, size_t, size_t,
 		    int, int, struct eso_dma *);
 static void	eso_freemem(struct eso_dma *);
-static struct eso_dma *	eso_kva2dma(const struct eso_softc *, const caddr_t);
+static struct eso_dma *	eso_kva2dma(const struct eso_softc *, const void *);
 
 
 static int
@@ -1513,7 +1513,7 @@
 }
 
 static struct eso_dma *
-eso_kva2dma(const struct eso_softc *sc, const caddr_t kva)
+eso_kva2dma(const struct eso_softc *sc, const void *kva)
 {
 	struct eso_dma *p;
 
--- a/sys/dev/pci/fms.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/fms.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: fms.c,v 1.28 2006/11/16 01:33:08 christos Exp $	*/
+/*	$NetBSD: fms.c,v 1.28.4.1 2007/03/12 05:55:14 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fms.c,v 1.28 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fms.c,v 1.28.4.1 2007/03/12 05:55:14 rmind Exp $");
 
 #include "mpu.h"
 
@@ -72,7 +72,7 @@
 
 struct fms_dma {
 	struct fms_dma *next;
-	caddr_t addr;
+	void *addr;
 	size_t size;
 	bus_dmamap_t map;
 	bus_dma_segment_t seg;
--- a/sys/dev/pci/hifn7751.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/hifn7751.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: hifn7751.c,v 1.33 2006/11/16 01:33:08 christos Exp $	*/
+/*	$NetBSD: hifn7751.c,v 1.33.4.1 2007/03/12 05:55:14 rmind Exp $	*/
 /*	$FreeBSD: hifn7751.c,v 1.5.2.7 2003/10/08 23:52:00 sam Exp $ */
 /*	$OpenBSD: hifn7751.c,v 1.140 2003/08/01 17:55:54 deraadt Exp $	*/
 
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.33 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.33.4.1 2007/03/12 05:55:14 rmind Exp $");
 
 #include "rnd.h"
 
@@ -255,7 +255,7 @@
 	bus_dma_segment_t seg;
 	bus_dmamap_t dmamap;
 	int rseg;
-	caddr_t kva;
+	void *kva;
 
 	hp = hifn_lookup(pa);
 	if (hp == NULL) {
@@ -2461,7 +2461,7 @@
 
 			if (cmd->srcu.src_m != cmd->dstu.dst_m) {
 				m_freem(cmd->srcu.src_m);
-				crp->crp_buf = (caddr_t)cmd->dstu.dst_m;
+				crp->crp_buf = (void *)cmd->dstu.dst_m;
 			}
 
 			/* non-shared buffers cannot be restarted */
@@ -2522,7 +2522,7 @@
 
 	if (crp->crp_flags & CRYPTO_F_IMBUF) {
 		if (cmd->srcu.src_m != cmd->dstu.dst_m) {
-			crp->crp_buf = (caddr_t)cmd->dstu.dst_m;
+			crp->crp_buf = (void *)cmd->dstu.dst_m;
 			totlen = cmd->src_map->dm_mapsize;
 			for (m = cmd->dstu.dst_m; m != NULL; m = m->m_next) {
 				if (totlen < m->m_len) {
@@ -2541,11 +2541,11 @@
 		if (crp->crp_flags & CRYPTO_F_IMBUF)
 			m_copyback((struct mbuf *)crp->crp_buf,
 			    cmd->src_map->dm_mapsize - cmd->sloplen,
-			    cmd->sloplen, (caddr_t)&dma->slop[cmd->slopidx]);
+			    cmd->sloplen, (void *)&dma->slop[cmd->slopidx]);
 		else if (crp->crp_flags & CRYPTO_F_IOV)
 			cuio_copyback((struct uio *)crp->crp_buf,
 			    cmd->src_map->dm_mapsize - cmd->sloplen,
-			    cmd->sloplen, (caddr_t)&dma->slop[cmd->slopidx]);
+			    cmd->sloplen, (void *)&dma->slop[cmd->slopidx]);
 	}
 
 	i = dma->dstk; u = dma->dstu;
@@ -2619,7 +2619,7 @@
 				m_copyback((struct mbuf *)crp->crp_buf,
 				    crd->crd_inject, len, macbuf);
 			else if ((crp->crp_flags & CRYPTO_F_IOV) && crp->crp_mac)
-				bcopy((caddr_t)macbuf, crp->crp_mac, len);
+				bcopy((void *)macbuf, crp->crp_mac, len);
 			break;
 		}
 	}
@@ -2962,7 +2962,7 @@
 	m = cmd->dstu.dst_m;
 	if (m->m_flags & M_PKTHDR)
 		m->m_pkthdr.len = olen;
-	crp->crp_buf = (caddr_t)m;
+	crp->crp_buf = (void *)m;
 	for (; m != NULL; m = m->m_next) {
 		if (olen >= m->m_len)
 			olen -= m->m_len;
--- a/sys/dev/pci/if_bce.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_bce.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bce.c,v 1.12.4.1 2007/02/27 16:53:58 yamt Exp $	 */
+/* $NetBSD: if_bce.c,v 1.12.4.2 2007/03/12 05:55:16 rmind Exp $	 */
 
 /*
  * Copyright (c) 2003 Clifford Wright. All rights reserved.
@@ -160,7 +160,7 @@
 
 static	int	bce_probe(struct device *, struct cfdata *, void *);
 static	void	bce_attach(struct device *, struct device *, void *);
-static	int	bce_ioctl(struct ifnet *, u_long, caddr_t);
+static	int	bce_ioctl(struct ifnet *, u_long, void *);
 static	void	bce_start(struct ifnet *);
 static	void	bce_watchdog(struct ifnet *);
 static	int	bce_intr(void *);
@@ -276,7 +276,7 @@
 	pci_chipset_tag_t pc = pa->pa_pc;
 	pci_intr_handle_t ih;
 	const char     *intrstr = NULL;
-	caddr_t         kva;
+	void *        kva;
 	bus_dma_segment_t seg;
 	int             rseg;
 	u_int32_t       command;
@@ -420,7 +420,7 @@
 	}
 	/* save the ring space in softc */
 	sc->bce_rx_ring = (struct bce_dma_slot *) kva;
-	sc->bce_tx_ring = (struct bce_dma_slot *) (kva + PAGE_SIZE);
+	sc->bce_tx_ring = (struct bce_dma_slot *) ((char *)kva + PAGE_SIZE);
 
 	/* Create the transmit buffer DMA maps. */
 	for (i = 0; i < BCE_NTXDESC; i++) {
@@ -505,7 +505,7 @@
 
 /* handle media, and ethernet requests */
 static int
-bce_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+bce_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
 	struct bce_softc *sc = ifp->if_softc;
 	struct ifreq   *ifr = (struct ifreq *) data;
@@ -819,8 +819,8 @@
 			if (m == NULL)
 				goto dropit;
 			m->m_data += 2;
-			memcpy(mtod(m, caddr_t),
-			 mtod(sc->bce_cdata.bce_rx_chain[i], caddr_t), len);
+			memcpy(mtod(m, void *),
+			 mtod(sc->bce_cdata.bce_rx_chain[i], void *), len);
 			sc->bce_cdata.bce_rx_chain[i]->m_data -= 30;	/* MAGIC */
 		} else {
 			m = sc->bce_cdata.bce_rx_chain[i];
--- a/sys/dev/pci/if_bge.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_bge.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.123.2.1 2007/02/27 16:53:59 yamt Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.123.2.2 2007/03/12 05:55:16 rmind Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.123.2.1 2007/02/27 16:53:59 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.123.2.2 2007/03/12 05:55:16 rmind Exp $");
 
 #include "bpfilter.h"
 #include "vlan.h"
@@ -194,7 +194,7 @@
 
 static int	bge_intr(void *);
 static void	bge_start(struct ifnet *);
-static int	bge_ioctl(struct ifnet *, u_long, caddr_t);
+static int	bge_ioctl(struct ifnet *, u_long, void *);
 static int	bge_init(struct ifnet *);
 static void	bge_stop(struct bge_softc *);
 static void	bge_watchdog(struct ifnet *);
@@ -210,7 +210,7 @@
 static void	bge_free_jumbo_mem(struct bge_softc *);
 #endif
 static void	*bge_jalloc(struct bge_softc *);
-static void	bge_jfree(struct mbuf *, caddr_t, size_t, void *);
+static void	bge_jfree(struct mbuf *, void *, size_t, void *);
 static int	bge_newbuf_std(struct bge_softc *, int, struct mbuf *,
 			       bus_dmamap_t);
 static int	bge_newbuf_jumbo(struct bge_softc *, int, struct mbuf *);
@@ -465,10 +465,11 @@
  * Read a sequence of bytes from the EEPROM.
  */
 static int
-bge_read_eeprom(struct bge_softc *sc, caddr_t dest, int off, int cnt)
+bge_read_eeprom(struct bge_softc *sc, void *destv, int off, int cnt)
 {
 	int err = 0, i;
 	u_int8_t byte = 0;
+	char *dest = destv;
 
 	for (i = 0; i < cnt; i++) {
 		err = bge_eeprom_getbyte(sc, off + i, &byte);
@@ -682,7 +683,7 @@
 static int
 bge_alloc_jumbo_mem(struct bge_softc *sc)
 {
-	caddr_t			ptr, kva;
+	char *ptr, *kva;
 	bus_dma_segment_t	seg;
 	int		i, rseg, state, error;
 	struct bge_jpool_entry   *entry;
@@ -697,7 +698,7 @@
 	}
 
 	state = 1;
-	if (bus_dmamem_map(sc->bge_dmatag, &seg, rseg, BGE_JMEM, &kva,
+	if (bus_dmamem_map(sc->bge_dmatag, &seg, rseg, BGE_JMEM, (void **)&kva,
 	    BUS_DMA_NOWAIT)) {
 		printf("%s: can't map DMA buffers (%d bytes)\n",
 		    sc->bge_dev.dv_xname, (int)BGE_JMEM);
@@ -722,7 +723,7 @@
 	}
 
 	state = 4;
-	sc->bge_cdata.bge_jumbo_buf = (caddr_t)kva;
+	sc->bge_cdata.bge_jumbo_buf = (void *)kva;
 	DPRINTFN(1,("bge_jumbo_buf = %p\n", sc->bge_cdata.bge_jumbo_buf));
 
 	SLIST_INIT(&sc->bge_jfree_listhead);
@@ -794,7 +795,7 @@
  * Release a jumbo buffer.
  */
 static void
-bge_jfree(struct mbuf *m, caddr_t buf, size_t size, void *arg)
+bge_jfree(struct mbuf *m, void *buf, size_t size, void *arg)
 {
 	struct bge_jpool_entry *entry;
 	struct bge_softc *sc;
@@ -808,8 +809,8 @@
 
 	/* calculate the slot this buffer belongs to */
 
-	i = ((caddr_t)buf
-	     - (caddr_t)sc->bge_cdata.bge_jumbo_buf) / BGE_JLEN;
+	i = ((char *)buf
+	     - (char *)sc->bge_cdata.bge_jumbo_buf) / BGE_JLEN;
 
 	if ((i < 0) || (i >= BGE_JSLOTS))
 		panic("bge_jfree: asked to free buffer that we don't manage!");
@@ -899,7 +900,7 @@
 {
 	struct mbuf *m_new = NULL;
 	struct bge_rx_bd *r;
-	caddr_t buf = NULL;
+	void *buf = NULL;
 
 	if (m == NULL) {
 
@@ -931,7 +932,7 @@
 	if (!sc->bge_rx_alignment_bug)
 	    m_adj(m_new, ETHER_ALIGN);
 	bus_dmamap_sync(sc->bge_dmatag, sc->bge_cdata.bge_rx_jumbo_map,
-	    mtod(m_new, caddr_t) - sc->bge_cdata.bge_jumbo_buf, BGE_JLEN,
+	    mtod(m_new, char *) - (char *)sc->bge_cdata.bge_jumbo_buf, BGE_JLEN,
 	    BUS_DMASYNC_PREREAD);
 	/* Set up the descriptor. */
 	r = &sc->bge_rdata->bge_rx_jumbo_ring[i];
@@ -2338,7 +2339,7 @@
 	u_int32_t		mac_addr = 0;
 	u_int32_t		command;
 	struct ifnet		*ifp;
-	caddr_t			kva;
+	void *			kva;
 	u_char			eaddr[ETHER_ADDR_LEN];
 	pcireg_t		memtype;
 	bus_addr_t		memaddr;
@@ -2461,7 +2462,7 @@
 		eaddr[3] = (u_char)(mac_addr >> 16);
 		eaddr[4] = (u_char)(mac_addr >> 8);
 		eaddr[5] = (u_char)(mac_addr >> 0);
-	} else if (bge_read_eeprom(sc, (caddr_t)eaddr,
+	} else if (bge_read_eeprom(sc, (void *)eaddr,
 	    BGE_EE_MAC_OFFSET + 2, ETHER_ADDR_LEN)) {
 		aprint_error("%s: failed to read station address\n",
 		    sc->bge_dev.dv_xname);
@@ -2601,7 +2602,7 @@
 	if (bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_SIG) == BGE_MAGIC_NUMBER) {
 		hwcfg = bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_NICCFG);
 	} else {
-		bge_read_eeprom(sc, (caddr_t)&hwcfg,
+		bge_read_eeprom(sc, (void *)&hwcfg,
 		    BGE_EE_HWCFG_OFFSET, sizeof(hwcfg));
 		hwcfg = be32toh(hwcfg);
 	}
@@ -2925,7 +2926,7 @@
 			jumbocnt++;
 			bus_dmamap_sync(sc->bge_dmatag,
 			    sc->bge_cdata.bge_rx_jumbo_map,
-			    mtod(m, caddr_t) - sc->bge_cdata.bge_jumbo_buf,
+			    mtod(m, char *) - (char *)sc->bge_cdata.bge_jumbo_buf,
 			    BGE_JLEN, BUS_DMASYNC_POSTREAD);
 			if (cur_rx->bge_flags & BGE_RXBDFLAG_ERROR) {
 				ifp->if_ierrors++;
@@ -2970,7 +2971,7 @@
                  * If our CPU requires alignment, re-align by copying.
                  */
 		if (sc->bge_rx_alignment_bug) {
-			memmove(mtod(m, caddr_t) + ETHER_ALIGN, m->m_data,
+			memmove(mtod(m, char *) + ETHER_ALIGN, m->m_data,
                                 cur_rx->bge_len);
 			m->m_data += ETHER_ALIGN;
 		}
@@ -3344,7 +3345,7 @@
 	KDASSERT(M_TRAILINGSPACE(last) >= padlen);
 
 	/* Now zero the pad area, to avoid the bge cksum-assist bug */
-	memset(mtod(last, caddr_t) + last->m_len, 0, padlen);
+	memset(mtod(last, char *) + last->m_len, 0, padlen);
 	last->m_len += padlen;
 	pkt->m_pkthdr.len += padlen;
 	return 0;
@@ -3607,8 +3608,8 @@
 			return ENOBUFS;
 #endif
 		} else {
-			ip = (struct ip *) (mtod(m0, caddr_t) + offset);
-			th = (struct tcphdr *) (mtod(m0, caddr_t) + hlen);
+			ip = (struct ip *) (mtod(m0, char *) + offset);
+			th = (struct tcphdr *) (mtod(m0, char *) + hlen);
 			ip_tcp_hlen = iphl +  (th->th_off << 2);
 
 			/* Total IP/TCP options, in 32-bit words */
@@ -3998,7 +3999,7 @@
 }
 
 static int
-bge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
+bge_ioctl(struct ifnet *ifp, u_long command, void *data)
 {
 	struct bge_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *) data;
--- a/sys/dev/pci/if_bgereg.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_bgereg.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bgereg.h,v 1.39.4.1 2007/02/27 16:53:59 yamt Exp $	*/
+/*	$NetBSD: if_bgereg.h,v 1.39.4.2 2007/03/12 05:55:16 rmind Exp $	*/
 /*
  * Copyright (c) 2001 Wind River Systems
  * Copyright (c) 1997, 1998, 1999, 2001
@@ -2336,8 +2336,8 @@
 	bus_dmamap_t		bge_rx_std_map[BGE_STD_RX_RING_CNT];
 	bus_dmamap_t		bge_rx_jumbo_map;
 	/* Stick the jumbo mem management stuff here too. */
-	caddr_t			bge_jslots[BGE_JSLOTS];
-	caddr_t			bge_jumbo_buf;
+	void *			bge_jslots[BGE_JSLOTS];
+	void *			bge_jumbo_buf;
 };
 
 #define BGE_JUMBO_DMA_ADDR(sc, m) \
--- a/sys/dev/pci/if_bnx.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_bnx.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bnx.c,v 1.2 2007/02/15 19:24:47 bouyer Exp $	*/
+/*	$NetBSD: if_bnx.c,v 1.2.2.1 2007/03/12 05:55:17 rmind Exp $	*/
 /*	$OpenBSD: if_bnx.c,v 1.21 2006/08/21 03:32:11 brad Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.2 2007/02/15 19:24:47 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.2.2.1 2007/03/12 05:55:17 rmind Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -331,7 +331,7 @@
 int	bnx_tx_encap(struct bnx_softc *, struct mbuf *, u_int16_t *,
 	    u_int16_t *, u_int32_t *);
 void	bnx_start(struct ifnet *);
-int	bnx_ioctl(struct ifnet *, u_long, caddr_t);
+int	bnx_ioctl(struct ifnet *, u_long, void *);
 void	bnx_watchdog(struct ifnet *);
 int	bnx_ifmedia_upd(struct ifnet *);
 void	bnx_ifmedia_sts(struct ifnet *, struct ifmediareq *);
@@ -1883,7 +1883,7 @@
 	/* Destroy the status block. */
 	if (sc->status_block != NULL && sc->status_map != NULL) {
 		bus_dmamap_unload(sc->bnx_dmatag, sc->status_map);
-		bus_dmamem_unmap(sc->bnx_dmatag, (caddr_t)sc->status_block,
+		bus_dmamem_unmap(sc->bnx_dmatag, (void *)sc->status_block,
 		    BNX_STATUS_BLK_SZ);		
 		bus_dmamem_free(sc->bnx_dmatag, &sc->status_seg,
 		    sc->status_rseg);
@@ -1895,7 +1895,7 @@
 	/* Destroy the statistics block. */
 	if (sc->stats_block != NULL && sc->stats_map != NULL) {
 		bus_dmamap_unload(sc->bnx_dmatag, sc->stats_map);
-		bus_dmamem_unmap(sc->bnx_dmatag, (caddr_t)sc->stats_block,
+		bus_dmamem_unmap(sc->bnx_dmatag, (void *)sc->stats_block,
 		    BNX_STATS_BLK_SZ);		
 		bus_dmamem_free(sc->bnx_dmatag, &sc->stats_seg,
 		    sc->stats_rseg);
@@ -1911,7 +1911,7 @@
 			bus_dmamap_unload(sc->bnx_dmatag,
 			    sc->tx_bd_chain_map[i]);
 			bus_dmamem_unmap(sc->bnx_dmatag,
-			    (caddr_t)sc->tx_bd_chain[i], BNX_TX_CHAIN_PAGE_SZ);
+			    (void *)sc->tx_bd_chain[i], BNX_TX_CHAIN_PAGE_SZ);
 			bus_dmamem_free(sc->bnx_dmatag, &sc->tx_bd_chain_seg[i],
 			    sc->tx_bd_chain_rseg[i]);
 			bus_dmamap_destroy(sc->bnx_dmatag,
@@ -1936,7 +1936,7 @@
 			bus_dmamap_unload(sc->bnx_dmatag,
 			    sc->rx_bd_chain_map[i]);
 			bus_dmamem_unmap(sc->bnx_dmatag,
-			    (caddr_t)sc->rx_bd_chain[i], BNX_RX_CHAIN_PAGE_SZ);
+			    (void *)sc->rx_bd_chain[i], BNX_RX_CHAIN_PAGE_SZ);
 			bus_dmamem_free(sc->bnx_dmatag, &sc->rx_bd_chain_seg[i],
 			    sc->rx_bd_chain_rseg[i]);
 
@@ -2112,7 +2112,7 @@
 	}
 
 	if (bus_dmamem_map(sc->bnx_dmatag, &sc->status_seg, sc->status_rseg,
-	    BNX_STATUS_BLK_SZ, (caddr_t *)&sc->status_block, BUS_DMA_NOWAIT)) {
+	    BNX_STATUS_BLK_SZ, (void **)&sc->status_block, BUS_DMA_NOWAIT)) {
 		aprint_error("%s: Could not map status block DMA memory!\n",
 		    sc->bnx_dev.dv_xname);
 		rc = ENOMEM;
@@ -2156,7 +2156,7 @@
 	}
 
 	if (bus_dmamem_map(sc->bnx_dmatag, &sc->stats_seg, sc->stats_rseg,
-	    BNX_STATS_BLK_SZ, (caddr_t *)&sc->stats_block, BUS_DMA_NOWAIT)) {
+	    BNX_STATS_BLK_SZ, (void **)&sc->stats_block, BUS_DMA_NOWAIT)) {
 		aprint_error("%s: Could not map stats block DMA memory!\n",
 		    sc->bnx_dev.dv_xname);
 		rc = ENOMEM;
@@ -2205,7 +2205,7 @@
 
 		if (bus_dmamem_map(sc->bnx_dmatag, &sc->tx_bd_chain_seg[i],
 		    sc->tx_bd_chain_rseg[i], BNX_TX_CHAIN_PAGE_SZ,
-		    (caddr_t *)&sc->tx_bd_chain[i], BUS_DMA_NOWAIT)) {
+		    (void **)&sc->tx_bd_chain[i], BUS_DMA_NOWAIT)) {
 			aprint_error(
 			    "%s: Could not map TX desc %d DMA memory!\n",
 			    sc->bnx_dev.dv_xname, i);
@@ -2214,7 +2214,7 @@
 		}
 
 		if (bus_dmamap_load(sc->bnx_dmatag, sc->tx_bd_chain_map[i],
-		    (caddr_t)sc->tx_bd_chain[i], BNX_TX_CHAIN_PAGE_SZ, NULL,
+		    (void *)sc->tx_bd_chain[i], BNX_TX_CHAIN_PAGE_SZ, NULL,
 		    BUS_DMA_NOWAIT)) {
 			aprint_error(
 			    "%s: Could not load TX desc %d DMA memory!\n",
@@ -2275,7 +2275,7 @@
 
 		if (bus_dmamem_map(sc->bnx_dmatag, &sc->rx_bd_chain_seg[i],
 		    sc->rx_bd_chain_rseg[i], BNX_RX_CHAIN_PAGE_SZ,
-		    (caddr_t *)&sc->rx_bd_chain[i], BUS_DMA_NOWAIT)) {
+		    (void **)&sc->rx_bd_chain[i], BUS_DMA_NOWAIT)) {
 			aprint_error(
 			    "%s: Could not map Rx desc %d DMA memory!\n",
 			    sc->bnx_dev.dv_xname, i);
@@ -2284,7 +2284,7 @@
 		}
 
 		if (bus_dmamap_load(sc->bnx_dmatag, sc->rx_bd_chain_map[i],
-		    (caddr_t)sc->rx_bd_chain[i], BNX_RX_CHAIN_PAGE_SZ, NULL,
+		    (void *)sc->rx_bd_chain[i], BNX_RX_CHAIN_PAGE_SZ, NULL,
 		    BUS_DMA_NOWAIT)) {
 			aprint_error(
 			    "%s: Could not load Rx desc %d DMA memory!\n",
@@ -3930,7 +3930,7 @@
 					m_freem(m);
 					goto bnx_rx_int_next_rx;
 				}
-				m_copydata(m, 0, ETHER_HDR_LEN, (caddr_t)&vh);
+				m_copydata(m, 0, ETHER_HDR_LEN, (void *)&vh);
 				vh.evl_proto = vh.evl_encap_proto;
 				vh.evl_tag = l2fhdr->l2_fhdr_vlan_tag >> 16;
 				vh.evl_encap_proto = htons(ETHERTYPE_VLAN);
@@ -4428,7 +4428,7 @@
 /*   0 for success, positive value for failure.                             */
 /****************************************************************************/
 int
-bnx_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
+bnx_ioctl(struct ifnet *ifp, u_long command, void *data)
 {
 	struct bnx_softc	*sc = ifp->if_softc;
 	struct ifreq		*ifr = (struct ifreq *) data;
--- a/sys/dev/pci/if_de.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_de.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_de.c,v 1.122 2006/10/24 19:18:33 drochner Exp $	*/
+/*	$NetBSD: if_de.c,v 1.122.4.1 2007/03/12 05:55:17 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@@ -37,7 +37,7 @@
  *   board which support 21040, 21041, or 21140 (mostly).
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.122 2006/10/24 19:18:33 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.122.4.1 2007/03/12 05:55:17 rmind Exp $");
 
 #define	TULIP_HDR_DATA
 
@@ -2509,7 +2509,7 @@
     /*
      * Save the hardware address.
      */
-    memcpy((caddr_t) sc->tulip_enaddr, shp->sh_ieee802_address,
+    memcpy((void *) sc->tulip_enaddr, shp->sh_ieee802_address,
 	ETHER_ADDR_LEN);
     /*
      * If this is a multiple port card, add the adapter index to the last
@@ -3072,7 +3072,7 @@
      * Check for various boards based on OUI.  Did I say braindead?
      */
     for (idx = 0; tulip_vendors[idx].vendor_identify_nic != NULL; idx++) {
-	if (memcmp((caddr_t) sc->tulip_enaddr,
+	if (memcmp((void *) sc->tulip_enaddr,
 		 tulip_vendors[idx].vendor_oui, 3) == 0) {
 	    (*tulip_vendors[idx].vendor_identify_nic)(sc);
 	    break;
@@ -3629,7 +3629,7 @@
 #if NBPFILTER > 0
 	    if (sc->tulip_bpf != NULL) {
 		if (me == ms)
-		    TULIP_BPF_TAP(sc, mtod(ms, caddr_t), total_len);
+		    TULIP_BPF_TAP(sc, mtod(ms, void *), total_len);
 		else
 		    TULIP_BPF_MTAP(sc, ms);
 	    }
@@ -3747,7 +3747,7 @@
 #error BIG_PACKET is incompatible with TULIP_COPY_RXDATA
 #endif
 		m0->m_data += 2;	/* align data after header */
-		m_copydata(ms, 0, total_len, mtod(m0, caddr_t));
+		m_copydata(ms, 0, total_len, mtod(m0, void *));
 		m0->m_len = m0->m_pkthdr.len = total_len;
 		m0->m_pkthdr.rcvif = ifp;
 #if defined(__NetBSD__)
@@ -3810,7 +3810,7 @@
 	    }
 	    TULIP_RXDESC_POSTSYNC(sc, nextout, sizeof(*nextout));
 #else /* TULIP_BUS_DMA */
-	    nextout->d_addr1 = TULIP_KVATOPHYS(sc, mtod(ms, caddr_t));
+	    nextout->d_addr1 = TULIP_KVATOPHYS(sc, mtod(ms, void *));
 	    nextout->d_length1 = TULIP_RX_BUFLEN;
 #endif /* TULIP_BUS_DMA */
 	    nextout->d_status = TULIP_DSTS_OWNER;
@@ -4282,7 +4282,7 @@
 		return NULL;
 	    }
 	}
-	m_copydata(m, 0, m->m_pkthdr.len, mtod(m0, caddr_t));
+	m_copydata(m, 0, m->m_pkthdr.len, mtod(m0, void *));
 	m0->m_pkthdr.len = m0->m_len = m->m_pkthdr.len;
     }
 #else
@@ -4313,7 +4313,7 @@
 	    (*mp)->m_len = len <= mlen ? len : mlen;
 	}
 	m_copydata(m, m->m_pkthdr.len - len,
-		   (*mp)->m_len, mtod((*mp), caddr_t));
+		   (*mp)->m_len, mtod((*mp), void *));
 	len -= (*mp)->m_len;
 	mp = &(*mp)->m_next;
 	mlen = MLEN;
@@ -4472,7 +4472,7 @@
 
     do {
 	int len = m0->m_len;
-	caddr_t addr = mtod(m0, caddr_t);
+	void *addr = mtod(m0, void *);
 	unsigned clsize = PAGE_SIZE - (((u_long) addr) & PAGE_MASK);
 
 	while (len > 0) {
@@ -4581,12 +4581,12 @@
 #if defined(TULIP_BUS_MAP) && !defined(TULIP_BUS_DMA_NOTX)
     if (eop < ri->ri_nextout) {
 	TULIP_TXDESC_PRESYNC(sc, ri->ri_nextout,
-			     (caddr_t) ri->ri_last - (caddr_t) ri->ri_nextout);
+			     (void *) ri->ri_last - (void *) ri->ri_nextout);
 	TULIP_TXDESC_PRESYNC(sc, ri->ri_first,
-			     (caddr_t) (eop + 1) - (caddr_t) ri->ri_first);
+			     (void *) (eop + 1) - (void *) ri->ri_first);
     } else {
 	TULIP_TXDESC_PRESYNC(sc, ri->ri_nextout,
-			     (caddr_t) (eop + 1) - (caddr_t) ri->ri_nextout);
+			     (void *) (eop + 1) - (void *) ri->ri_nextout);
     }
 #endif
     ri->ri_nextout->d_status = TULIP_DSTS_OWNER;
@@ -4747,7 +4747,7 @@
 tulip_ifioctl(
     struct ifnet * ifp,
     ioctl_cmd_t cmd,
-    caddr_t data)
+    void *data)
 {
     TULIP_PERFSTART(ifioctl)
     tulip_softc_t * const sc = TULIP_IFP_TO_SOFTC(ifp);
@@ -4782,8 +4782,8 @@
 	    break;
 	}
 	case SIOCGIFADDR: {
-	    memcpy((caddr_t) ((struct sockaddr *)&ifr->ifr_data)->sa_data,
-		(caddr_t) sc->tulip_enaddr, ETHER_ADDR_LEN);
+	    memcpy((void *) ((struct sockaddr *)&ifr->ifr_data)->sa_data,
+		(void *) sc->tulip_enaddr, ETHER_ADDR_LEN);
 	    break;
 	}
 
@@ -5316,7 +5316,7 @@
     ri->ri_max = ndescs;
     ri->ri_first = descs;
     ri->ri_last = ri->ri_first + ri->ri_max;
-    memset((caddr_t) ri->ri_first, 0, sizeof(ri->ri_first[0]) * ri->ri_max);
+    memset((void *) ri->ri_first, 0, sizeof(ri->ri_first[0]) * ri->ri_max);
     ri->ri_last[-1].d_flag = TULIP_DFLAG_ENDRING;
 }
 
@@ -5342,7 +5342,7 @@
 #if defined(__FreeBSD__)
 
 #define	TULIP_PCI_ATTACH_ARGS	pcici_t config_id, int unit
-#define	TULIP_SHUTDOWN_ARGS	int howto, void * arg
+#define	TULIP_SHUTDOWN_ARGS	int howto, void *arg
 
 #if defined(TULIP_DEVCONF)
 static void tulip_shutdown(TULIP_SHUTDOWN_ARGS);
@@ -5407,7 +5407,7 @@
 #endif /* __FreeBSD__ */
 
 #if defined(__bsdi__)
-#define	TULIP_PCI_ATTACH_ARGS	struct device * const parent, struct device * const self, void * const aux
+#define	TULIP_PCI_ATTACH_ARGS	struct device * const parent, struct device * const self, void *const aux
 #define	TULIP_SHUTDOWN_ARGS	void *arg
 
 static int
@@ -5465,7 +5465,7 @@
 	/* Disable memory space access */
 	pci_outl(pa, PCI_COMMAND, pci_inl(pa, PCI_COMMAND) & ~2);
 #else
-	ia->ia_maddr = (caddr_t) (pci_inl(pa, PCI_CBMA) & ~7);
+	ia->ia_maddr = (void *) (pci_inl(pa, PCI_CBMA) & ~7);
 	pci_outl(pa, PCI_CBMA, 0xFFFFFFFF);
 	ia->ia_msize = ((~pci_inl(pa, PCI_CBMA)) | 7) + 1;
 	pci_outl(pa, PCI_CBMA, (int) ia->ia_maddr);
@@ -5553,7 +5553,7 @@
 #endif /* __bsdi__ */
 
 #if defined(__NetBSD__)
-#define	TULIP_PCI_ATTACH_ARGS	struct device * const parent, struct device * const self, void * const aux
+#define	TULIP_PCI_ATTACH_ARGS	struct device * const parent, struct device * const self, void *const aux
 #define	TULIP_SHUTDOWN_ARGS	void *arg
 static int
 tulip_pci_probe(
@@ -5774,7 +5774,7 @@
     retval = pci_map_mem(config_id, PCI_CBMA, (vaddr_t *) &csr_base, &pa_csrs);
 #endif
     if (!retval) {
-	free((caddr_t) sc, M_DEVBUF);
+	free((void *) sc, M_DEVBUF);
 	return;
     }
     tulips[unit] = sc;
--- a/sys/dev/pci/if_devar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_devar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_devar.h,v 1.46 2006/11/22 01:54:09 uebayasi Exp $	*/
+/*	$NetBSD: if_devar.h,v 1.46.4.1 2007/03/12 05:55:17 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@@ -480,7 +480,7 @@
     struct intrhand tulip_ih;		/* intrrupt vectoring */
     struct atshutdown tulip_ats;	/* shutdown hook */
 #if _BSDI_VERSION < 199401
-    caddr_t tulip_bpf;			/* for BPF */
+    void *tulip_bpf;			/* for BPF */
 #else
     prf_t tulip_pf;			/* printf function */
 #if _BSDI_VERSION >= 199701
@@ -878,11 +878,11 @@
 #if defined(TULIP_BUS_DMA) && !defined(TULIP_BUS_DMA_NORX)
 #define TULIP_RXDESC_PRESYNC(sc, di, s)	\
 	bus_dmamap_sync((sc)->tulip_dmatag, (sc)->tulip_rxdescmap, \
-		   (caddr_t) di - (caddr_t) (sc)->tulip_rxdescs, \
+		   (char *) di - (char *) (sc)->tulip_rxdescs, \
 		   (s), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE)
 #define TULIP_RXDESC_POSTSYNC(sc, di, s)	\
 	bus_dmamap_sync((sc)->tulip_dmatag, (sc)->tulip_rxdescmap, \
-		   (caddr_t) di - (caddr_t) (sc)->tulip_rxdescs, \
+		   (char *) di - (char *) (sc)->tulip_rxdescs, \
 		   (s), BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE)
 #define	TULIP_RXMAP_PRESYNC(sc, map) \
 	bus_dmamap_sync((sc)->tulip_dmatag, (map), 0, (map)->dm_mapsize, \
@@ -905,11 +905,11 @@
 #if defined(TULIP_BUS_DMA) && !defined(TULIP_BUS_DMA_NOTX)
 #define TULIP_TXDESC_PRESYNC(sc, di, s)	\
 	bus_dmamap_sync((sc)->tulip_dmatag, (sc)->tulip_txdescmap, \
-			(caddr_t) di - (caddr_t) (sc)->tulip_txdescs, \
+			(char *) di - (char *) (sc)->tulip_txdescs, \
 			(s), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE)
 #define TULIP_TXDESC_POSTSYNC(sc, di, s)	\
 	bus_dmamap_sync((sc)->tulip_dmatag, (sc)->tulip_txdescmap, \
-			(caddr_t) di - (caddr_t) (sc)->tulip_txdescs, \
+			(char *) di - (char *) (sc)->tulip_txdescs, \
 			(s), BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE)
 #define	TULIP_TXMAP_PRESYNC(sc, map) \
 	bus_dmamap_sync((sc)->tulip_dmatag, (map), 0, (map)->dm_mapsize, \
--- a/sys/dev/pci/if_dge.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_dge.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_dge.c,v 1.14 2006/11/16 01:33:08 christos Exp $ */
+/*	$NetBSD: if_dge.c,v 1.14.4.1 2007/03/12 05:55:17 rmind Exp $ */
 
 /*
  * Copyright (c) 2004, SUNET, Swedish University Computer Network.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_dge.c,v 1.14 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_dge.c,v 1.14.4.1 2007/03/12 05:55:17 rmind Exp $");
 
 #include "bpfilter.h"
 #include "rnd.h"
@@ -343,7 +343,7 @@
 	rndsource_element_t rnd_source; /* random source */
 #endif
 #ifdef DGE_OFFBYONE_RXBUG
-	caddr_t sc_bugbuf;
+	void *sc_bugbuf;
 	SLIST_HEAD(, rxbugentry) sc_buglist;
 	bus_dmamap_t sc_bugmap;
 	struct rxbugentry *sc_entry;
@@ -483,7 +483,7 @@
 static int
 dge_alloc_rcvmem(struct dge_softc *sc)
 {
-	caddr_t	ptr, kva;
+	char *ptr, *kva;
 	bus_dma_segment_t seg;
 	int i, rseg, state, error;
 	struct rxbugentry *entry;
@@ -497,7 +497,7 @@
 	}
 
 	state = 1;
-	if (bus_dmamem_map(sc->sc_dmat, &seg, rseg, DGE_RXMEM, &kva,
+	if (bus_dmamem_map(sc->sc_dmat, &seg, rseg, DGE_RXMEM, (void **)&kva,
 	    BUS_DMA_NOWAIT)) {
 		printf("%s: can't map DMA buffers (%d bytes)\n",
 		    sc->sc_dev.dv_xname, (int)DGE_RXMEM);
@@ -522,7 +522,7 @@
 	}
 
 	state = 4;
-	sc->sc_bugbuf = (caddr_t)kva;
+	sc->sc_bugbuf = (void *)kva;
 	SLIST_INIT(&sc->sc_buglist);
 
 	/*
@@ -576,14 +576,14 @@
 	}
 
 	SLIST_REMOVE_HEAD(&sc->sc_buglist, rb_entry);
-	return sc->sc_bugbuf + entry->rb_slot * DGE_BUFFER_SIZE;
+	return (char *)sc->sc_bugbuf + entry->rb_slot * DGE_BUFFER_SIZE;
 }
 
 /*
  * Release a jumbo buffer.
  */
 static void
-dge_freebuf(struct mbuf *m, caddr_t buf, size_t size, void *arg)
+dge_freebuf(struct mbuf *m, void *buf, size_t size, void *arg)
 {
 	struct rxbugentry *entry;
 	struct dge_softc *sc;
@@ -597,7 +597,7 @@
 
 	/* calculate the slot this buffer belongs to */
 
-	i = (buf - sc->sc_bugbuf) / DGE_BUFFER_SIZE;
+	i = ((char *)buf - (char *)sc->sc_bugbuf) / DGE_BUFFER_SIZE;
 
 	if ((i < 0) || (i >= DGE_NBUFFERS))
 		panic("dge_freebuf: asked to free buffer %d!", i);
@@ -614,7 +614,7 @@
 
 static void	dge_start(struct ifnet *);
 static void	dge_watchdog(struct ifnet *);
-static int	dge_ioctl(struct ifnet *, u_long, caddr_t);
+static int	dge_ioctl(struct ifnet *, u_long, void *);
 static int	dge_init(struct ifnet *);
 static void	dge_stop(struct ifnet *, int);
 
@@ -774,7 +774,7 @@
 	}
 
 	if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg,
-	    sizeof(struct dge_control_data), (caddr_t *)&sc->sc_control_data,
+	    sizeof(struct dge_control_data), (void **)&sc->sc_control_data,
 	    0)) != 0) {
 		aprint_error("%s: unable to map control data, error = %d\n",
 		    sc->sc_dev.dv_xname, error);
@@ -993,7 +993,7 @@
  fail_3:
 	bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap);
  fail_2:
-	bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data,
+	bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data,
 	    sizeof(struct dge_control_data));
  fail_1:
 	bus_dmamem_free(sc->sc_dmat, &seg, rseg);
@@ -1406,7 +1406,7 @@
  *	Handle control requests from the operator.
  */
 static int
-dge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+dge_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
 	struct dge_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *) data;
@@ -2106,7 +2106,7 @@
 	struct mbuf *m;
 	int error;
 #ifdef DGE_OFFBYONE_RXBUG
-	caddr_t buf;
+	void *buf;
 #endif
 
 	MGETHDR(m, M_DONTWAIT, MT_DATA);
--- a/sys/dev/pci/if_fpa.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_fpa.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_fpa.c,v 1.47 2006/11/16 01:33:08 christos Exp $	*/
+/*	$NetBSD: if_fpa.c,v 1.47.4.1 2007/03/12 05:55:18 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com>
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fpa.c,v 1.47 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fpa.c,v 1.47.4.1 2007/03/12 05:55:18 rmind Exp $");
 
 #ifdef __NetBSD__
 #include "opt_inet.h"
@@ -223,7 +223,7 @@
 	free((void *) sc, M_DEVBUF);
 	return;
     }
-    bcopy((caddr_t) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6);
+    bcopy((void *) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6);
     pdqs_pci[unit] = sc;
     pdq_ifattach(sc, pdq_pci_ifwatchdog);
     pci_map_int(config_id, pdq_pci_ifintr, (void*) sc, &net_imask);
@@ -319,7 +319,7 @@
     ia->ia_drq = DRQNONE;
 
     /* Get the memory base address; assume the BIOS set it up correctly */
-    ia->ia_maddr = (caddr_t) (pci_inl(pa, PCI_CBMA) & ~7);
+    ia->ia_maddr = (void *) (pci_inl(pa, PCI_CBMA) & ~7);
     pci_outl(pa, PCI_CBMA, 0xFFFFFFFF);
     ia->ia_msize = ((~pci_inl(pa, PCI_CBMA)) | 7) + 1;
     pci_outl(pa, PCI_CBMA, (int) ia->ia_maddr);
@@ -365,7 +365,7 @@
 	return;
     }
 
-    bcopy((caddr_t) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6);
+    bcopy((void *) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6);
 
     pdq_ifattach(sc, pdq_pci_ifwatchdog);
 
@@ -410,7 +410,7 @@
 pdq_pci_attach(
     struct device * const parent,
     struct device * const self,
-    void * const aux)
+    void *const aux)
 {
     pdq_softc_t * const sc = (pdq_softc_t *)self;
     struct pci_attach_args * const pa = (struct pci_attach_args *) aux;
--- a/sys/dev/pci/if_ipw.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_ipw.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ipw.c,v 1.31 2006/11/16 01:33:08 christos Exp $	*/
+/*	$NetBSD: if_ipw.c,v 1.31.4.1 2007/03/12 05:55:18 rmind Exp $	*/
 /*	FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.15 2005/11/13 17:17:40 damien Exp 	*/
 
 /*-
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.31 2006/11/16 01:33:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.31.4.1 2007/03/12 05:55:18 rmind Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2100 MiniPCI driver
@@ -116,7 +116,7 @@
     struct ieee80211_node *);
 static void	ipw_start(struct ifnet *);
 static void	ipw_watchdog(struct ifnet *);
-static int	ipw_ioctl(struct ifnet *, u_long, caddr_t);
+static int	ipw_ioctl(struct ifnet *, u_long, void *);
 static int	ipw_get_table1(struct ipw_softc *, uint32_t *);
 static int	ipw_get_radio(struct ipw_softc *, int *);
 static void	ipw_stop_master(struct ipw_softc *);
@@ -417,7 +417,7 @@
 	}
 
 	error = bus_dmamem_map(sc->sc_dmat, &sc->tbd_seg, nsegs, IPW_TBD_SZ,
-	    (caddr_t *)&sc->tbd_list, BUS_DMA_NOWAIT);
+	    (void **)&sc->tbd_list, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		aprint_error("%s: could not map tbd dma memory\n",
 		    sc->sc_dev.dv_xname);
@@ -454,7 +454,7 @@
 	}
 
 	error = bus_dmamem_map(sc->sc_dmat, &sc->rbd_seg, nsegs, IPW_RBD_SZ,
-	    (caddr_t *)&sc->rbd_list, BUS_DMA_NOWAIT);
+	    (void **)&sc->rbd_list, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		aprint_error("%s: could not map rbd dma memory\n",
 		    sc->sc_dev.dv_xname);
@@ -491,7 +491,7 @@
 	}
 
 	error = bus_dmamem_map(sc->sc_dmat, &sc->status_seg, nsegs,
-	    IPW_STATUS_SZ, (caddr_t *)&sc->status_list, BUS_DMA_NOWAIT);
+	    IPW_STATUS_SZ, (void **)&sc->status_list, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		aprint_error("%s: could not map status dma memory\n",
 		    sc->sc_dev.dv_xname);
@@ -528,7 +528,7 @@
 	}
 
 	error = bus_dmamem_map(sc->sc_dmat, &sc->cmd_seg, nsegs,
-	    sizeof (struct ipw_cmd), (caddr_t *)&sc->cmd, BUS_DMA_NOWAIT);
+	    sizeof (struct ipw_cmd), (void **)&sc->cmd, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		aprint_error("%s: could not map cmd dma memory\n",
 		    sc->sc_dev.dv_xname);
@@ -567,7 +567,7 @@
 	}
 
 	error = bus_dmamem_map(sc->sc_dmat, &sc->hdr_seg, nsegs,
-	    IPW_NDATA * sizeof(struct ipw_hdr), (caddr_t *)&sc->hdr_list,
+	    IPW_NDATA * sizeof(struct ipw_hdr), (void **)&sc->hdr_list,
 	    BUS_DMA_NOWAIT);
 	if (error != 0) {
 		aprint_error("%s: could not map hdr memory\n",
@@ -697,7 +697,7 @@
 	if (sc->tbd_map != NULL) {
 		if (sc->tbd_list != NULL) {
 			bus_dmamap_unload(sc->sc_dmat, sc->tbd_map);
-			bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->tbd_list,
+			bus_dmamem_unmap(sc->sc_dmat, (void *)sc->tbd_list,
 			    IPW_TBD_SZ);
 			bus_dmamem_free(sc->sc_dmat, &sc->tbd_seg, 1);
 		}
@@ -707,7 +707,7 @@
 	if (sc->rbd_map != NULL) {
 		if (sc->rbd_list != NULL) {
 			bus_dmamap_unload(sc->sc_dmat, sc->rbd_map);
-			bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->rbd_list,
+			bus_dmamem_unmap(sc->sc_dmat, (void *)sc->rbd_list,
 			    IPW_RBD_SZ);
 			bus_dmamem_free(sc->sc_dmat, &sc->rbd_seg, 1);
 		}
@@ -717,7 +717,7 @@
 	if (sc->status_map != NULL) {
 		if (sc->status_list != NULL) {
 			bus_dmamap_unload(sc->sc_dmat, sc->status_map);
-			bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->status_list,
+			bus_dmamem_unmap(sc->sc_dmat, (void *)sc->status_list,
 			    IPW_RBD_SZ);
 			bus_dmamem_free(sc->sc_dmat, &sc->status_seg, 1);
 		}
@@ -732,7 +732,7 @@
 
  	if (sc->hdr_list != NULL) {
  		bus_dmamap_unload(sc->sc_dmat, sc->hdr_map);
- 		bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->hdr_list,
+ 		bus_dmamem_unmap(sc->sc_dmat, (void *)sc->hdr_list,
  		    IPW_NDATA * sizeof(struct ipw_hdr));
  	}
  	if (sc->hdr_map != NULL) {
@@ -1496,7 +1496,7 @@
 				return ENOMEM;
 			}
 		}
-		m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, caddr_t));
+		m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, void *));
 		m_freem(m0);
 		mnew->m_len = mnew->m_pkthdr.len;
 		m0 = mnew;
@@ -1708,7 +1708,7 @@
 }
 
 static int
-ipw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+ipw_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
 #define	IS_RUNNING(ifp) \
 	((ifp->if_flags & IFF_UP) && (ifp->if_flags & IFF_RUNNING))
--- a/sys/dev/pci/if_iwi.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_iwi.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwi.c,v 1.60 2007/01/23 15:02:50 skrll Exp $  */
+/*	$NetBSD: if_iwi.c,v 1.60.2.1 2007/03/12 05:55:18 rmind Exp $  */
 
 /*-
  * Copyright (c) 2004, 2005
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.60 2007/01/23 15:02:50 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.60.2.1 2007/03/12 05:55:18 rmind Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -143,7 +143,7 @@
 
 static int	iwi_get_table0(struct iwi_softc *, uint32_t *);
 
-static int	iwi_ioctl(struct ifnet *, u_long, caddr_t);
+static int	iwi_ioctl(struct ifnet *, u_long, void *);
 static void	iwi_stop_master(struct iwi_softc *);
 static int	iwi_reset(struct iwi_softc *);
 static int	iwi_load_ucode(struct iwi_softc *, void *, int);
@@ -535,7 +535,7 @@
 
 	error = bus_dmamem_map(sc->sc_dmat, &sc->cmdq.desc_seg, nsegs,
 	    IWI_CMD_DESC_SIZE * count,
-	    (caddr_t *)&sc->cmdq.desc, BUS_DMA_NOWAIT);
+	    (void **)&sc->cmdq.desc, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		aprint_error("%s: could not map command ring DMA memory\n",
 		    sc->sc_dev.dv_xname);
@@ -584,7 +584,7 @@
 	if (ring->desc_map != NULL) {
 		if (ring->desc != NULL) {
 			bus_dmamap_unload(sc->sc_dmat, ring->desc_map);
-			bus_dmamem_unmap(sc->sc_dmat, (caddr_t)ring->desc,
+			bus_dmamem_unmap(sc->sc_dmat, (void *)ring->desc,
 			    IWI_CMD_DESC_SIZE * ring->count);
 			bus_dmamem_free(sc->sc_dmat, &ring->desc_seg, 1);
 		}
@@ -628,7 +628,7 @@
 
 	error = bus_dmamem_map(sc->sc_dmat, &ring->desc_seg, nsegs,
 	    IWI_TX_DESC_SIZE * count,
-	    (caddr_t *)&ring->desc, BUS_DMA_NOWAIT);
+	    (void **)&ring->desc, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		aprint_error("%s: could not map tx ring DMA memory\n",
 		    sc->sc_dev.dv_xname);
@@ -708,7 +708,7 @@
 	if (ring->desc_map != NULL) {
 		if (ring->desc != NULL) {
 			bus_dmamap_unload(sc->sc_dmat, ring->desc_map);
-			bus_dmamem_unmap(sc->sc_dmat, (caddr_t)ring->desc,
+			bus_dmamem_unmap(sc->sc_dmat, (void *)ring->desc,
 			    IWI_TX_DESC_SIZE * ring->count);
 			bus_dmamem_free(sc->sc_dmat, &ring->desc_seg, 1);
 		}
@@ -1687,7 +1687,7 @@
 	desc = &txq->desc[txq->cur];
 
 	/* save and trim IEEE802.11 header */
-	m_copydata(m0, 0, hdrlen, (caddr_t)&desc->wh);
+	m_copydata(m0, 0, hdrlen, (void *)&desc->wh);
 	m_adj(m0, hdrlen);
 
 	error = bus_dmamap_load_mbuf(sc->sc_dmat, data->map, m0,
@@ -1718,7 +1718,7 @@
 				return ENOMEM;
 			}
 		}
-		m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, caddr_t));
+		m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, void *));
 		m_freem(m0);
 		mnew->m_len = mnew->m_pkthdr.len;
 		m0 = mnew;
@@ -1908,7 +1908,7 @@
 }
 
 static int
-iwi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+iwi_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
 #define	IS_RUNNING(ifp) \
 	((ifp->if_flags & IFF_UP) && (ifp->if_flags & IFF_RUNNING))
@@ -2296,7 +2296,7 @@
 	}
 
 	hdr = (const struct iwi_firmware_hdr *)sc->sc_blob;
-	printf("firmware version = %d\n", le32toh(hdr->version));
+	DPRINTF(("firmware version = %d\n", le32toh(hdr->version)));
 	if ((IWI_FW_GET_MAJOR(le32toh(hdr->version)) != IWI_FW_REQ_MAJOR) ||
 	    (IWI_FW_GET_MINOR(le32toh(hdr->version)) != IWI_FW_REQ_MINOR)) {
 		aprint_error("%s: version for '%s' %d.%d != %d.%d\n",
--- a/sys/dev/pci/if_kse.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_kse.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_kse.c,v 1.2 2006/09/29 08:49:30 tsutsui Exp $	*/
+/*	$NetBSD: if_kse.c,v 1.2.6.1 2007/03/12 05:55:18 rmind Exp $	*/
 
 /*
  * Copyright (c) 2006 Tohru Nishimura
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.2 2006/09/29 08:49:30 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.2.6.1 2007/03/12 05:55:18 rmind Exp $");
 
 #include "bpfilter.h"
 
@@ -283,7 +283,7 @@
 CFATTACH_DECL(kse, sizeof(struct kse_softc),
     kse_match, kse_attach, NULL, NULL);
 
-static int kse_ioctl(struct ifnet *, u_long, caddr_t);
+static int kse_ioctl(struct ifnet *, u_long, void *);
 static void kse_start(struct ifnet *);
 static void kse_watchdog(struct ifnet *);
 static int kse_init(struct ifnet *);
@@ -416,7 +416,7 @@
 		goto fail_0;
 	}
 	error = bus_dmamem_map(sc->sc_dmat, &seg, nseg,
-	    sizeof(struct kse_control_data), (caddr_t *)&sc->sc_control_data,
+	    sizeof(struct kse_control_data), (void **)&sc->sc_control_data,
 	    BUS_DMA_COHERENT);
 	if (error != 0) {
 		printf("%s: unable to map control data, error = %d\n",
@@ -511,7 +511,7 @@
  fail_3:
 	bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap);
  fail_2:
-	bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data,
+	bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data,
 	    sizeof(struct kse_control_data));
  fail_1:
 	bus_dmamem_free(sc->sc_dmat, &seg, nseg);
@@ -520,7 +520,7 @@
 }
 
 static int
-kse_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+kse_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
 	struct kse_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *)data;
--- a/sys/dev/pci/if_le_pci.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_le_pci.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le_pci.c,v 1.45 2006/11/16 01:33:09 christos Exp $	*/
+/*	$NetBSD: if_le_pci.c,v 1.45.4.1 2007/03/12 05:55:18 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le_pci.c,v 1.45 2006/11/16 01:33:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_pci.c,v 1.45.4.1 2007/03/12 05:55:18 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -284,7 +284,7 @@
 		return;
 	}
 	if (bus_dmamem_map(dmat, &seg, rseg, LE_PCI_MEMSIZE,
-	    (caddr_t *)&sc->sc_mem,
+	    (void **)&sc->sc_mem,
 	    BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) {
 		printf("%s: couldn't map memory for card\n",
 		    sc->sc_dev.dv_xname);
--- a/sys/dev/pci/if_lmc.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_lmc.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_lmc.c,v 1.32.4.1 2007/02/27 16:53:59 yamt Exp $ */
+/* $NetBSD: if_lmc.c,v 1.32.4.2 2007/03/12 05:55:18 rmind Exp $ */
 
 /*-
  * Copyright (c) 2002-2006 David Boggs. <boggs@boggs.palo-alto.ca.us>
@@ -2654,7 +2654,7 @@
   };
 
 static int  /* context: process */
-netgraph_ioctl(softc_t *sc, u_long cmd, caddr_t data)
+netgraph_ioctl(softc_t *sc, u_long cmd, void *data)
   {
   if (sc->config.debug)
     printf("%s: netgraph_ioctl() was called\n", NAME_UNIT);
@@ -3130,7 +3130,7 @@
   };
 
 static int  /* context: process */
-p2p_stack_ioctl(softc_t *sc, u_long cmd, caddr_t data)
+p2p_stack_ioctl(softc_t *sc, u_long cmd, void *data)
   {
   return p2p_ioctl(sc->ifp, cmd, data);
   }
@@ -3279,7 +3279,7 @@
 /* Callout from P2P: */
 /* Get the state of DCD (Data Carrier Detect). */
 static int  /* never fails */
-p2p_getmdm(struct p2pcom *p2p, caddr_t result)
+p2p_getmdm(struct p2pcom *p2p, void *result)
   {
   softc_t *sc = IFP2SC(&p2p->p2p_if);
 
@@ -3327,7 +3327,7 @@
 # endif
 
 static int  /* context: process */
-sppp_stack_ioctl(softc_t *sc, u_long cmd, caddr_t data)
+sppp_stack_ioctl(softc_t *sc, u_long cmd, void *data)
   {
   return sppp_ioctl(sc->ifp, cmd, data);
   }
@@ -3537,7 +3537,7 @@
 #if IFNET
 
 static int  /* context: process */
-rawip_ioctl(softc_t *sc, u_long cmd, caddr_t data)
+rawip_ioctl(softc_t *sc, u_long cmd, void *data)
   {
   struct ifreq *ifr = (struct ifreq *) data;
   int error = 0;
@@ -3788,7 +3788,7 @@
   }
 
 static int  /* context: process */
-ifnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+ifnet_ioctl(struct ifnet *ifp, u_long cmd, void *data)
   {
   softc_t *sc = IFP2SC(ifp);
   struct ifreq *ifr = (struct ifreq *) data;
@@ -4939,7 +4939,7 @@
 
   /* Map physical address to kernel virtual address. */
   if ((error = bus_dmamem_map(ring->tag, ring->segs, ring->nsegs,
-   size_descs, (caddr_t *)&ring->first, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)))
+   size_descs, (void **)&ring->first, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)))
     {
     printf("%s: bus_dmamem_map(): error %d\n", NAME_UNIT, error);
     return error;
@@ -5058,7 +5058,7 @@
     bus_dmamap_destroy(ring->tag, ring->map);
   /* Unmap kernel address for DMA descriptor array. */
   if (ring->first)
-    bus_dmamem_unmap(ring->tag, (caddr_t)ring->first, ring->size_descs);
+    bus_dmamem_unmap(ring->tag, (void *)ring->first, ring->size_descs);
   /* Free kernel memory for DMA descriptor array. */
   if (ring->segs[0].ds_addr)
     bus_dmamem_free(ring->tag, ring->segs, ring->nsegs);
@@ -6239,7 +6239,7 @@
  * Always called with top_lock held.
  */
 static int  /* context: process */
-lmc_ioctl(softc_t *sc, u_long cmd, caddr_t data)
+lmc_ioctl(softc_t *sc, u_long cmd, void *data)
   {
   struct iohdr  *iohdr  = (struct iohdr  *) data;
   struct ioctl  *ioctl  = (struct ioctl  *) data;
--- a/sys/dev/pci/if_lmc.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_lmc.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,5 +1,5 @@
 /*-
- * $NetBSD: if_lmc.h,v 1.7.2.1 2007/02/27 16:54:00 yamt Exp $
+ * $NetBSD: if_lmc.h,v 1.7.2.2 2007/03/12 05:55:19 rmind Exp $
  *
  * Copyright (c) 2002-2006 David Boggs. (boggs@boggs.palo-alto.ca.us)
  * All rights reserved.
@@ -1248,7 +1248,7 @@
 struct stack				/* an object */
   {
 #if IFNET || NETGRAPH
-  int (*ioctl) (softc_t *, u_long, caddr_t);
+  int (*ioctl) (softc_t *, u_long, void *);
   void (*input) (softc_t *, struct mbuf *);
   void (*output) (softc_t *);
 #elif NETDEV
@@ -1491,7 +1491,7 @@
 static void t1_detach(softc_t *);
 
 #if NETGRAPH
-static int netgraph_ioctl(softc_t *, u_long, caddr_t);
+static int netgraph_ioctl(softc_t *, u_long, void *);
 static void netgraph_input(softc_t *, struct mbuf *);
 static void netgraph_output(softc_t *);
 static void netgraph_watchdog(softc_t *);
@@ -1523,19 +1523,19 @@
 #endif /* GEN_HDLC */
 
 #if P2P
-static int p2p_stack_ioctl(softc_t *, u_long, caddr_t);
+static int p2p_stack_ioctl(softc_t *, u_long, void *);
 static void p2p_stack_input(softc_t *, struct mbuf *);
 static void p2p_stack_output(softc_t *);
 static void p2p_stack_watchdog(softc_t *);
 static int p2p_stack_open(softc_t *, struct config *);
 static int p2p_stack_attach(softc_t *, struct config *);
 static int p2p_stack_detach(softc_t *);
-static int p2p_getmdm(struct p2pcom *, caddr_t);
+static int p2p_getmdm(struct p2pcom *, void *);
 static int p2p_mdmctl(struct p2pcom *, int);
 #endif /* P2P */
 
 #if SPPP
-static int sppp_stack_ioctl(softc_t *, u_long, caddr_t);
+static int sppp_stack_ioctl(softc_t *, u_long, void *);
 static void sppp_stack_input(softc_t *, struct mbuf *);
 static void sppp_stack_output(softc_t *);
 static void sppp_stack_watchdog(softc_t *);
@@ -1547,7 +1547,7 @@
 #endif /* SPPP */
 
 #if IFNET
-static int rawip_ioctl(softc_t *, u_long, caddr_t);
+static int rawip_ioctl(softc_t *, u_long, void *);
 static void rawip_input(softc_t *, struct mbuf *);
 static void rawip_output(softc_t *);
 #elif NETDEV
@@ -1564,7 +1564,7 @@
 static void ifnet_input(struct ifnet *, struct mbuf *);
 static int ifnet_output(struct ifnet *, struct mbuf *,
 			const struct sockaddr *, struct rtentry *);
-static int ifnet_ioctl(struct ifnet *, u_long, caddr_t);
+static int ifnet_ioctl(struct ifnet *, u_long, void *);
 static void ifnet_start(struct ifnet *);
 static void ifnet_watchdog(struct ifnet *);
 
@@ -1647,7 +1647,7 @@
 static int open_proto(softc_t *, struct config *);
 static int attach_stack(softc_t *, struct config *);
 
-static int lmc_ioctl(softc_t *, u_long, caddr_t);
+static int lmc_ioctl(softc_t *, u_long, void *);
 static void lmc_watchdog(softc_t *);
 
 static void set_ready(softc_t *, int);
--- a/sys/dev/pci/if_msk.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_msk.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.7 2007/01/31 09:57:45 msaitoh Exp $ */
+/* $NetBSD: if_msk.c,v 1.7.2.1 2007/03/12 05:55:19 rmind Exp $ */
 /*	$OpenBSD: if_msk.c,v 1.42 2007/01/17 02:43:02 krw Exp $	*/
 
 /*
@@ -108,7 +108,7 @@
 void msk_txeof(struct sk_if_softc *, int);
 int msk_encap(struct sk_if_softc *, struct mbuf *, u_int32_t *);
 void msk_start(struct ifnet *);
-int msk_ioctl(struct ifnet *, u_long, caddr_t);
+int msk_ioctl(struct ifnet *, u_long, void *);
 int msk_init(struct ifnet *);
 void msk_init_yukon(struct sk_if_softc *);
 void msk_stop(struct ifnet *, int);
@@ -119,7 +119,7 @@
 int msk_newbuf(struct sk_if_softc *, int, struct mbuf *, bus_dmamap_t);
 int msk_alloc_jumbo_mem(struct sk_if_softc *);
 void *msk_jalloc(struct sk_if_softc *);
-void msk_jfree(struct mbuf *, caddr_t, size_t, void *);
+void msk_jfree(struct mbuf *, void *, size_t, void *);
 int msk_init_rx_ring(struct sk_if_softc *);
 int msk_init_tx_ring(struct sk_if_softc *);
 
@@ -129,7 +129,7 @@
 void msk_miibus_writereg(struct device *, int, int, int);
 void msk_miibus_statchg(struct device *);
 
-void msk_setfilt(struct sk_if_softc *, caddr_t, int);
+void msk_setfilt(struct sk_if_softc *, void *, int);
 void msk_setmulti(struct sk_if_softc *);
 void msk_setpromisc(struct sk_if_softc *);
 void msk_tick(void *);
@@ -324,8 +324,9 @@
 #define HASH_BITS	6
   
 void
-msk_setfilt(struct sk_if_softc *sc_if, caddr_t addr, int slot)
+msk_setfilt(struct sk_if_softc *sc_if, void *addrv, int slot)
 {
+	char *addr = addrv;
 	int base = XM_RXFILT_ENTRY(slot);
 
 	SK_XM_WRITE_2(sc_if, base, *(u_int16_t *)(&addr[0]));
@@ -491,7 +492,7 @@
 	struct msk_rx_desc	*r;
 
 	if (m == NULL) {
-		caddr_t buf = NULL;
+		void *buf = NULL;
 
 		MGETHDR(m_new, M_DONTWAIT, MT_DATA);
 		if (m_new == NULL)
@@ -544,7 +545,7 @@
 msk_alloc_jumbo_mem(struct sk_if_softc *sc_if)
 {
 	struct sk_softc		*sc = sc_if->sk_softc;
-	caddr_t			ptr, kva;
+	char *ptr, *kva;
 	bus_dma_segment_t	seg;
 	int		i, rseg, state, error;
 	struct sk_jpool_entry   *entry;
@@ -559,7 +560,7 @@
 	}
 
 	state = 1;
-	if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg, MSK_JMEM, &kva,
+	if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg, MSK_JMEM, (void **)&kva,
 			   BUS_DMA_NOWAIT)) {
 		aprint_error(": can't map dma buffers (%d bytes)", MSK_JMEM);
 		error = ENOBUFS;
@@ -583,8 +584,8 @@
 	}
 
 	state = 4;
-	sc_if->sk_cdata.sk_jumbo_buf = (caddr_t)kva;
-	DPRINTFN(1,("msk_jumbo_buf = %p\n", (caddr_t)sc_if->sk_cdata.sk_jumbo_buf));
+	sc_if->sk_cdata.sk_jumbo_buf = (void *)kva;
+	DPRINTFN(1,("msk_jumbo_buf = %p\n", (void *)sc_if->sk_cdata.sk_jumbo_buf));
 
 	LIST_INIT(&sc_if->sk_jfree_listhead);
 	LIST_INIT(&sc_if->sk_jinuse_listhead);
@@ -653,7 +654,7 @@
  * Release a jumbo buffer.
  */
 void
-msk_jfree(struct mbuf *m, caddr_t buf, size_t size, void *arg)
+msk_jfree(struct mbuf *m, void *buf, size_t size, void *arg)
 {
 	struct sk_jpool_entry *entry;
 	struct sk_if_softc *sc;
@@ -711,7 +712,7 @@
 }
 
 int
-msk_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
+msk_ioctl(struct ifnet *ifp, u_long command, void *data)
 {
 	struct sk_if_softc *sc_if = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *) data;
@@ -989,7 +990,7 @@
 	struct sk_softc *sc = (struct sk_softc *)parent;
 	struct skc_attach_args *sa = aux;
 	struct ifnet *ifp;
-	caddr_t kva;
+	void *kva;
 	bus_dma_segment_t seg;
 	int i, rseg;
 	u_int32_t chunk, val;
@@ -1175,7 +1176,7 @@
 	u_int8_t hw, skrs;
 	const char *revstr = NULL;
 	const struct sysctlnode *node;
-	caddr_t kva;
+	void *kva;
 	bus_dma_segment_t seg;
 	int rseg;
 
--- a/sys/dev/pci/if_mskvar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_mskvar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,5 +1,5 @@
 /*	$OpenBSD: if_mskvar.h,v 1.3 2006/12/28 16:34:42 kettenis Exp $	*/
-/*	$NetBSD: if_mskvar.h,v 1.3 2007/01/30 11:58:10 msaitoh Exp $	*/
+/*	$NetBSD: if_mskvar.h,v 1.3.2.1 2007/03/12 05:55:19 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -132,7 +132,7 @@
 	int			sk_rx_cons;
 	int			sk_rx_cnt;
 	/* Stick the jumbo mem management stuff here too. */
-	caddr_t			sk_jslots[MSK_JSLOTS];
+	void *			sk_jslots[MSK_JSLOTS];
 	void			*sk_jumbo_buf;
 };
 
--- a/sys/dev/pci/if_nfe.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_nfe.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_nfe.c,v 1.13 2007/01/09 10:29:27 tsutsui Exp $	*/
+/*	$NetBSD: if_nfe.c,v 1.13.2.1 2007/03/12 05:55:19 rmind Exp $	*/
 /*	$OpenBSD: if_nfe.c,v 1.52 2006/03/02 09:04:00 jsg Exp $	*/
 
 /*-
@@ -21,7 +21,7 @@
 /* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.13 2007/01/09 10:29:27 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.13.2.1 2007/03/12 05:55:19 rmind Exp $");
 
 #include "opt_inet.h"
 #include "bpfilter.h"
@@ -80,7 +80,7 @@
 int	nfe_miibus_readreg(struct device *, int, int);
 void	nfe_miibus_writereg(struct device *, int, int, int);
 int	nfe_intr(void *);
-int	nfe_ioctl(struct ifnet *, u_long, caddr_t);
+int	nfe_ioctl(struct ifnet *, u_long, void *);
 void	nfe_txdesc32_sync(struct nfe_softc *, struct nfe_desc32 *, int);
 void	nfe_txdesc64_sync(struct nfe_softc *, struct nfe_desc64 *, int);
 void	nfe_txdesc32_rsync(struct nfe_softc *, int, int, int);
@@ -95,7 +95,7 @@
 int	nfe_init(struct ifnet *);
 void	nfe_stop(struct ifnet *, int);
 struct	nfe_jbuf *nfe_jalloc(struct nfe_softc *);
-void	nfe_jfree(struct mbuf *, caddr_t, size_t, void *);
+void	nfe_jfree(struct mbuf *, void *, size_t, void *);
 int	nfe_jpool_alloc(struct nfe_softc *);
 void	nfe_jpool_free(struct nfe_softc *);
 int	nfe_alloc_rx_ring(struct nfe_softc *, struct nfe_rx_ring *);
@@ -490,40 +490,54 @@
 	struct nfe_softc *sc = arg;
 	struct ifnet *ifp = &sc->sc_ethercom.ec_if;
 	uint32_t r;
+	int handled;
 
-	if ((r = NFE_READ(sc, NFE_IRQ_STATUS)) == 0)
-		return 0;	/* not for us */
-	NFE_WRITE(sc, NFE_IRQ_STATUS, r);
+	if ((ifp->if_flags & IFF_UP) == 0)
+		return 0;
 
-	DPRINTFN(5, ("nfe_intr: interrupt register %x\n", r));
+	handled = 0;
 
 	NFE_WRITE(sc, NFE_IRQ_MASK, 0);
 
-	if (r & NFE_IRQ_LINK) {
-		NFE_READ(sc, NFE_PHY_STATUS);
-		NFE_WRITE(sc, NFE_PHY_STATUS, 0xf);
-		DPRINTF(("%s: link state changed\n", sc->sc_dev.dv_xname));
-	}
+	for (;;) {
+		r = NFE_READ(sc, NFE_IRQ_STATUS);
+		if ((r & NFE_IRQ_WANTED) == 0)
+			break;
+
+		NFE_WRITE(sc, NFE_IRQ_STATUS, r);
+		handled = 1;
+		DPRINTFN(5, ("nfe_intr: interrupt register %x\n", r));
 
-	if (ifp->if_flags & IFF_RUNNING) {
-		/* check Rx ring */
-		nfe_rxeof(sc);
+		if ((r & (NFE_IRQ_RXERR | NFE_IRQ_RX_NOBUF | NFE_IRQ_RX))
+		    != 0) {
+			/* check Rx ring */
+			nfe_rxeof(sc);
+		}
 
-		/* check Tx ring */
-		nfe_txeof(sc);
+		if ((r & (NFE_IRQ_TXERR | NFE_IRQ_TXERR2 | NFE_IRQ_TX_DONE))
+		    != 0) {
+			/* check Tx ring */
+			nfe_txeof(sc);
+		}
+
+		if ((r & NFE_IRQ_LINK) != 0) {
+			NFE_READ(sc, NFE_PHY_STATUS);
+			NFE_WRITE(sc, NFE_PHY_STATUS, 0xf);
+			DPRINTF(("%s: link state changed\n",
+			    sc->sc_dev.dv_xname));
+		}
 	}
 
 	NFE_WRITE(sc, NFE_IRQ_MASK, NFE_IRQ_WANTED);
 
-	if (ifp->if_flags & IFF_RUNNING &&
-	    !IF_IS_EMPTY(&ifp->if_snd))
+	if (handled && !IF_IS_EMPTY(&ifp->if_snd))
 		nfe_start(ifp);
 
-	return 1;
+	return handled;
 }
 
 int
-nfe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+nfe_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
 	struct nfe_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *)data;
@@ -611,7 +625,7 @@
 nfe_txdesc32_sync(struct nfe_softc *sc, struct nfe_desc32 *desc32, int ops)
 {
 	bus_dmamap_sync(sc->sc_dmat, sc->txq.map,
-	    (caddr_t)desc32 - (caddr_t)sc->txq.desc32,
+	    (char *)desc32 - (char *)sc->txq.desc32,
 	    sizeof (struct nfe_desc32), ops);
 }
 
@@ -619,7 +633,7 @@
 nfe_txdesc64_sync(struct nfe_softc *sc, struct nfe_desc64 *desc64, int ops)
 {
 	bus_dmamap_sync(sc->sc_dmat, sc->txq.map,
-	    (caddr_t)desc64 - (caddr_t)sc->txq.desc64,
+	    (char *)desc64 - (char *)sc->txq.desc64,
 	    sizeof (struct nfe_desc64), ops);
 }
 
@@ -628,20 +642,20 @@
 {
 	if (end > start) {
 		bus_dmamap_sync(sc->sc_dmat, sc->txq.map,
-		    (caddr_t)&sc->txq.desc32[start] - (caddr_t)sc->txq.desc32,
-		    (caddr_t)&sc->txq.desc32[end] -
-		    (caddr_t)&sc->txq.desc32[start], ops);
+		    (char *)&sc->txq.desc32[start] - (char *)sc->txq.desc32,
+		    (char *)&sc->txq.desc32[end] -
+		    (char *)&sc->txq.desc32[start], ops);
 		return;
 	}
 	/* sync from 'start' to end of ring */
 	bus_dmamap_sync(sc->sc_dmat, sc->txq.map,
-	    (caddr_t)&sc->txq.desc32[start] - (caddr_t)sc->txq.desc32,
-	    (caddr_t)&sc->txq.desc32[NFE_TX_RING_COUNT] -
-	    (caddr_t)&sc->txq.desc32[start], ops);
+	    (char *)&sc->txq.desc32[start] - (char *)sc->txq.desc32,
+	    (char *)&sc->txq.desc32[NFE_TX_RING_COUNT] -
+	    (char *)&sc->txq.desc32[start], ops);
 
 	/* sync from start of ring to 'end' */
 	bus_dmamap_sync(sc->sc_dmat, sc->txq.map, 0,
-	    (caddr_t)&sc->txq.desc32[end] - (caddr_t)sc->txq.desc32, ops);
+	    (char *)&sc->txq.desc32[end] - (char *)sc->txq.desc32, ops);
 }
 
 void
@@ -649,27 +663,27 @@
 {
 	if (end > start) {
 		bus_dmamap_sync(sc->sc_dmat, sc->txq.map,
-		    (caddr_t)&sc->txq.desc64[start] - (caddr_t)sc->txq.desc64,
-		    (caddr_t)&sc->txq.desc64[end] -
-		    (caddr_t)&sc->txq.desc64[start], ops);
+		    (char *)&sc->txq.desc64[start] - (char *)sc->txq.desc64,
+		    (char *)&sc->txq.desc64[end] -
+		    (char *)&sc->txq.desc64[start], ops);
 		return;
 	}
 	/* sync from 'start' to end of ring */
 	bus_dmamap_sync(sc->sc_dmat, sc->txq.map,
-	    (caddr_t)&sc->txq.desc64[start] - (caddr_t)sc->txq.desc64,
-	    (caddr_t)&sc->txq.desc64[NFE_TX_RING_COUNT] -
-	    (caddr_t)&sc->txq.desc64[start], ops);
+	    (char *)&sc->txq.desc64[start] - (char *)sc->txq.desc64,
+	    (char *)&sc->txq.desc64[NFE_TX_RING_COUNT] -
+	    (char *)&sc->txq.desc64[start], ops);
 
 	/* sync from start of ring to 'end' */
 	bus_dmamap_sync(sc->sc_dmat, sc->txq.map, 0,
-	    (caddr_t)&sc->txq.desc64[end] - (caddr_t)sc->txq.desc64, ops);
+	    (char *)&sc->txq.desc64[end] - (char *)sc->txq.desc64, ops);
 }
 
 void
 nfe_rxdesc32_sync(struct nfe_softc *sc, struct nfe_desc32 *desc32, int ops)
 {
 	bus_dmamap_sync(sc->sc_dmat, sc->rxq.map,
-	    (caddr_t)desc32 - (caddr_t)sc->rxq.desc32,
+	    (char *)desc32 - (char *)sc->rxq.desc32,
 	    sizeof (struct nfe_desc32), ops);
 }
 
@@ -677,7 +691,7 @@
 nfe_rxdesc64_sync(struct nfe_softc *sc, struct nfe_desc64 *desc64, int ops)
 {
 	bus_dmamap_sync(sc->sc_dmat, sc->rxq.map,
-	    (caddr_t)desc64 - (caddr_t)sc->rxq.desc64,
+	    (char *)desc64 - (char *)sc->rxq.desc64,
 	    sizeof (struct nfe_desc64), ops);
 }
 
@@ -692,32 +706,34 @@
 	struct mbuf *m, *mnew;
 	bus_addr_t physaddr;
 	uint16_t flags;
-	int error, len;
+	int error, len, i;
 
 	desc32 = NULL;
 	desc64 = NULL;
-	for (;;) {
-		data = &sc->rxq.data[sc->rxq.cur];
+	for (i = sc->rxq.cur;; i = NFE_RX_NEXTDESC(i)) {
+		data = &sc->rxq.data[i];
 
 		if (sc->sc_flags & NFE_40BIT_ADDR) {
-			desc64 = &sc->rxq.desc64[sc->rxq.cur];
-			nfe_rxdesc64_sync(sc, desc64, BUS_DMASYNC_POSTREAD);
+			desc64 = &sc->rxq.desc64[i];
+			nfe_rxdesc64_sync(sc, desc64,
+			    BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
 
 			flags = le16toh(desc64->flags);
 			len = le16toh(desc64->length) & 0x3fff;
 		} else {
-			desc32 = &sc->rxq.desc32[sc->rxq.cur];
-			nfe_rxdesc32_sync(sc, desc32, BUS_DMASYNC_POSTREAD);
+			desc32 = &sc->rxq.desc32[i];
+			nfe_rxdesc32_sync(sc, desc32,
+			    BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
 
 			flags = le16toh(desc32->flags);
 			len = le16toh(desc32->length) & 0x3fff;
 		}
 
-		if (flags & NFE_RX_READY)
+		if ((flags & NFE_RX_READY) != 0)
 			break;
 
 		if ((sc->sc_flags & (NFE_JUMBO_SUP | NFE_40BIT_ADDR)) == 0) {
-			if (!(flags & NFE_RX_VALID_V1))
+			if ((flags & NFE_RX_VALID_V1) == 0)
 				goto skip;
 
 			if ((flags & NFE_RX_FIXME_V1) == NFE_RX_FIXME_V1) {
@@ -725,7 +741,7 @@
 				len--;	/* fix buffer length */
 			}
 		} else {
-			if (!(flags & NFE_RX_VALID_V2))
+			if ((flags & NFE_RX_VALID_V2) == 0)
 				goto skip;
 
 			if ((flags & NFE_RX_FIXME_V2) == NFE_RX_FIXME_V2) {
@@ -761,13 +777,13 @@
 			MEXTADD(mnew, jbuf->buf, NFE_JBYTES, 0, nfe_jfree, sc);
 
 			bus_dmamap_sync(sc->sc_dmat, sc->rxq.jmap,
-			    mtod(data->m, caddr_t) - sc->rxq.jpool, NFE_JBYTES,
-			    BUS_DMASYNC_POSTREAD);
+			    mtod(data->m, char *) - (char *)sc->rxq.jpool,
+			    NFE_JBYTES, BUS_DMASYNC_POSTREAD);
 
 			physaddr = jbuf->physaddr;
 		} else {
 			MCLGET(mnew, M_DONTWAIT);
-			if (!(mnew->m_flags & M_EXT)) {
+			if ((mnew->m_flags & M_EXT) == 0) {
 				m_freem(mnew);
 				ifp->if_ierrors++;
 				goto skip;
@@ -777,15 +793,14 @@
 			    data->map->dm_mapsize, BUS_DMASYNC_POSTREAD);
 			bus_dmamap_unload(sc->sc_dmat, data->map);
 
-			error = bus_dmamap_load(sc->sc_dmat, data->map,
-			    mtod(mnew, void *), MCLBYTES, NULL,
-			    BUS_DMA_READ | BUS_DMA_NOWAIT);
+			error = bus_dmamap_load_mbuf(sc->sc_dmat, data->map,
+			    mnew, BUS_DMA_READ | BUS_DMA_NOWAIT);
 			if (error != 0) {
 				m_freem(mnew);
 
 				/* try to reload the old mbuf */
-				error = bus_dmamap_load(sc->sc_dmat, data->map,
-				    mtod(data->m, void *), MCLBYTES, NULL,
+				error = bus_dmamap_load_mbuf(sc->sc_dmat,
+				    data->map, data->m,
 				    BUS_DMA_READ | BUS_DMA_NOWAIT);
 				if (error != 0) {
 					/* very unlikely that it will fail.. */
@@ -852,20 +867,23 @@
 			desc32->physaddr = htole32(physaddr);
 		}
 
-skip:		if (sc->sc_flags & NFE_40BIT_ADDR) {
+ skip:
+		if (sc->sc_flags & NFE_40BIT_ADDR) {
 			desc64->length = htole16(sc->rxq.bufsz);
 			desc64->flags = htole16(NFE_RX_READY);
 
-			nfe_rxdesc64_sync(sc, desc64, BUS_DMASYNC_PREWRITE);
+			nfe_rxdesc64_sync(sc, desc64,
+			    BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
 		} else {
 			desc32->length = htole16(sc->rxq.bufsz);
 			desc32->flags = htole16(NFE_RX_READY);
 
-			nfe_rxdesc32_sync(sc, desc32, BUS_DMASYNC_PREWRITE);
+			nfe_rxdesc32_sync(sc, desc32,
+			    BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
 		}
-
-		sc->rxq.cur = (sc->rxq.cur + 1) % NFE_RX_RING_COUNT;
 	}
+	/* update current RX pointer */
+	sc->rxq.cur = i;
 }
 
 void
@@ -875,29 +893,35 @@
 	struct nfe_desc32 *desc32;
 	struct nfe_desc64 *desc64;
 	struct nfe_tx_data *data = NULL;
+	int i;
 	uint16_t flags;
 
-	while (sc->txq.next != sc->txq.cur) {
+	for (i = sc->txq.next;
+	    sc->txq.queued > 0;
+	    i = NFE_TX_NEXTDESC(i), sc->txq.queued--) {
 		if (sc->sc_flags & NFE_40BIT_ADDR) {
-			desc64 = &sc->txq.desc64[sc->txq.next];
-			nfe_txdesc64_sync(sc, desc64, BUS_DMASYNC_POSTREAD);
+			desc64 = &sc->txq.desc64[i];
+			nfe_txdesc64_sync(sc, desc64,
+			    BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
 
 			flags = le16toh(desc64->flags);
 		} else {
-			desc32 = &sc->txq.desc32[sc->txq.next];
-			nfe_txdesc32_sync(sc, desc32, BUS_DMASYNC_POSTREAD);
+			desc32 = &sc->txq.desc32[i];
+			nfe_txdesc32_sync(sc, desc32,
+			    BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
 
 			flags = le16toh(desc32->flags);
 		}
 
-		if (flags & NFE_TX_VALID)
+		if ((flags & NFE_TX_VALID) != 0)
 			break;
 
-		data = &sc->txq.data[sc->txq.next];
+		data = &sc->txq.data[i];
 
 		if ((sc->sc_flags & (NFE_JUMBO_SUP | NFE_40BIT_ADDR)) == 0) {
-			if (!(flags & NFE_TX_LASTFRAG_V1) && data->m == NULL)
-				goto skip;
+			if ((flags & NFE_TX_LASTFRAG_V1) == 0 &&
+			    data->m == NULL)
+				continue;
 
 			if ((flags & NFE_TX_ERROR_V1) != 0) {
 				printf("%s: tx v1 error 0x%04x\n",
@@ -906,8 +930,9 @@
 			} else
 				ifp->if_opackets++;
 		} else {
-			if (!(flags & NFE_TX_LASTFRAG_V2) && data->m == NULL)
-				goto skip;
+			if ((flags & NFE_TX_LASTFRAG_V2) == 0 &&
+			    data->m == NULL)
+				continue;
 
 			if ((flags & NFE_TX_ERROR_V2) != 0) {
 				printf("%s: tx v2 error 0x%04x\n",
@@ -920,7 +945,7 @@
 		if (data->m == NULL) {	/* should not get there */
 			printf("%s: last fragment bit w/o associated mbuf!\n",
 			    sc->sc_dev.dv_xname);
-			goto skip;
+			continue;
 		}
 
 		/* last fragment of the mbuf chain transmitted */
@@ -929,16 +954,18 @@
 		bus_dmamap_unload(sc->sc_dmat, data->active);
 		m_freem(data->m);
 		data->m = NULL;
-
-		ifp->if_timer = 0;
-
-skip:		sc->txq.queued--;
-		sc->txq.next = (sc->txq.next + 1) % NFE_TX_RING_COUNT;
 	}
 
-	if (data != NULL) {	/* at least one slot freed */
+	sc->txq.next = i;
+
+	if (sc->txq.queued < NFE_TX_RING_COUNT) {
+		/* at least one slot freed */
 		ifp->if_flags &= ~IFF_OACTIVE;
-		nfe_start(ifp);
+	}
+
+	if (sc->txq.queued == 0) {
+		/* all queued packets are sent */
+		ifp->if_timer = 0;
 	}
 }
 
@@ -987,7 +1014,7 @@
 		if (m0->m_pkthdr.csum_flags & M_CSUM_IPv4)
 			csumflags |= NFE_TX_IP_CSUM;
 		if (m0->m_pkthdr.csum_flags & (M_CSUM_TCPv4 | M_CSUM_UDPv4))
-			csumflags |= NFE_TX_TCP_CSUM;
+			csumflags |= NFE_TX_TCP_UDP_CSUM;
 	}
 
 	for (i = 0; i < map->dm_nsegs; i++) {
@@ -1019,7 +1046,7 @@
 		flags |= NFE_TX_VALID;
 
 		sc->txq.queued++;
-		sc->txq.cur = (sc->txq.cur + 1) % NFE_TX_RING_COUNT;
+		sc->txq.cur = NFE_TX_NEXTDESC(sc->txq.cur);
 	}
 
 	/* the whole mbuf chain has been setup */
@@ -1064,7 +1091,7 @@
 nfe_start(struct ifnet *ifp)
 {
 	struct nfe_softc *sc = ifp->if_softc;
-	int old = sc->txq.cur;
+	int old = sc->txq.queued;
 	struct mbuf *m0;
 
 	for (;;) {
@@ -1085,21 +1112,23 @@
 			bpf_mtap(ifp->if_bpf, m0);
 #endif
 	}
-	if (sc->txq.cur == old)	/* nothing sent */
-		return;
-
-	if (sc->sc_flags & NFE_40BIT_ADDR)
-		nfe_txdesc64_rsync(sc, old, sc->txq.cur, BUS_DMASYNC_PREWRITE);
-	else
-		nfe_txdesc32_rsync(sc, old, sc->txq.cur, BUS_DMASYNC_PREWRITE);
 
-	/* kick Tx */
-	NFE_WRITE(sc, NFE_RXTX_CTL, NFE_RXTX_KICKTX | sc->rxtxctl);
+	if (sc->txq.queued != old) {
+		/* packets are queued */
+		if (sc->sc_flags & NFE_40BIT_ADDR)
+			nfe_txdesc64_rsync(sc, old, sc->txq.cur,
+			    BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
+		else
+			nfe_txdesc32_rsync(sc, old, sc->txq.cur,
+			    BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
+		/* kick Tx */
+		NFE_WRITE(sc, NFE_RXTX_CTL, NFE_RXTX_KICKTX | sc->rxtxctl);
 
-	/*
-	 * Set a timeout in case the chip goes out to lunch.
-	 */
-	ifp->if_timer = 5;
+		/*
+		 * Set a timeout in case the chip goes out to lunch.
+		 */
+		ifp->if_timer = 5;
+	}
 }
 
 void
@@ -1301,7 +1330,7 @@
 	}
 
 	error = bus_dmamem_map(sc->sc_dmat, &ring->seg, nsegs,
-	    NFE_RX_RING_COUNT * descsize, (caddr_t *)desc, BUS_DMA_NOWAIT);
+	    NFE_RX_RING_COUNT * descsize, (void **)desc, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		printf("%s: could not map desc DMA memory\n",
 		    sc->sc_dev.dv_xname);
@@ -1444,7 +1473,7 @@
 		bus_dmamap_sync(sc->sc_dmat, ring->map, 0,
 		    ring->map->dm_mapsize, BUS_DMASYNC_POSTWRITE);
 		bus_dmamap_unload(sc->sc_dmat, ring->map);
-		bus_dmamem_unmap(sc->sc_dmat, (caddr_t)desc,
+		bus_dmamem_unmap(sc->sc_dmat, (void *)desc,
 		    NFE_RX_RING_COUNT * descsize);
 		bus_dmamem_free(sc->sc_dmat, &ring->seg, 1);
 	}
@@ -1481,14 +1510,14 @@
  * freed.
  */
 void
-nfe_jfree(struct mbuf *m, caddr_t buf, size_t size, void *arg)
+nfe_jfree(struct mbuf *m, void *buf, size_t size, void *arg)
 {
 	struct nfe_softc *sc = arg;
 	struct nfe_jbuf *jbuf;
 	int i;
 
 	/* find the jbuf from the base pointer */
-	i = (buf - sc->rxq.jpool) / NFE_JBYTES;
+	i = ((char *)buf - (char *)sc->rxq.jpool) / NFE_JBYTES;
 	if (i < 0 || i >= NFE_JPOOL_COUNT) {
 		printf("%s: request to free a buffer (%p) not managed by us\n",
 		    sc->sc_dev.dv_xname, buf);
@@ -1509,7 +1538,7 @@
 	struct nfe_rx_ring *ring = &sc->rxq;
 	struct nfe_jbuf *jbuf;
 	bus_addr_t physaddr;
-	caddr_t buf;
+	char *buf;
 	int i, nsegs, error;
 
 	/*
@@ -1623,7 +1652,7 @@
 	}
 
 	error = bus_dmamem_map(sc->sc_dmat, &ring->seg, nsegs,
-	    NFE_TX_RING_COUNT * descsize, (caddr_t *)desc, BUS_DMA_NOWAIT);
+	    NFE_TX_RING_COUNT * descsize, (void **)desc, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		printf("%s: could not map desc DMA memory\n",
 		    sc->sc_dev.dv_xname);
@@ -1707,7 +1736,7 @@
 		bus_dmamap_sync(sc->sc_dmat, ring->map, 0,
 		    ring->map->dm_mapsize, BUS_DMASYNC_POSTWRITE);
 		bus_dmamap_unload(sc->sc_dmat, ring->map);
-		bus_dmamem_unmap(sc->sc_dmat, (caddr_t)desc,
+		bus_dmamem_unmap(sc->sc_dmat, (void *)desc,
 		    NFE_TX_RING_COUNT * descsize);
 		bus_dmamem_free(sc->sc_dmat, &ring->seg, 1);
 	}
--- a/sys/dev/pci/if_nfereg.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_nfereg.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_nfereg.h,v 1.3 2007/01/09 10:29:27 tsutsui Exp $	*/
+/*	$NetBSD: if_nfereg.h,v 1.3.2.1 2007/03/12 05:55:20 rmind Exp $	*/
 /*	$OpenBSD: if_nfereg.h,v 1.16 2006/02/22 19:23:44 damien Exp $	*/
 
 /*-
@@ -22,6 +22,9 @@
 #define NFE_RX_RING_COUNT	128
 #define NFE_TX_RING_COUNT	64
 
+#define NFE_RX_NEXTDESC(x)	(((x) + 1) & (NFE_RX_RING_COUNT - 1))
+#define NFE_TX_NEXTDESC(x)	(((x) + 1) & (NFE_TX_RING_COUNT - 1))
+
 #define	ETHER_ALIGN		2
 #define NFE_JBYTES		(ETHER_MAX_LEN_JUMBO + ETHER_ALIGN)
 #define NFE_JPOOL_COUNT		(NFE_RX_RING_COUNT + 64)
@@ -144,9 +147,9 @@
 
 /* Rx/Tx descriptor */
 struct nfe_desc32 {
-	uint32_t	physaddr;
-	uint16_t	length;
-	uint16_t	flags;
+	volatile uint32_t	physaddr;
+	volatile uint16_t	length;
+	volatile uint16_t	flags;
 #define NFE_RX_FIXME_V1		0x6004
 #define NFE_RX_VALID_V1		(1 << 0)
 #define NFE_TX_ERROR_V1		0x7808
@@ -155,12 +158,12 @@
 
 /* V2 Rx/Tx descriptor */
 struct nfe_desc64 {
-	uint32_t	physaddr[2];
-	uint32_t	vtag;
+	volatile uint32_t	physaddr[2];
+	volatile uint32_t	vtag;
 #define NFE_RX_VTAG		(1 << 16)
 #define NFE_TX_VTAG		(1 << 18)
-	uint16_t	length;
-	uint16_t	flags;
+	volatile uint16_t	length;
+	volatile uint16_t	flags;
 #define NFE_RX_FIXME_V2		0x4300
 #define NFE_RX_VALID_V2		(1 << 13)
 #define NFE_RX_IP_CSUMOK	(1 << 12)
@@ -169,7 +172,7 @@
 #define NFE_TX_ERROR_V2		0x5c04
 #define NFE_TX_LASTFRAG_V2	(1 << 13)
 #define NFE_TX_IP_CSUM		(1 << 11)
-#define NFE_TX_TCP_CSUM		(1 << 10)
+#define NFE_TX_TCP_UDP_CSUM	(1 << 10)
 } __packed;
 
 /* flags common to V1/V2 descriptors */
--- a/sys/dev/pci/if_nfevar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_nfevar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_nfevar.h,v 1.1 2006/03/12 22:40:42 chs Exp $	*/
+/*	$NetBSD: if_nfevar.h,v 1.1.28.1 2007/03/12 05:55:20 rmind Exp $	*/
 /*	$OpenBSD: if_nfevar.h,v 1.11 2006/02/19 13:57:02 damien Exp $	*/
 
 /*-
@@ -38,7 +38,7 @@
 };
 
 struct nfe_jbuf {
-	caddr_t			buf;
+	void *			buf;
 	bus_addr_t		physaddr;
 	SLIST_ENTRY(nfe_jbuf)	jnext;
 };
@@ -56,7 +56,7 @@
 	bus_addr_t		physaddr;
 	struct nfe_desc32	*desc32;
 	struct nfe_desc64	*desc64;
-	caddr_t			jpool;
+	void *			jpool;
 	struct nfe_rx_data	data[NFE_RX_RING_COUNT];
 	struct nfe_jbuf		jbuf[NFE_JPOOL_COUNT];
 	SLIST_HEAD(, nfe_jbuf)	jfreelist;
--- a/sys/dev/pci/if_pcn.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_pcn.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_pcn.c,v 1.36.4.1 2007/02/27 16:54:00 yamt Exp $	*/
+/*	$NetBSD: if_pcn.c,v 1.36.4.2 2007/03/12 05:55:20 rmind Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.36.4.1 2007/02/27 16:54:00 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.36.4.2 2007/03/12 05:55:20 rmind Exp $");
 
 #include "bpfilter.h"
 #include "rnd.h"
@@ -394,7 +394,7 @@
 
 static void	pcn_start(struct ifnet *);
 static void	pcn_watchdog(struct ifnet *);
-static int	pcn_ioctl(struct ifnet *, u_long, caddr_t);
+static int	pcn_ioctl(struct ifnet *, u_long, void *);
 static int	pcn_init(struct ifnet *);
 static void	pcn_stop(struct ifnet *, int);
 
@@ -722,7 +722,7 @@
 	}
 
 	if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg,
-	     sizeof(struct pcn_control_data), (caddr_t *)&sc->sc_control_data,
+	     sizeof(struct pcn_control_data), (void **)&sc->sc_control_data,
 	     BUS_DMA_COHERENT)) != 0) {
 		printf("%s: unable to map control data, error = %d\n",
 		    sc->sc_dev.dv_xname, error);
@@ -891,7 +891,7 @@
  fail_3:
 	bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap);
  fail_2:
-	bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data,
+	bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data,
 	    sizeof(struct pcn_control_data));
  fail_1:
 	bus_dmamem_free(sc->sc_dmat, &seg, rseg);
@@ -982,7 +982,7 @@
 					break;
 				}
 			}
-			m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t));
+			m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *));
 			m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len;
 			error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap,
 			    m, BUS_DMA_WRITE|BUS_DMA_NOWAIT);
@@ -1186,7 +1186,7 @@
  *	Handle control requests from the operator.
  */
 static int
-pcn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+pcn_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
 	struct pcn_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *) data;
@@ -1535,8 +1535,8 @@
 			if (m == NULL)
 				goto dropit;
 			m->m_data += 2;
-			memcpy(mtod(m, caddr_t),
-			    mtod(rxs->rxs_mbuf, caddr_t), len);
+			memcpy(mtod(m, void *),
+			    mtod(rxs->rxs_mbuf, void *), len);
 			PCN_INIT_RXDESC(sc, i);
 			bus_dmamap_sync(sc->sc_dmat, rxs->rxs_dmamap, 0,
 			    rxs->rxs_dmamap->dm_mapsize,
--- a/sys/dev/pci/if_re_pci.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_re_pci.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_re_pci.c,v 1.23.2.1 2007/02/27 16:54:01 yamt Exp $	*/
+/*	$NetBSD: if_re_pci.c,v 1.23.2.2 2007/03/12 05:55:20 rmind Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -102,6 +102,9 @@
 	    RTK_HWREV_8100E,
 	    "RealTek 8100E PCIe 10/100BaseTX" },
 	{ PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8101E,
+	    RTK_HWREV_8100E_SPIN2,
+	    "RealTek 8100E PCIe 10/100BaseTX" },
+	{ PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8101E,
 	    RTK_HWREV_8101E,
 	    "RealTek 8101E PCIe 10/100BaseTX" },
 	{ PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8168,
@@ -223,7 +226,10 @@
 				return 0;
 			hwrev = bus_space_read_4(bst, bsh, RTK_TXCFG) &
 			    RTK_TXCFG_HWREV;
-			bus_space_unmap(bst, bsh, bsize);
+			if (ioh_valid)
+				bus_space_unmap(iot, ioh, iosize);
+			if (memh_valid)
+				bus_space_unmap(memt, memh, memsize);
 			if (t->rtk_basetype == hwrev)
 				return 2;	/* defeat rtk(4) */
 		}
@@ -379,9 +385,10 @@
 				psc->sc_ih = NULL;
 			}
 
-			if (bsize)
-				bus_space_unmap(sc->rtk_btag, sc->rtk_bhandle,
-				    bsize);
+			if (ioh_valid)
+				bus_space_unmap(iot, ioh, iosize);
+			if (memh_valid)
+				bus_space_unmap(memt, memh, memsize);
 		}
 	}
 }
--- a/sys/dev/pci/if_sip.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_sip.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_sip.c,v 1.110 2006/11/16 01:33:09 christos Exp $	*/
+/*	$NetBSD: if_sip.c,v 1.110.4.1 2007/03/12 05:55:20 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.110 2006/11/16 01:33:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.110.4.1 2007/03/12 05:55:20 rmind Exp $");
 
 #include "bpfilter.h"
 #include "rnd.h"
@@ -424,7 +424,7 @@
 
 static void	SIP_DECL(start)(struct ifnet *);
 static void	SIP_DECL(watchdog)(struct ifnet *);
-static int	SIP_DECL(ioctl)(struct ifnet *, u_long, caddr_t);
+static int	SIP_DECL(ioctl)(struct ifnet *, u_long, void *);
 static int	SIP_DECL(init)(struct ifnet *);
 static void	SIP_DECL(stop)(struct ifnet *, int);
 
@@ -784,7 +784,7 @@
 	}
 
 	if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg,
-	    sizeof(struct sip_control_data), (caddr_t *)&sc->sc_control_data,
+	    sizeof(struct sip_control_data), (void **)&sc->sc_control_data,
 	    BUS_DMA_COHERENT)) != 0) {
 		printf("%s: unable to map control data, error = %d\n",
 		    sc->sc_dev.dv_xname, error);
@@ -1126,7 +1126,7 @@
  fail_3:
 	bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap);
  fail_2:
-	bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data,
+	bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data,
 	    sizeof(struct sip_control_data));
  fail_1:
 	bus_dmamem_free(sc->sc_dmat, &seg, rseg);
@@ -1257,7 +1257,7 @@
 					break;
 				}
 			}
-			m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t));
+			m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *));
 			m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len;
 			error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap,
 			    m, BUS_DMA_WRITE|BUS_DMA_NOWAIT);
@@ -1519,7 +1519,7 @@
  *	Handle control requests from the operator.
  */
 static int
-SIP_DECL(ioctl)(struct ifnet *ifp, u_long cmd, caddr_t data)
+SIP_DECL(ioctl)(struct ifnet *ifp, u_long cmd, void *data)
 {
 	struct sip_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *)data;
@@ -1967,7 +1967,7 @@
 			MCLAIM(m, &sc->sc_ethercom.ec_rx_mowner);
 			nm->m_data += 2;
 			nm->m_pkthdr.len = nm->m_len = len;
-			m_copydata(m, 0, len, mtod(nm, caddr_t));
+			m_copydata(m, 0, len, mtod(nm, void *));
 			m_freem(m);
 			m = nm;
 		}
@@ -1982,7 +1982,7 @@
 			 * of the data two bytes further in (in the first
 			 * buffer of the chain only).
 			 */
-			memmove(mtod(m, caddr_t) + 2, mtod(m, caddr_t),
+			memmove(mtod(m, char *) + 2, mtod(m, void *),
 			    m->m_len);
 			m->m_data += 2;
 		}
@@ -2145,8 +2145,8 @@
 			if (m == NULL)
 				goto dropit;
 			MCLAIM(m, &sc->sc_ethercom.ec_rx_mowner);
-			memcpy(mtod(m, caddr_t),
-			    mtod(rxs->rxs_mbuf, caddr_t), len);
+			memcpy(mtod(m, void *),
+			    mtod(rxs->rxs_mbuf, void *), len);
 			SIP_INIT_RXDESC(sc, i);
 			bus_dmamap_sync(sc->sc_dmat, rxs->rxs_dmamap, 0,
 			    rxs->rxs_dmamap->dm_mapsize,
@@ -2194,7 +2194,7 @@
 		 * Note that we use clusters for incoming frames, so the
 		 * buffer is virtually contiguous.
 		 */
-		memcpy(mtod(m, caddr_t), mtod(rxs->rxs_mbuf, caddr_t), len);
+		memcpy(mtod(m, void *), mtod(rxs->rxs_mbuf, void *), len);
 
 		/* Allow the receive descriptor to continue using its mbuf. */
 		SIP_INIT_RXDESC(sc, i);
--- a/sys/dev/pci/if_sk.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_sk.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_sk.c,v 1.36 2007/01/30 11:42:06 msaitoh Exp $	*/
+/*	$NetBSD: if_sk.c,v 1.36.2.1 2007/03/12 05:55:21 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -176,7 +176,7 @@
 void sk_txeof(struct sk_if_softc *);
 int sk_encap(struct sk_if_softc *, struct mbuf *, u_int32_t *);
 void sk_start(struct ifnet *);
-int sk_ioctl(struct ifnet *, u_long, caddr_t);
+int sk_ioctl(struct ifnet *, u_long, void *);
 int sk_init(struct ifnet *);
 void sk_init_xmac(struct sk_if_softc *);
 void sk_init_yukon(struct sk_if_softc *);
@@ -190,7 +190,7 @@
 int sk_alloc_jumbo_mem(struct sk_if_softc *);
 void sk_free_jumbo_mem(struct sk_if_softc *);
 void *sk_jalloc(struct sk_if_softc *);
-void sk_jfree(struct mbuf *, caddr_t, size_t, void *);
+void sk_jfree(struct mbuf *, void *, size_t, void *);
 int sk_init_rx_ring(struct sk_if_softc *);
 int sk_init_tx_ring(struct sk_if_softc *);
 u_int8_t sk_vpd_readbyte(struct sk_softc *, int);
@@ -208,9 +208,9 @@
 void sk_marv_miibus_writereg(struct device *, int, int, int);
 void sk_marv_miibus_statchg(struct device *);
 
-u_int32_t sk_xmac_hash(caddr_t);
-u_int32_t sk_yukon_hash(caddr_t);
-void sk_setfilt(struct sk_if_softc *, caddr_t, int);
+u_int32_t sk_xmac_hash(void *);
+u_int32_t sk_yukon_hash(void *);
+void sk_setfilt(struct sk_if_softc *, void *, int);
 void sk_setmulti(struct sk_if_softc *);
 void sk_tick(void *);
 
@@ -557,7 +557,7 @@
 #define SK_HASH_BITS		6
 
 u_int32_t
-sk_xmac_hash(caddr_t addr)
+sk_xmac_hash(void *addr)
 {
 	u_int32_t		crc;
 
@@ -568,7 +568,7 @@
 }
 
 u_int32_t
-sk_yukon_hash(caddr_t addr)
+sk_yukon_hash(void *addr)
 {
 	u_int32_t		crc;
 
@@ -579,8 +579,9 @@
 }
 
 void
-sk_setfilt(struct sk_if_softc *sc_if, caddr_t addr, int slot)
+sk_setfilt(struct sk_if_softc *sc_if, void *addrv, int slot)
 {
+	char *addr = addrv;
 	int base = XM_RXFILT_ENTRY(slot);
 
 	SK_XM_WRITE_2(sc_if, base, *(u_int16_t *)(&addr[0]));
@@ -604,7 +605,7 @@
 	switch (sc->sk_type) {
 	case SK_GENESIS:
 		for (i = 1; i < XM_RXFILT_MAX; i++)
-			sk_setfilt(sc_if, (caddr_t)&dummy, i);
+			sk_setfilt(sc_if, (void *)&dummy, i);
 
 		SK_XM_WRITE_4(sc_if, XM_MAR0, 0);
 		SK_XM_WRITE_4(sc_if, XM_MAR2, 0);
@@ -763,7 +764,7 @@
 	struct sk_rx_desc	*r;
 
 	if (m == NULL) {
-		caddr_t buf = NULL;
+		void *buf = NULL;
 
 		MGETHDR(m_new, M_DONTWAIT, MT_DATA);
 		if (m_new == NULL) {
@@ -818,7 +819,7 @@
 sk_alloc_jumbo_mem(struct sk_if_softc *sc_if)
 {
 	struct sk_softc		*sc = sc_if->sk_softc;
-	caddr_t			ptr, kva;
+	char *ptr, *kva;
 	bus_dma_segment_t	seg;
 	int		i, rseg, state, error;
 	struct sk_jpool_entry   *entry;
@@ -833,7 +834,7 @@
 	}
 
 	state = 1;
-	if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg, SK_JMEM, &kva,
+	if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg, SK_JMEM, (void **)&kva,
 			   BUS_DMA_NOWAIT)) {
 		aprint_error("%s: can't map dma buffers (%d bytes)\n",
 		    sc->sk_dev.dv_xname, SK_JMEM);
@@ -858,7 +859,7 @@
 	}
 
 	state = 4;
-	sc_if->sk_cdata.sk_jumbo_buf = (caddr_t)kva;
+	sc_if->sk_cdata.sk_jumbo_buf = (void *)kva;
 	DPRINTFN(1,("sk_jumbo_buf = 0x%p\n", sc_if->sk_cdata.sk_jumbo_buf));
 
 	LIST_INIT(&sc_if->sk_jfree_listhead);
@@ -932,7 +933,7 @@
  * Release a jumbo buffer.
  */
 void
-sk_jfree(struct mbuf *m, caddr_t buf, size_t size, void *arg)
+sk_jfree(struct mbuf *m, void *buf, size_t size, void *arg)
 {
 	struct sk_jpool_entry *entry;
 	struct sk_if_softc *sc;
@@ -992,7 +993,7 @@
 }
 
 int
-sk_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
+sk_ioctl(struct ifnet *ifp, u_long command, void *data)
 {
 	struct sk_if_softc *sc_if = ifp->if_softc;
 	struct sk_softc *sc = sc_if->sk_softc;
@@ -1220,7 +1221,7 @@
 	struct ifnet *ifp;
 	bus_dma_segment_t seg;
 	bus_dmamap_t dmamap;
-	caddr_t kva;
+	void *kva;
 	int i, rseg;
 
 	sc_if->sk_port = sa->skc_port;
@@ -1997,7 +1998,7 @@
 }
 
 void
-sk_shutdown(void * v)
+sk_shutdown(void *v)
 {
 	struct sk_if_softc	*sc_if = (struct sk_if_softc *)v;
 	struct sk_softc		*sc = sc_if->sk_softc;
--- a/sys/dev/pci/if_skvar.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_skvar.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_skvar.h,v 1.11 2006/09/04 00:54:40 riz Exp $ */
+/* $NetBSD: if_skvar.h,v 1.11.8.1 2007/03/12 05:55:21 rmind Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -131,7 +131,7 @@
 	int			sk_rx_cons;
 	int			sk_rx_cnt;
 	/* Stick the jumbo mem management stuff here too. */
-	caddr_t			sk_jslots[SK_JSLOTS];
+	void *			sk_jslots[SK_JSLOTS];
 	void			*sk_jumbo_buf;
 
 };
--- a/sys/dev/pci/if_ste.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_ste.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ste.c,v 1.26 2007/01/07 12:57:20 mlelstv Exp $	*/
+/*	$NetBSD: if_ste.c,v 1.26.2.1 2007/03/12 05:55:21 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.26 2007/01/07 12:57:20 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.26.2.1 2007/03/12 05:55:21 rmind Exp $");
 
 #include "bpfilter.h"
 
@@ -206,7 +206,7 @@
 
 static void	ste_start(struct ifnet *);
 static void	ste_watchdog(struct ifnet *);
-static int	ste_ioctl(struct ifnet *, u_long, caddr_t);
+static int	ste_ioctl(struct ifnet *, u_long, void *);
 static int	ste_init(struct ifnet *);
 static void	ste_stop(struct ifnet *, int);
 
@@ -397,7 +397,7 @@
 	}
 
 	if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg,
-	    sizeof(struct ste_control_data), (caddr_t *)&sc->sc_control_data,
+	    sizeof(struct ste_control_data), (void **)&sc->sc_control_data,
 	    BUS_DMA_COHERENT)) != 0) {
 		printf("%s: unable to map control data, error = %d\n",
 		    sc->sc_dev.dv_xname, error);
@@ -544,7 +544,7 @@
  fail_3:
 	bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap);
  fail_2:
-	bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data,
+	bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data,
 	    sizeof(struct ste_control_data));
  fail_1:
 	bus_dmamem_free(sc->sc_dmat, &seg, rseg);
@@ -652,7 +652,7 @@
 					break;
 				}
 			}
-			m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t));
+			m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *));
 			m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len;
 			error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap,
 			    m, BUS_DMA_WRITE|BUS_DMA_NOWAIT);
@@ -798,7 +798,7 @@
  *	Handle control requests from the operator.
  */
 static int
-ste_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+ste_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
 	struct ste_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *)data;
@@ -1040,8 +1040,8 @@
 			if (m == NULL)
 				goto dropit;
 			m->m_data += 2;
-			memcpy(mtod(m, caddr_t),
-			    mtod(ds->ds_mbuf, caddr_t), len);
+			memcpy(mtod(m, void *),
+			    mtod(ds->ds_mbuf, void *), len);
 			STE_INIT_RXDESC(sc, i);
 			bus_dmamap_sync(sc->sc_dmat, ds->ds_dmamap, 0,
 			    ds->ds_dmamap->dm_mapsize,
--- a/sys/dev/pci/if_stge.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_stge.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_stge.c,v 1.35 2006/11/16 01:33:09 christos Exp $	*/
+/*	$NetBSD: if_stge.c,v 1.35.4.1 2007/03/12 05:55:21 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.35 2006/11/16 01:33:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.35.4.1 2007/03/12 05:55:21 rmind Exp $");
 
 #include "bpfilter.h"
 
@@ -269,7 +269,7 @@
 
 static void	stge_start(struct ifnet *);
 static void	stge_watchdog(struct ifnet *);
-static int	stge_ioctl(struct ifnet *, u_long, caddr_t);
+static int	stge_ioctl(struct ifnet *, u_long, void *);
 static int	stge_init(struct ifnet *);
 static void	stge_stop(struct ifnet *, int);
 
@@ -481,7 +481,7 @@
 	}
 
 	if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg,
-	    sizeof(struct stge_control_data), (caddr_t *)&sc->sc_control_data,
+	    sizeof(struct stge_control_data), (void **)&sc->sc_control_data,
 	    BUS_DMA_COHERENT)) != 0) {
 		printf("%s: unable to map control data, error = %d\n",
 		    sc->sc_dev.dv_xname, error);
@@ -728,7 +728,7 @@
  fail_3:
 	bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap);
  fail_2:
-	bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data,
+	bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data,
 	    sizeof(struct stge_control_data));
  fail_1:
 	bus_dmamem_free(sc->sc_dmat, &seg, rseg);
@@ -1016,7 +1016,7 @@
  *	Handle control requests from the operator.
  */
 static int
-stge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+stge_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
 	struct stge_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *)data;
@@ -1319,7 +1319,7 @@
 			}
 			nm->m_data += 2;
 			nm->m_pkthdr.len = nm->m_len = len;
-			m_copydata(m, 0, len, mtod(nm, caddr_t));
+			m_copydata(m, 0, len, mtod(nm, void *));
 			m_freem(m);
 			m = nm;
 		}
--- a/sys/dev/pci/if_ti.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_ti.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.73 2006/11/16 01:33:09 christos Exp $ */
+/* $NetBSD: if_ti.c,v 1.73.4.1 2007/03/12 05:55:21 rmind Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.73 2006/11/16 01:33:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.73.4.1 2007/03/12 05:55:21 rmind Exp $");
 
 #include "bpfilter.h"
 #include "opt_inet.h"
@@ -162,7 +162,7 @@
 
 static int ti_intr(void *);
 static void ti_start(struct ifnet *);
-static int ti_ioctl(struct ifnet *, u_long, caddr_t);
+static int ti_ioctl(struct ifnet *, u_long, void *);
 static void ti_init(void *);
 static void ti_init2(struct ti_softc *);
 static void ti_stop(struct ti_softc *);
@@ -172,7 +172,7 @@
 
 static u_int32_t ti_eeprom_putbyte(struct ti_softc *, int);
 static u_int8_t	ti_eeprom_getbyte(struct ti_softc *, int, u_int8_t *);
-static int ti_read_eeprom(struct ti_softc *, caddr_t, int, int);
+static int ti_read_eeprom(struct ti_softc *, void *, int, int);
 
 static void ti_add_mcast(struct ti_softc *, struct ether_addr *);
 static void ti_del_mcast(struct ti_softc *, struct ether_addr *);
@@ -181,11 +181,11 @@
 static void ti_mem(struct ti_softc *, u_int32_t, u_int32_t, const void *);
 static void ti_loadfw(struct ti_softc *);
 static void ti_cmd(struct ti_softc *, struct ti_cmd_desc *);
-static void ti_cmd_ext(struct ti_softc *, struct ti_cmd_desc *, caddr_t, int);
+static void ti_cmd_ext(struct ti_softc *, struct ti_cmd_desc *, void *, int);
 static void ti_handle_events(struct ti_softc *);
 static int ti_alloc_jumbo_mem(struct ti_softc *);
 static void *ti_jalloc(struct ti_softc *);
-static void ti_jfree(struct mbuf *, caddr_t, size_t, void *);
+static void ti_jfree(struct mbuf *, void *, size_t, void *);
 static int ti_newbuf_std(struct ti_softc *, int, struct mbuf *, bus_dmamap_t);
 static int ti_newbuf_mini(struct ti_softc *, int, struct mbuf *, bus_dmamap_t);
 static int ti_newbuf_jumbo(struct ti_softc *, int, struct mbuf *);
@@ -202,7 +202,7 @@
 static int ti_chipinit(struct ti_softc *);
 static int ti_gibinit(struct ti_softc *);
 
-static int ti_ether_ioctl(struct ifnet *, u_long, caddr_t);
+static int ti_ether_ioctl(struct ifnet *, u_long, void *);
 
 CFATTACH_DECL(ti, sizeof(struct ti_softc),
     ti_probe, ti_attach, NULL, NULL);
@@ -330,14 +330,15 @@
 /*
  * Read a sequence of bytes from the EEPROM.
  */
-static int ti_read_eeprom(sc, dest, off, cnt)
+static int ti_read_eeprom(sc, destv, off, cnt)
 	struct ti_softc		*sc;
-	caddr_t			dest;
+	void *			destv;
 	int			off;
 	int			cnt;
 {
-	int			err = 0, i;
-	u_int8_t		byte = 0;
+	char *dest = destv;
+	int err = 0, i;
+	u_int8_t byte = 0;
 
 	for (i = 0; i < cnt; i++) {
 		err = ti_eeprom_getbyte(sc, off + i, &byte);
@@ -472,12 +473,13 @@
  * Send the NIC an extended command. The 'len' parameter specifies the
  * number of command slots to include after the initial command.
  */
-static void ti_cmd_ext(sc, cmd, arg, len)
+static void ti_cmd_ext(sc, cmd, argv, len)
 	struct ti_softc		*sc;
 	struct ti_cmd_desc	*cmd;
-	caddr_t			arg;
+	void 			*argv;
 	int			len;
 {
+	char *arg = argv;
 	u_int32_t		index;
 	int		i;
 
@@ -581,8 +583,8 @@
 static int ti_alloc_jumbo_mem(sc)
 	struct ti_softc		*sc;
 {
-	caddr_t			ptr;
-	int		i;
+	char *ptr;
+	int i;
 	struct ti_jpool_entry   *entry;
 	bus_dma_segment_t dmaseg;
 	int error, dmanseg;
@@ -597,7 +599,7 @@
 	}
 
 	if ((error = bus_dmamem_map(sc->sc_dmat, &dmaseg, dmanseg,
-	    TI_JMEM, (caddr_t *)&sc->ti_cdata.ti_jumbo_buf,
+	    TI_JMEM, (void **)&sc->ti_cdata.ti_jumbo_buf,
 	    BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) {
 		printf("%s: can't map jumbo buffer, error = %d\n",
 		       sc->sc_dev.dv_xname, error);
@@ -673,7 +675,7 @@
 /*
  * Release a jumbo buffer.
  */
-static void ti_jfree(struct mbuf *m, caddr_t tbuf, size_t size,
+static void ti_jfree(struct mbuf *m, void *tbuf, size_t size,
     void *arg)
 {
 	struct ti_softc		*sc;
@@ -688,8 +690,8 @@
 
 	/* calculate the slot this buffer belongs to */
 
-	i = ((caddr_t)tbuf
-	     - (caddr_t)sc->ti_cdata.ti_jumbo_buf) / TI_JLEN;
+	i = ((char *)tbuf
+	     - (char *)sc->ti_cdata.ti_jumbo_buf) / TI_JLEN;
 
 	if ((i < 0) || (i >= TI_JSLOTS))
 		panic("ti_jfree: asked to free buffer that we don't manage!");
@@ -753,7 +755,7 @@
 		m_adj(m_new, ETHER_ALIGN);
 
 		if ((error = bus_dmamap_load(sc->sc_dmat, dmamap,
-				mtod(m_new, caddr_t), m_new->m_len, NULL,
+				mtod(m_new, void *), m_new->m_len, NULL,
 				BUS_DMA_READ|BUS_DMA_NOWAIT)) != 0) {
 			printf("%s: can't load recv map, error = %d\n",
 			       sc->sc_dev.dv_xname, error);
@@ -822,7 +824,7 @@
 		m_adj(m_new, ETHER_ALIGN);
 
 		if ((error = bus_dmamap_load(sc->sc_dmat, dmamap,
-				mtod(m_new, caddr_t), m_new->m_len, NULL,
+				mtod(m_new, void *), m_new->m_len, NULL,
 				BUS_DMA_READ|BUS_DMA_NOWAIT)) != 0) {
 			printf("%s: can't load recv map, error = %d\n",
 			       sc->sc_dev.dv_xname, error);
@@ -866,7 +868,7 @@
 	struct ti_rx_desc	*r;
 
 	if (m == NULL) {
-		caddr_t			tbuf = NULL;
+		void *			tbuf = NULL;
 
 		/* Allocate the mbuf. */
 		MGETHDR(m_new, M_DONTWAIT, MT_DATA);
@@ -901,8 +903,7 @@
 	r = &sc->ti_rdata->ti_rx_jumbo_ring[i];
 	sc->ti_cdata.ti_rx_jumbo_chain[i] = m_new;
 	TI_HOSTADDR(r->ti_addr) = sc->jumbo_dmaaddr +
-		((caddr_t)mtod(m_new, caddr_t)
-		 - (caddr_t)sc->ti_cdata.ti_jumbo_buf);
+		(mtod(m_new, char *) - (char *)sc->ti_cdata.ti_jumbo_buf);
 	r->ti_type = TI_BDTYPE_RECV_JUMBO_BD;
 	r->ti_flags = TI_BDFLAG_JUMBO_RING;
 	if (sc->ethercom.ec_if.if_capenable & IFCAP_CSUM_IPv4_Rx)
@@ -1122,7 +1123,7 @@
 	case TI_HWREV_TIGON_II:
 		ext[0] = htons(m[0]);
 		ext[1] = (htons(m[1]) << 16) | htons(m[2]);
-		TI_DO_CMD_EXT(TI_CMD_EXT_ADD_MCAST, 0, 0, (caddr_t)&ext, 2);
+		TI_DO_CMD_EXT(TI_CMD_EXT_ADD_MCAST, 0, 0, (void *)&ext, 2);
 		break;
 	default:
 		printf("%s: unknown hwrev\n", sc->sc_dev.dv_xname);
@@ -1151,7 +1152,7 @@
 	case TI_HWREV_TIGON_II:
 		ext[0] = htons(m[0]);
 		ext[1] = (htons(m[1]) << 16) | htons(m[2]);
-		TI_DO_CMD_EXT(TI_CMD_EXT_DEL_MCAST, 0, 0, (caddr_t)&ext, 2);
+		TI_DO_CMD_EXT(TI_CMD_EXT_DEL_MCAST, 0, 0, (void *)&ext, 2);
 		break;
 	default:
 		printf("%s: unknown hwrev\n", sc->sc_dev.dv_xname);
@@ -1757,7 +1758,7 @@
 	 * the NIC). This means the MAC address is actually preceded
 	 * by two zero bytes. We need to skip over those.
 	 */
-	if (ti_read_eeprom(sc, (caddr_t)&eaddr,
+	if (ti_read_eeprom(sc, (void *)&eaddr,
 				TI_EE_MAC_OFFSET + 2, ETHER_ADDR_LEN)) {
 		printf("%s: failed to read station address\n", self->dv_xname);
 		goto fail2;
@@ -1781,7 +1782,7 @@
 	}
 
 	if ((error = bus_dmamem_map(sc->sc_dmat, &dmaseg, dmanseg,
-	    sizeof(struct ti_ring_data), (caddr_t *)&sc->ti_rdata,
+	    sizeof(struct ti_ring_data), (void **)&sc->ti_rdata,
 	    BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) {
 		printf("%s: can't map ring buffer, error = %d\n",
 		       sc->sc_dev.dv_xname, error);
@@ -2746,7 +2747,7 @@
 ti_ether_ioctl(ifp, cmd, data)
 	struct ifnet *ifp;
 	u_long cmd;
-	caddr_t data;
+	void *data;
 {
 	struct ifaddr *ifa = (struct ifaddr *) data;
 	struct ti_softc *sc = ifp->if_softc;
@@ -2780,7 +2781,7 @@
 static int ti_ioctl(ifp, command, data)
 	struct ifnet		*ifp;
 	u_long			command;
-	caddr_t			data;
+	void *			data;
 {
 	struct ti_softc		*sc = ifp->if_softc;
 	struct ifreq		*ifr = (struct ifreq *) data;
--- a/sys/dev/pci/if_tireg.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_tireg.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tireg.h,v 1.17 2005/12/11 12:22:49 christos Exp $ */
+/* $NetBSD: if_tireg.h,v 1.17.26.1 2007/03/12 05:55:21 rmind Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -1064,7 +1064,7 @@
 	struct mbuf		*ti_rx_jumbo_chain[TI_JUMBO_RX_RING_CNT];
 	struct mbuf		*ti_rx_mini_chain[TI_MINI_RX_RING_CNT];
 	/* Stick the jumbo mem management stuff here too. */
-	caddr_t			ti_jslots[TI_JSLOTS];
+	void *			ti_jslots[TI_JSLOTS];
 	void			*ti_jumbo_buf;
 };
 
--- a/sys/dev/pci/if_tl.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_tl.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tl.c,v 1.81 2006/12/25 18:36:05 wiz Exp $	*/
+/*	$NetBSD: if_tl.c,v 1.81.2.1 2007/03/12 05:55:22 rmind Exp $	*/
 
 /*
  * Copyright (c) 1997 Manuel Bouyer.  All rights reserved.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tl.c,v 1.81 2006/12/25 18:36:05 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tl.c,v 1.81.2.1 2007/03/12 05:55:22 rmind Exp $");
 
 #undef TLDEBUG
 #define TL_PRIV_STATS
@@ -122,7 +122,7 @@
 static void tl_pci_attach(struct device *, struct device *, void *);
 static int tl_intr(void *);
 
-static int tl_ifioctl(struct ifnet *, ioctl_cmd_t, caddr_t);
+static int tl_ifioctl(struct ifnet *, ioctl_cmd_t, void *);
 static int tl_mediachange(struct ifnet *);
 static void tl_mediastatus(struct ifnet *, struct ifmediareq *);
 static void tl_ifwatchdog(struct ifnet *);
@@ -427,7 +427,7 @@
 	        PAGE_SIZE, 0, PAGE_SIZE,
 	        &sc->ctrl_segs, 1, &sc->ctrl_nsegs, BUS_DMA_NOWAIT) != 0 ||
 	    bus_dmamem_map(sc->tl_dmatag, &sc->ctrl_segs,
-		sc->ctrl_nsegs, PAGE_SIZE, (caddr_t*)&sc->ctrl,
+		sc->ctrl_nsegs, PAGE_SIZE, (void **)&sc->ctrl,
 		BUS_DMA_NOWAIT | BUS_DMA_COHERENT) != 0) {
 			printf("%s: can't allocate DMA memory for lists\n",
 			    sc->sc_dev.dv_xname);
@@ -1255,7 +1255,7 @@
 tl_ifioctl(ifp, cmd, data)
 	struct ifnet *ifp;
 	ioctl_cmd_t cmd;
-	caddr_t data;
+	void *data;
 {
 	struct tl_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *)data;
@@ -1357,7 +1357,7 @@
 			}
 		}
 		m_copydata(mb_head, 0, mb_head->m_pkthdr.len,
-		    mtod(mn, caddr_t));
+		    mtod(mn, void *));
 		mn->m_pkthdr.len = mn->m_len = mb_head->m_pkthdr.len;
 		m_freem(mb_head);
 		mb_head = mn;
--- a/sys/dev/pci/if_txp.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_txp.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_txp.c,v 1.18 2006/11/16 01:33:09 christos Exp $ */
+/* $NetBSD: if_txp.c,v 1.18.4.1 2007/03/12 05:55:22 rmind Exp $ */
 
 /*
  * Copyright (c) 2001
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.18 2006/11/16 01:33:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.18.4.1 2007/03/12 05:55:22 rmind Exp $");
 
 #include "bpfilter.h"
 #include "opt_inet.h"
@@ -92,7 +92,7 @@
 int txp_intr(void *);
 void txp_tick(void *);
 void txp_shutdown(void *);
-int txp_ioctl(struct ifnet *, u_long, caddr_t);
+int txp_ioctl(struct ifnet *, u_long, void *);
 void txp_start(struct ifnet *);
 void txp_stop(struct txp_softc *);
 void txp_init(struct txp_softc *);
@@ -1259,7 +1259,7 @@
 txp_ioctl(ifp, command, data)
 	struct ifnet *ifp;
 	u_long command;
-	caddr_t data;
+	void *data;
 {
 	struct txp_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *)data;
@@ -1445,7 +1445,7 @@
 					goto oactive1;
 				}
 			}
-			m_copydata(m, 0, m->m_pkthdr.len, mtod(mnew, caddr_t));
+			m_copydata(m, 0, m->m_pkthdr.len, mtod(mnew, void *));
 			mnew->m_pkthdr.len = mnew->m_len = m->m_pkthdr.len;
 			IFQ_DEQUEUE(&ifp->if_snd, m);
 			m_freem(m);
--- a/sys/dev/pci/if_txpreg.h	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_txpreg.h	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_txpreg.h,v 1.3 2005/12/11 12:22:50 christos Exp $ */
+/* $NetBSD: if_txpreg.h,v 1.3.26.1 2007/03/12 05:55:22 rmind Exp $ */
 
 /*
  * Copyright (c) 2001 Aaron Campbell <aaron@monkey.org>.
@@ -526,7 +526,7 @@
 
 struct txp_dma_alloc {
 	u_int64_t		dma_paddr;
-	caddr_t			dma_vaddr;
+	void *			dma_vaddr;
 	bus_dmamap_t		dma_map;
 	bus_dma_segment_t	dma_seg;
 	int			dma_nseg;
--- a/sys/dev/pci/if_vge.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_vge.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vge.c,v 1.33 2006/12/01 11:30:55 tsutsui Exp $ */
+/* $NetBSD: if_vge.c,v 1.33.4.1 2007/03/12 05:55:22 rmind Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.33 2006/12/01 11:30:55 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.33.4.1 2007/03/12 05:55:22 rmind Exp $");
 
 /*
  * VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver.
@@ -310,7 +310,7 @@
 static int vge_intr(void *);
 static void vge_tick(void *);
 static void vge_start(struct ifnet *);
-static int vge_ioctl(struct ifnet *, u_long, caddr_t);
+static int vge_ioctl(struct ifnet *, u_long, void *);
 static int vge_init(struct ifnet *);
 static void vge_stop(struct vge_softc *);
 static void vge_watchdog(struct ifnet *);
@@ -398,7 +398,7 @@
 		mn->m_len = MIN(sz, MCLBYTES);
 
 		m_copydata(mold, mold->m_pkthdr.len - sz, mn->m_len,
-		     mtod(mn, caddr_t));
+		     mtod(mn, void *));
 
 		sz -= mn->m_len;
 
@@ -845,7 +845,7 @@
 	/* Map the memory to kernel VA space */
 
 	error = bus_dmamem_map(sc->sc_dmat, &seg, nseg,
-	    sizeof(struct vge_control_data), (caddr_t *)&sc->sc_control_data,
+	    sizeof(struct vge_control_data), (void **)&sc->sc_control_data,
 	    BUS_DMA_NOWAIT);
 	if (error) {
 		aprint_error("%s: could not map control data dma memory\n",
@@ -922,7 +922,7 @@
  fail_4:
 	bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap);
  fail_3:
-	bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data,
+	bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data,
 	    sizeof(struct vge_control_data));
  fail_2:
 	bus_dmamem_free(sc->sc_dmat, &seg, nseg);
@@ -2042,7 +2042,7 @@
 }
 
 static int
-vge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
+vge_ioctl(struct ifnet *ifp, u_long command, void *data)
 {
 	struct vge_softc *sc;
 	struct ifreq *ifr;
--- a/sys/dev/pci/if_vr.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_vr.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vr.c,v 1.84 2006/11/16 01:33:09 christos Exp $	*/
+/*	$NetBSD: if_vr.c,v 1.84.4.1 2007/03/12 05:55:22 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -104,7 +104,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vr.c,v 1.84 2006/11/16 01:33:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vr.c,v 1.84.4.1 2007/03/12 05:55:22 rmind Exp $");
 
 #include "rnd.h"
 
@@ -315,7 +315,7 @@
 static void	vr_txeof(struct vr_softc *);
 static int	vr_intr(void *);
 static void	vr_start(struct ifnet *);
-static int	vr_ioctl(struct ifnet *, u_long, caddr_t);
+static int	vr_ioctl(struct ifnet *, u_long, void *);
 static int	vr_init(struct ifnet *);
 static void	vr_stop(struct ifnet *, int);
 static void	vr_rxdrain(struct vr_softc *);
@@ -714,8 +714,8 @@
 			MGETHDR(m, M_DONTWAIT, MT_DATA);
 			if (m == NULL)
 				goto dropit;
-			memcpy(mtod(m, caddr_t),
-			    mtod(ds->ds_mbuf, caddr_t), total_len);
+			memcpy(mtod(m, void *),
+			    mtod(ds->ds_mbuf, void *), total_len);
 			VR_INIT_RXDESC(sc, i);
 			bus_dmamap_sync(sc->vr_dmat, ds->ds_dmamap, 0,
 			    ds->ds_dmamap->dm_mapsize,
@@ -762,7 +762,7 @@
 		 * Note that we use clusters for incoming frames, so the
 		 * buffer is virtually contiguous.
 		 */
-		memcpy(mtod(m, caddr_t), mtod(ds->ds_mbuf, caddr_t),
+		memcpy(mtod(m, void *), mtod(ds->ds_mbuf, void *),
 		    total_len);
 
 		/* Allow the receive descriptor to continue using its mbuf. */
@@ -1061,14 +1061,14 @@
 					break;
 				}
 			}
-			m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t));
+			m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *));
 			m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len;
 			/*
 			 * The Rhine doesn't auto-pad, so we have to do this
 			 * ourselves.
 			 */
 			if (m0->m_pkthdr.len < VR_MIN_FRAMELEN) {
-				memset(mtod(m, caddr_t) + m0->m_pkthdr.len,
+				memset(mtod(m, char *) + m0->m_pkthdr.len,
 				    0, VR_MIN_FRAMELEN - m0->m_pkthdr.len);
 				m->m_pkthdr.len = m->m_len = VR_MIN_FRAMELEN;
 			}
@@ -1312,7 +1312,7 @@
 }
 
 static int
-vr_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
+vr_ioctl(struct ifnet *ifp, u_long command, void *data)
 {
 	struct vr_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *)data;
@@ -1665,7 +1665,7 @@
 	}
 
 	if ((error = bus_dmamem_map(sc->vr_dmat, &seg, rseg,
-	    sizeof(struct vr_control_data), (caddr_t *)&sc->vr_control_data,
+	    sizeof(struct vr_control_data), (void **)&sc->vr_control_data,
 	    BUS_DMA_COHERENT)) != 0) {
 		printf("%s: unable to map control data, error = %d\n",
 		    sc->vr_dev.dv_xname, error);
@@ -1778,7 +1778,7 @@
  fail_3:
 	bus_dmamap_destroy(sc->vr_dmat, sc->vr_cddmamap);
  fail_2:
-	bus_dmamem_unmap(sc->vr_dmat, (caddr_t)sc->vr_control_data,
+	bus_dmamem_unmap(sc->vr_dmat, (void *)sc->vr_control_data,
 	    sizeof(struct vr_control_data));
  fail_1:
 	bus_dmamem_free(sc->vr_dmat, &seg, rseg);
--- a/sys/dev/pci/if_wm.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_wm.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.131.4.1 2007/02/27 16:54:02 yamt Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.131.4.2 2007/03/12 05:55:23 rmind Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.131.4.1 2007/02/27 16:54:02 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.131.4.2 2007/03/12 05:55:23 rmind Exp $");
 
 #include "bpfilter.h"
 #include "rnd.h"
@@ -470,7 +470,7 @@
 
 static void	wm_start(struct ifnet *);
 static void	wm_watchdog(struct ifnet *);
-static int	wm_ioctl(struct ifnet *, u_long, caddr_t);
+static int	wm_ioctl(struct ifnet *, u_long, void *);
 static int	wm_init(struct ifnet *);
 static void	wm_stop(struct ifnet *, int);
 
@@ -1096,7 +1096,7 @@
 	}
 
 	if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, cdata_size,
-				    (caddr_t *)&sc->sc_control_data, 0)) != 0) {
+				    (void **)&sc->sc_control_data, 0)) != 0) {
 		aprint_error("%s: unable to map control data, error = %d\n",
 		    sc->sc_dev.dv_xname, error);
 		goto fail_1;
@@ -1533,7 +1533,7 @@
  fail_3:
 	bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap);
  fail_2:
-	bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data,
+	bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data,
 	    cdata_size);
  fail_1:
 	bus_dmamem_free(sc->sc_dmat, &seg, rseg);
@@ -1689,8 +1689,8 @@
 
 			if (v4) {
 				struct ip *ip =
-				    (void *)(mtod(m0, caddr_t) + offset);
-				th = (void *)(mtod(m0, caddr_t) + hlen);
+				    (void *)(mtod(m0, char *) + offset);
+				th = (void *)(mtod(m0, char *) + hlen);
 
 				ip->ip_len = 0;
 				th->th_sum = in_cksum_phdr(ip->ip_src.s_addr,
@@ -2234,7 +2234,7 @@
  *	Handle control requests from the operator.
  */
 static int
-wm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+wm_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
 	struct wm_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *) data;
--- a/sys/dev/pci/if_wpi.c	Mon Mar 12 05:44:59 2007 +0000
+++ b/sys/dev/pci/if_wpi.c	Mon Mar 12 05:55:05 2007 +0000
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_wpi.c,v 1.8 2007/01/25 21:17:38 njoly Exp $    */
+/*  $NetBSD: if_wpi.c,v 1.8.2.1 2007/03/12 05:55:23 rmind Exp $    */
 
 /*-
  * Copyright (c) 2006
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.8 2007/01/25 21:17:38 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.8.2.1 2007/03/12 05:55:23 rmind Exp $");
 
 /*
  * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@@ -106,7 +106,7 @@
 static int  wpi_alloc_shared(struct wpi_softc *);
 static void wpi_free_shared(struct wpi_softc *);
 static struct wpi_rbuf *wpi_alloc_rbuf(struct wpi_softc *);
-static void wpi_free_rbuf(struct mbuf *, caddr_t, size_t, void *);
+static void wpi_free_rbuf(struct mbuf *, void *, size_t, void *);
 static int  wpi_alloc_rpool(struct wpi_softc *);
 static void wpi_free_rpool(struct wpi_softc *);
 static int  wpi_alloc_rx_ring(struct wpi_softc *, struct wpi_rx_ring *);
@@ -139,7 +139,7 @@
 	struct ieee80211_node *, int);
 static void wpi_start(struct ifnet *);
 static void wpi_watchdog(struct ifnet *);
-static int  wpi_ioctl(struct ifnet *, u_long, caddr_t);
+static int  wpi_ioctl(struct ifnet *, u_long, void *);
 static void wpi_read_eeprom(struct wpi_softc *);
 static int  wpi_cmd(struct wpi_softc *, int, const void *, int, int);
 static int  wpi_wme_update(struct ieee80211com *);
@@ -561,7 +561,7 @@
  * Rx buffer is attached is freed.
  */
 static void
-wpi_free_rbuf(struct mbuf* m, caddr_t buf, size_t size, void *arg)
+wpi_free_rbuf(struct mbuf* m, void *buf, size_t size, void *arg)
 {
 	struct wpi_rbuf *rbuf = arg;
 	struct wpi_softc *sc = rbuf->sc;
@@ -598,7 +598,7 @@
 	for (i = 0; i < WPI_RBUF_COUNT; i++) {
 		rbuf = &ring->rbuf[i];
 		rbuf->sc = sc;	/* backpointer for callbacks */
-		rbuf->vaddr = ring->buf_dma.vaddr + i * WPI_RBUF_SIZE;
+		rbuf->vaddr = (char *)ring->buf_dma.vaddr + i * WPI_RBUF_SIZE;
 		rbuf->paddr = ring->buf_dma.paddr + i * WPI_RBUF_SIZE;
 
 		SLIST_INSERT_HEAD(&ring->freelist, rbuf, next);
@@ -1075,7 +1075,7 @@
 {
 	bus_dmamap_t map;
 	bus_dma