Date: Mon, 29 Sep 2008 14:24:59 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 150653 for review Message-ID: <200809291424.m8TEOxIT007667@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=150653 Change 150653 by zec@zec_tpx32 on 2008/09/29 14:24:48 IFC @ 150651 Affected files ... .. //depot/projects/vimage-commit2/src/sys/amd64/amd64/mem.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/amd64/amd64/mp_machdep.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/amd64/include/smp.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/arm/arm/mem.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/arm/arm/pmap.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/arm/at91/at91_mci.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/cam/scsi/scsi_pass.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/cam/scsi/scsi_sa.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/cam/scsi/scsi_ses.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/cam/scsi/scsi_sg.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/cam/scsi/scsi_target.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/cddl/dev/dtrace/dtrace_clone.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/compat/linprocfs/linprocfs.c#10 integrate .. //depot/projects/vimage-commit2/src/sys/conf/files.powerpc#3 integrate .. //depot/projects/vimage-commit2/src/sys/conf/files.sparc64#5 integrate .. //depot/projects/vimage-commit2/src/sys/conf/options.sparc64#4 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/ipfilter/netinet/ip_compat.h#5 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/pf/net/pf_ioctl.c#9 integrate .. //depot/projects/vimage-commit2/src/sys/dev/agp/agp.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/amr/amr.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/arcmsr/arcmsr.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/asr/asr.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/ata/ata-chipset.c#7 integrate .. //depot/projects/vimage-commit2/src/sys/dev/ata/ata-pci.h#5 integrate .. //depot/projects/vimage-commit2/src/sys/dev/ata/atapi-tape.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/atkbdc/psm.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/bktr/bktr_os.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/ce/if_ce.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/cfe/cfe_api.c#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/cfe/cfe_api.h#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/cfe/cfe_api_int.h#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/cfe/cfe_console.c#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/cfe/cfe_error.h#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/cfe/cfe_ioctl.h#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/cfe/cfe_resource.c#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/cp/if_cp.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/cpuctl/cpuctl.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/ctau/if_ct.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/drm/drm_drv.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/dev/drm/drm_fops.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/fb/fb.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/fb/vgareg.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/firewire/firewire.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/firewire/fwdev.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/hptiop/hptiop.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/iir/iir_ctrl.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/iscsi/initiator/isc_cam.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/iscsi/initiator/iscsi.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/isp/isp_freebsd.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/joy/joy.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/kbd/kbd.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/led/led.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/mlx/mlx.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/mly/mly.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/mmc/mmc.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/mmc/mmcbrvar.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/mmc/mmcreg.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/mmc/mmcsd.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/mmc/mmcvar.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/mse/mse.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/pbio/pbio.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/powermac_nvram/powermac_nvram.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/ppbus/lpt.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/ppbus/pcfclock.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/ppbus/ppi.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/rp/rpvar.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/siba/siba.c#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/siba/siba_ids.h#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/siba/siba_pcib.c#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/siba/siba_pcibvar.h#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/siba/sibareg.h#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/siba/sibavar.h#1 branch .. //depot/projects/vimage-commit2/src/sys/dev/sound/midi/sequencer.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/sound/pci/emu10kx.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/sound/pcm/dsp.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/sound/pcm/mixer.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/speaker/spkr.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/streams/streams.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/tdfx/tdfx_pci.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/twa/tw_osl_freebsd.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/twe/twe_freebsd.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/usb/ucomvar.h#4 integrate .. //depot/projects/vimage-commit2/src/sys/dev/usb/ufm.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/usb/ugen.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/usb/uhid.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/usb/ulpt.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/usb/ums.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/usb/urio.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/usb/usb.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/dev/usb/uscanner.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/vkbd/vkbd.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/xen/blkfront/blkfront.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/dev/xen/console/console.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/dev/xen/netfront/netfront.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/fs/coda/coda_fbsd.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/fs/devfs/devfs_vnops.c#7 integrate .. //depot/projects/vimage-commit2/src/sys/geom/geom_dev.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/geom/part/g_part.c#5 integrate .. //depot/projects/vimage-commit2/src/sys/geom/part/g_part_bsd.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/geom/part/g_part_pc98.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/i386/acpica/acpi_machdep.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/i386/bios/apm.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/i386/bios/smapi.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/i386/i386/db_trace.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/i386/i386/mem.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/i386/i386/mp_machdep.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/i386/include/smp.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/i386/include/xen/evtchn.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/i386/xen/mp_machdep.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/i386/xen/xen_machdep.c#9 integrate .. //depot/projects/vimage-commit2/src/sys/ia64/ia64/interrupt.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/ia64/ia64/mem.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/ia64/ia64/mp_machdep.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/ia64/ia64/sal.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/ia64/include/smp.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/kern/kern_conf.c#7 integrate .. //depot/projects/vimage-commit2/src/sys/kern/kern_shutdown.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/kern/tty.c#11 integrate .. //depot/projects/vimage-commit2/src/sys/mips/adm5120/if_admsw.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/mips/include/param.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/mips/include/smp.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/mips/mips/mem.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/mips/mips/mp_machdep.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/mips/mips/pmap.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/mips/mips/trap.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/mips/sentry5/s5_machdep.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/net/if.c#17 integrate .. //depot/projects/vimage-commit2/src/sys/net/if_tap.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/net/if_tun.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/net80211/ieee80211_scan_sta.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/netgraph/ng_device.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/netinet/in_pcb.c#16 integrate .. //depot/projects/vimage-commit2/src/sys/netinet/in_pcb.h#5 integrate .. //depot/projects/vimage-commit2/src/sys/netinet/ip.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/netinet/ip_fw2.c#22 integrate .. //depot/projects/vimage-commit2/src/sys/netinet/ip_input.c#14 integrate .. //depot/projects/vimage-commit2/src/sys/netsmb/smb_dev.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/pc98/cbus/gdc.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/pc98/cbus/olpt.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/powerpc/include/dbdma.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/powerpc/include/smp.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/powerpc/powermac/ata_dbdma.c#1 branch .. //depot/projects/vimage-commit2/src/sys/powerpc/powermac/ata_dbdma.h#1 branch .. //depot/projects/vimage-commit2/src/sys/powerpc/powermac/ata_kauai.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/powerpc/powermac/ata_macio.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/powerpc/powermac/dbdma.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/powerpc/powerpc/cpu.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/powerpc/powerpc/intr_machdep.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/powerpc/powerpc/mem.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/powerpc/powerpc/mp_machdep.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/security/audit/audit_pipe.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/sparc64/pci/schizo.c#1 branch .. //depot/projects/vimage-commit2/src/sys/sparc64/pci/schizoreg.h#1 branch .. //depot/projects/vimage-commit2/src/sys/sparc64/pci/schizovar.h#1 branch .. //depot/projects/vimage-commit2/src/sys/sparc64/sparc64/mem.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/sun4v/include/smp.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/sys/conf.h#6 integrate .. //depot/projects/vimage-commit2/src/sys/sys/pmc.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/sys/systm.h#4 integrate .. //depot/projects/vimage-commit2/src/sys/sys/types.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/vm/device_pager.c#2 integrate .. //depot/projects/vimage-commit2/src/sys/vm/vm_page.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/vm/vm_page.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/evtchn/evtchn.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/xen/gnttab.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/xen/gnttab.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/arch-ia64.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/arch-powerpc.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/arch-x86/cpuid.h#1 branch .. //depot/projects/vimage-commit2/src/sys/xen/interface/arch-x86/hvm/save.h#1 branch .. //depot/projects/vimage-commit2/src/sys/xen/interface/arch-x86/xen-mca.h#1 branch .. //depot/projects/vimage-commit2/src/sys/xen/interface/domctl.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/foreign/mkchecker.py#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/foreign/mkheader.py#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/foreign/structs.py#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/grant_table.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/hvm/hvm_op.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/hvm/ioreq.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/hvm/params.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/hvm/save.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/io/blkif.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/io/fbif.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/io/kbdif.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/io/netif.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/io/pciif.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/io/protocols.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/io/ring.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/io/xenbus.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/io/xs_wire.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/kexec.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/libelf.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/memory.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/platform.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/sysctl.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/trace.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/xen-compat.h#2 integrate .. //depot/projects/vimage-commit2/src/sys/xen/interface/xen.h#2 integrate Differences ... ==== //depot/projects/vimage-commit2/src/sys/amd64/amd64/mem.c#3 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mem.c,v 1.123 2008/06/20 05:22:09 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mem.c,v 1.124 2008/09/27 08:51:18 ed Exp $"); /* * Memory special file @@ -93,7 +93,7 @@ panic("memrw"); continue; } - if (minor(dev) == CDEV_MINOR_MEM) { + if (dev2unit(dev) == CDEV_MINOR_MEM) { v = uio->uio_offset; kmemphys: o = v & PAGE_MASK; @@ -101,7 +101,7 @@ error = uiomove((void *)PHYS_TO_DMAP(v), (int)c, uio); continue; } - else if (minor(dev) == CDEV_MINOR_KMEM) { + else if (dev2unit(dev) == CDEV_MINOR_KMEM) { v = uio->uio_offset; if (v >= DMAP_MIN_ADDRESS && v < DMAP_MAX_ADDRESS) { @@ -147,9 +147,9 @@ memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot __unused) { - if (minor(dev) == CDEV_MINOR_MEM) + if (dev2unit(dev) == CDEV_MINOR_MEM) *paddr = offset; - else if (minor(dev) == CDEV_MINOR_KMEM) + else if (dev2unit(dev) == CDEV_MINOR_KMEM) *paddr = vtophys(offset); /* else panic! */ return (0); ==== //depot/projects/vimage-commit2/src/sys/amd64/amd64/mp_machdep.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.293 2008/09/08 09:59:05 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.294 2008/09/28 18:34:14 marius Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -1013,21 +1013,6 @@ } /* - * send an IPI INTerrupt containing 'vector' to all CPUs, including myself - */ -void -ipi_all(u_int ipi) -{ - - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { - ipi_selected(all_cpus, ipi); - return; - } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_ALL); -} - -/* * send an IPI to all CPUs EXCEPT myself */ void @@ -1042,21 +1027,6 @@ lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } -/* - * send an IPI to myself - */ -void -ipi_self(u_int ipi) -{ - - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { - ipi_selected(PCPU_GET(cpumask), ipi); - return; - } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_SELF); -} - #ifdef STOP_NMI /* * send NMI IPI to selected CPUs ==== //depot/projects/vimage-commit2/src/sys/amd64/include/smp.h#2 (text+ko) ==== @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $FreeBSD: src/sys/amd64/include/smp.h,v 1.92 2008/03/02 07:58:40 jeff Exp $ + * $FreeBSD: src/sys/amd64/include/smp.h,v 1.93 2008/09/28 18:34:14 marius Exp $ * */ @@ -55,9 +55,7 @@ void cpustop_handler(void); void init_secondary(void); void ipi_selected(u_int cpus, u_int ipi); -void ipi_all(u_int ipi); void ipi_all_but_self(u_int ipi); -void ipi_self(u_int ipi); void ipi_bitmap_handler(struct trapframe frame); u_int mp_bootaddress(u_int); int mp_grab_cpu_hlt(void); ==== //depot/projects/vimage-commit2/src/sys/arm/arm/mem.c#2 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/mem.c,v 1.5 2007/02/13 15:35:57 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/mem.c,v 1.6 2008/09/27 08:51:18 ed Exp $"); /* * Memory special file @@ -91,7 +91,7 @@ panic("memrw"); continue; } - if (minor(dev) == CDEV_MINOR_MEM) { + if (dev2unit(dev) == CDEV_MINOR_MEM) { int i; int address_valid = 0; @@ -116,7 +116,7 @@ pmap_qremove((vm_offset_t)_tmppt, 1); continue; } - else if (minor(dev) == CDEV_MINOR_KMEM) { + else if (dev2unit(dev) == CDEV_MINOR_KMEM) { c = iov->iov_len; /* @@ -156,9 +156,9 @@ memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot __unused) { - if (minor(dev) == CDEV_MINOR_MEM) + if (dev2unit(dev) == CDEV_MINOR_MEM) *paddr = offset; - else if (minor(dev) == CDEV_MINOR_KMEM) + else if (dev2unit(dev) == CDEV_MINOR_KMEM) *paddr = vtophys(offset); /* else panic! */ return (0); ==== //depot/projects/vimage-commit2/src/sys/arm/arm/pmap.c#2 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.101 2008/05/18 04:16:55 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.102 2008/09/28 05:36:25 imp Exp $"); #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -2592,7 +2592,6 @@ cpu_tlb_flushD(); cpu_cpwait(); kernel_vm_end = pmap_curmaxkvaddr; - } ==== //depot/projects/vimage-commit2/src/sys/arm/at91/at91_mci.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_mci.c,v 1.5 2008/09/05 22:30:59 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_mci.c,v 1.6 2008/09/28 23:37:56 imp Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -642,6 +642,9 @@ case MMCBR_IVAR_VDD: *(int *)result = sc->host.ios.vdd; break; + case MMCBR_IVAR_CAPS: + *(int *)result = sc->host.ios.caps; + break; } return (0); } @@ -678,9 +681,11 @@ case MMCBR_IVAR_VDD: sc->host.ios.vdd = value; break; + /* These are read-only */ case MMCBR_IVAR_HOST_OCR: case MMCBR_IVAR_F_MIN: case MMCBR_IVAR_F_MAX: + case MMCBR_IVAR_CAPS: return (EINVAL); } return (0); ==== //depot/projects/vimage-commit2/src/sys/cam/scsi/scsi_pass.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_pass.c,v 1.48 2007/05/16 16:54:23 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_pass.c,v 1.49 2008/09/26 14:19:52 ed Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -265,7 +265,7 @@ mtx_unlock(periph->sim->mtx); no_tags = (cgd->inq_data.flags & SID_CmdQue) == 0; softc->device_stats = devstat_new_entry("pass", - unit2minor(periph->unit_number), 0, + periph->unit_number, 0, DEVSTAT_NO_BLOCKSIZE | (no_tags ? DEVSTAT_NO_ORDERED_TAGS : 0), softc->pd_type | @@ -274,7 +274,7 @@ DEVSTAT_PRIORITY_PASS); /* Register the device */ - softc->dev = make_dev(&pass_cdevsw, unit2minor(periph->unit_number), + softc->dev = make_dev(&pass_cdevsw, periph->unit_number, UID_ROOT, GID_OPERATOR, 0600, "%s%d", periph->periph_name, periph->unit_number); mtx_lock(periph->sim->mtx); ==== //depot/projects/vimage-commit2/src/sys/cam/scsi/scsi_sa.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.113 2007/06/16 18:20:29 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.114 2008/09/27 08:51:18 ed Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -175,11 +175,11 @@ /* units are bits 4-7, 16-21 (1024 units) */ #define SAUNIT(DEV) \ - (((minor(DEV) & 0xF0) >> 4) | ((minor(DEV) & 0x3f0000) >> 16)) + (((dev2unit(DEV) & 0xF0) >> 4) | ((dev2unit(DEV) & 0x3f0000) >> 16)) -#define SAMODE(z) ((minor(z) & 0x3)) -#define SADENSITY(z) (((minor(z) >> 2) & 0x3)) -#define SA_IS_CTRL(z) (minor(z) & (1 << 29)) +#define SAMODE(z) ((dev2unit(z) & 0x3)) +#define SADENSITY(z) (((dev2unit(z) >> 2) & 0x3)) +#define SA_IS_CTRL(z) (dev2unit(z) & (1 << 29)) #define SA_NOT_CTLDEV 0 #define SA_CTLDEV 1 ==== //depot/projects/vimage-commit2/src/sys/cam/scsi/scsi_ses.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ses.c,v 1.37 2008/03/17 17:18:16 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ses.c,v 1.39 2008/09/27 08:51:18 ed Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -155,7 +155,7 @@ #define SES_FLAG_OPEN 0x02 #define SES_FLAG_INITIALIZED 0x04 -#define SESUNIT(x) (minor((x))) +#define SESUNIT(x) (dev2unit((x))) static d_open_t sesopen; static d_close_t sesclose; @@ -343,7 +343,7 @@ } cam_periph_unlock(periph); - softc->ses_dev = make_dev(&ses_cdevsw, unit2minor(periph->unit_number), + softc->ses_dev = make_dev(&ses_cdevsw, periph->unit_number, UID_ROOT, GID_OPERATOR, 0600, "%s%d", periph->periph_name, periph->unit_number); cam_periph_lock(periph); ==== //depot/projects/vimage-commit2/src/sys/cam/scsi/scsi_sg.c#2 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sg.c,v 1.9 2007/05/16 16:54:23 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sg.c,v 1.10 2008/09/26 14:19:52 ed Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -287,7 +287,7 @@ cam_periph_unlock(periph); no_tags = (cgd->inq_data.flags & SID_CmdQue) == 0; softc->device_stats = devstat_new_entry("sg", - unit2minor(periph->unit_number), 0, + periph->unit_number, 0, DEVSTAT_NO_BLOCKSIZE | (no_tags ? DEVSTAT_NO_ORDERED_TAGS : 0), softc->pd_type | @@ -296,7 +296,7 @@ DEVSTAT_PRIORITY_PASS); /* Register the device */ - softc->dev = make_dev(&sg_cdevsw, unit2minor(periph->unit_number), + softc->dev = make_dev(&sg_cdevsw, periph->unit_number, UID_ROOT, GID_OPERATOR, 0600, "%s%d", periph->periph_name, periph->unit_number); (void)make_dev_alias(softc->dev, "sg%c", 'a' + periph->unit_number); ==== //depot/projects/vimage-commit2/src/sys/cam/scsi/scsi_target.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.73 2007/04/15 08:49:11 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.75 2008/09/27 08:51:18 ed Exp $"); #include <sys/param.h> @@ -180,7 +180,7 @@ /* Create the targ device, allocate its softc, initialize it */ if ((dev->si_flags & SI_NAMED) == 0) { - make_dev(&targ_cdevsw, minor(dev), UID_ROOT, GID_WHEEL, 0600, + make_dev(&targ_cdevsw, dev2unit(dev), UID_ROOT, GID_WHEEL, 0600, "targ%d", dev2unit(dev)); } MALLOC(softc, struct targ_softc *, sizeof(*softc), M_TARG, @@ -1031,7 +1031,7 @@ return; if (dev_stdclone(name, NULL, "targ", &u) != 1) return; - *dev = make_dev(&targ_cdevsw, unit2minor(u), UID_ROOT, GID_WHEEL, + *dev = make_dev(&targ_cdevsw, u, UID_ROOT, GID_WHEEL, 0600, "targ%d", u); dev_ref(*dev); (*dev)->si_flags |= SI_CHEAPCLONE; ==== //depot/projects/vimage-commit2/src/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c#4 (text+ko) ==== @@ -18,7 +18,7 @@ * * CDDL HEADER END * - * $FreeBSD: src/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c,v 1.6 2008/08/19 21:28:58 jb Exp $ + * $FreeBSD: src/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c,v 1.8 2008/09/27 17:52:48 jb Exp $ */ /* @@ -12815,8 +12815,12 @@ state = ddi_get_soft_state(dtrace_softstate, minor); #else if (dev != NULL) { - cr = dev->si_cred; - m = minor(dev); + /* + * Disable this until we have the ability to set user + * credentials for DTrace. + * cr = dev->si_cred; + */ + m = dev2unit(dev); } /* Allocate memory for the state. */ @@ -15266,7 +15270,7 @@ * The first minor device is the one that is cloned so there is * nothing more to do here. */ - if (minor(dev) == 0) + if (dev2unit(dev) == 0) return 0; /* @@ -15367,7 +15371,7 @@ dtrace_state_t *state = dev->si_drv1; /* Check if this is not a cloned device. */ - if (minor(dev) == 0) + if (dev2unit(dev) == 0) return (0); #endif ==== //depot/projects/vimage-commit2/src/sys/cddl/dev/dtrace/dtrace_clone.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * - * $FreeBSD: src/sys/cddl/dev/dtrace/dtrace_clone.c,v 1.1 2008/05/23 05:59:41 jb Exp $ + * $FreeBSD: src/sys/cddl/dev/dtrace/dtrace_clone.c,v 1.2 2008/09/26 14:19:52 ed Exp $ * */ @@ -52,7 +52,7 @@ /* Clone the device to the new minor number. */ if (clone_create(&dtrace_clones, &dtrace_cdevsw, &u, dev, 0) != 0) /* Create the /dev/dtrace/dtraceNN entry. */ - *dev = make_dev_cred(&dtrace_cdevsw, unit2minor(u), cred, + *dev = make_dev_cred(&dtrace_cdevsw, u, cred, UID_ROOT, GID_WHEEL, 0600, "dtrace/dtrace%d", u); if (*dev != NULL) { dev_ref(*dev); ==== //depot/projects/vimage-commit2/src/sys/compat/linprocfs/linprocfs.c#10 (text+ko) ==== @@ -42,7 +42,7 @@ #include "opt_compat.h" #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.122 2008/08/28 15:23:18 attilio Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.123 2008/09/26 15:29:18 cognet Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -223,7 +223,7 @@ "sep", "sep", "mtrr", "pge", "mca", "cmov", "pat", "pse36", "pn", "b19", "b20", "b21", "mmxext", "mmx", "fxsr", - "xmm", "b26", "b27", "b28", "b29", + "xmm", "sse2", "b27", "b28", "b29", "3dnowext", "3dnow" }; ==== //depot/projects/vimage-commit2/src/sys/conf/files.powerpc#3 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.powerpc,v 1.80 2008/08/26 10:41:49 raj Exp $ +# $FreeBSD: src/sys/conf/files.powerpc,v 1.81 2008/09/27 15:13:44 nwhitehorn Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -109,6 +109,7 @@ powerpc/ofw/ofw_syscons.c optional sc aim powerpc/powermac/ata_kauai.c optional powermac ata powerpc/powermac/ata_macio.c optional powermac ata +powerpc/powermac/ata_dbdma.c optional powermac ata powerpc/powermac/dbdma.c optional powermac pci powerpc/powermac/grackle.c optional powermac pci powerpc/powermac/hrowpic.c optional powermac pci ==== //depot/projects/vimage-commit2/src/sys/conf/files.sparc64#5 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.sparc64,v 1.99 2008/09/20 11:34:18 marius Exp $ +# $FreeBSD: src/sys/conf/files.sparc64,v 1.100 2008/09/28 00:07:05 marius Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -84,6 +84,7 @@ sparc64/pci/ofw_pcib_subr.c optional pci sparc64/pci/ofw_pcibus.c optional pci sparc64/pci/psycho.c optional pci +sparc64/pci/schizo.c optional pci sparc64/sbus/dma_sbus.c optional sbus sparc64/sbus/sbus.c optional sbus sparc64/sbus/lsi64854.c optional sbus ==== //depot/projects/vimage-commit2/src/sys/conf/options.sparc64#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.sparc64,v 1.17 2008/09/20 11:46:07 marius Exp $ +# $FreeBSD: src/sys/conf/options.sparc64,v 1.18 2008/09/28 00:07:05 marius Exp $ GFB_DEBUG opt_gfb.h GFB_NO_FONT_LOADING opt_gfb.h @@ -24,5 +24,7 @@ DEBUGGER_ON_POWERFAIL opt_psycho.h PSYCHO_DEBUG opt_psycho.h +SCHIZO_DEBUG opt_schizo.h + SUNKBD_DFLT_KEYMAP opt_sunkbd.h SUNKBD_EMULATE_ATKBD opt_sunkbd.h ==== //depot/projects/vimage-commit2/src/sys/contrib/ipfilter/netinet/ip_compat.h#5 (text+ko) ==== @@ -4,7 +4,7 @@ * See the IPFILTER.LICENCE file for details on licencing. * * @(#)ip_compat.h 1.8 1/14/96 - * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_compat.h,v 1.36 2008/07/24 12:35:05 darrenr Exp $ + * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_compat.h,v 1.37 2008/09/27 08:51:18 ed Exp $ * Id: ip_compat.h,v 2.142.2.57 2007/10/10 09:51:42 darrenr Exp $ */ @@ -1709,7 +1709,7 @@ # endif # ifndef GET_MINOR -# define GET_MINOR(x) minor(x) +# define GET_MINOR(x) dev2unit(x) # endif # define PANIC(x,y) if (x) panic y #endif /* _KERNEL */ ==== //depot/projects/vimage-commit2/src/sys/contrib/pf/net/pf_ioctl.c#9 (text+ko) ==== @@ -40,7 +40,7 @@ #include "opt_inet6.h" #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/contrib/pf/net/pf_ioctl.c,v 1.35 2008/08/17 23:27:27 bz Exp $"); +__FBSDID("$FreeBSD: src/sys/contrib/pf/net/pf_ioctl.c,v 1.36 2008/09/27 08:51:18 ed Exp $"); #endif #ifdef __FreeBSD__ @@ -478,7 +478,7 @@ int pfopen(struct cdev *dev, int flags, int fmt, struct proc *p) { - if (minor(dev) >= 1) + if (dev2unit(dev) >= 1) return (ENXIO); return (0); } @@ -486,7 +486,7 @@ int pfclose(struct cdev *dev, int flags, int fmt, struct proc *p) { - if (minor(dev) >= 1) + if (dev2unit(dev) >= 1) return (ENXIO); return (0); } ==== //depot/projects/vimage-commit2/src/sys/dev/agp/agp.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/agp/agp.c,v 1.59 2008/08/23 15:57:43 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/agp/agp.c,v 1.60 2008/09/27 08:51:18 ed Exp $"); #include "opt_bus.h" @@ -80,7 +80,7 @@ }; static devclass_t agp_devclass; -#define KDEV2DEV(kdev) devclass_get_device(agp_devclass, minor(kdev)) +#define KDEV2DEV(kdev) devclass_get_device(agp_devclass, dev2unit(kdev)) /* Helper functions for implementing chipset mini drivers. */ ==== //depot/projects/vimage-commit2/src/sys/dev/amr/amr.c#3 (text+ko) ==== @@ -56,7 +56,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/amr/amr.c,v 1.86 2008/07/20 16:50:14 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/amr/amr.c,v 1.87 2008/09/27 08:51:18 ed Exp $"); /* * Driver for the AMI MegaRaid family of controllers. @@ -438,7 +438,7 @@ static int amr_open(struct cdev *dev, int flags, int fmt, d_thread_t *td) { - int unit = minor(dev); + int unit = dev2unit(dev); struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit); debug_called(1); @@ -494,7 +494,7 @@ static int amr_close(struct cdev *dev, int flags, int fmt, d_thread_t *td) { - int unit = minor(dev); + int unit = dev2unit(dev); struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit); debug_called(1); ==== //depot/projects/vimage-commit2/src/sys/dev/arcmsr/arcmsr.c#2 (text+ko) ==== @@ -56,7 +56,7 @@ ** and cause g_vfs_done() read write error ** 1.20.00.15 10/10/2007 Erich Chen support new RAID adapter type ARC120x ****************************************************************************************** -* $FreeBSD: src/sys/dev/arcmsr/arcmsr.c,v 1.27 2007/12/09 19:24:27 scottl Exp $ +* $FreeBSD: src/sys/dev/arcmsr/arcmsr.c,v 1.28 2008/09/27 08:51:18 ed Exp $ */ #include <sys/param.h> #include <sys/systm.h> @@ -256,7 +256,7 @@ #if __FreeBSD_version < 503000 struct AdapterControlBlock *acb=dev->si_drv1; #else - int unit = minor(dev); + int unit = dev2unit(dev); struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit); #endif if(acb==NULL) { @@ -281,7 +281,7 @@ #if __FreeBSD_version < 503000 struct AdapterControlBlock *acb=dev->si_drv1; #else - int unit = minor(dev); + int unit = dev2unit(dev); struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit); #endif if(acb==NULL) { @@ -306,7 +306,7 @@ #if __FreeBSD_version < 503000 struct AdapterControlBlock *acb=dev->si_drv1; #else - int unit = minor(dev); + int unit = dev2unit(dev); struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit); #endif ==== //depot/projects/vimage-commit2/src/sys/dev/asr/asr.c#2 (text+ko) ==== @@ -163,7 +163,7 @@ #include <dev/asr/sys_info.h> -__FBSDID("$FreeBSD: src/sys/dev/asr/asr.c,v 1.85 2007/06/17 05:55:48 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/asr/asr.c,v 1.86 2008/09/27 08:51:18 ed Exp $"); #define ASR_VERSION 1 #define ASR_REVISION '1' @@ -3113,7 +3113,7 @@ #undef SCSI_RESET /* Conflicts with "scsi/scsiconf.h" defintion */ #include "dev/asr/osd_unix.h" -#define asr_unit(dev) minor(dev) +#define asr_unit(dev) dev2unit(dev) static u_int8_t ASR_ctlr_held; ==== //depot/projects/vimage-commit2/src/sys/dev/ata/ata-chipset.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.227 2008/09/18 12:12:34 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.228 2008/09/26 07:29:48 sos Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -107,7 +107,8 @@ static void ata_intel_31244_tf_write(struct ata_request *request); static void ata_intel_31244_reset(device_t dev); static int ata_ite_chipinit(device_t dev); -static void ata_ite_setmode(device_t dev, int mode); +static void ata_ite_8213_setmode(device_t dev, int mode); +static void ata_ite_821x_setmode(device_t dev, int mode); static int ata_jmicron_chipinit(device_t dev); static int ata_jmicron_allocate(device_t dev); static void ata_jmicron_reset(device_t dev); @@ -2350,52 +2351,54 @@ device_printf(dev, "%ssetting %s on %s chip\n", (error) ? "FAILURE " : "", ata_mode2str(mode), ctlr->chip->text); - if (error) - return; + if (!error) { + if (mode >= ATA_UDMA0) { + u_int8_t utimings[] = { 0x00, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10 }; + + pci_write_config(gparent, 0x48, reg48 | (0x0001 << devno), 2); + pci_write_config(gparent, 0x4a, + (reg4a & ~(0x3 << (devno << 2))) | + (utimings[mode & ATA_MODE_MASK] << (devno<<2)), 2); + } + else { + pci_write_config(gparent, 0x48, reg48 & ~(0x0001 << devno), 2); + pci_write_config(gparent, 0x4a, (reg4a & ~(0x3 << (devno << 2))),2); + } + reg54 |= 0x0400; + if (mode >= ATA_UDMA2) + reg54 |= (0x1 << devno); + else + reg54 &= ~(0x1 << devno); + if (mode >= ATA_UDMA5) + reg54 |= (0x1000 << devno); + else + reg54 &= ~(0x1000 << devno); - if (mode >= ATA_UDMA0) { - pci_write_config(gparent, 0x48, reg48 | (0x0001 << devno), 2); - pci_write_config(gparent, 0x4a, - (reg4a & ~(0x3 << (devno << 2))) | - ((0x01 + !(mode & 0x01)) << (devno << 2)), 2); - } - else { - pci_write_config(gparent, 0x48, reg48 & ~(0x0001 << devno), 2); - pci_write_config(gparent, 0x4a, (reg4a & ~(0x3 << (devno << 2))), 2); - } - reg54 |= 0x0400; - if (mode >= ATA_UDMA2) - pci_write_config(gparent, 0x54, reg54 | (0x1 << devno), 2); - else - pci_write_config(gparent, 0x54, reg54 & ~(0x1 << devno), 2); + pci_write_config(gparent, 0x54, reg54, 2); - if (mode >= ATA_UDMA5) - pci_write_config(gparent, 0x54, reg54 | (0x1000 << devno), 2); - else - pci_write_config(gparent, 0x54, reg54 & ~(0x1000 << devno), 2); + reg40 &= ~0x00ff00ff; + reg40 |= 0x40774077; - reg40 &= ~0x00ff00ff; - reg40 |= 0x40774077; + if (atadev->unit == ATA_MASTER) { + mask40 = 0x3300; + new40 = timings[ata_mode2idx(mode)] << 8; + } + else { + mask44 = 0x0f; + new44 = ((timings[ata_mode2idx(mode)] & 0x30) >> 2) | + (timings[ata_mode2idx(mode)] & 0x03); + } + if (ch->unit) { + mask40 <<= 16; + new40 <<= 16; + mask44 <<= 4; + new44 <<= 4; + } + pci_write_config(gparent, 0x40, (reg40 & ~mask40) | new40, 4); + pci_write_config(gparent, 0x44, (reg44 & ~mask44) | new44, 1); - if (atadev->unit == ATA_MASTER) { - mask40 = 0x3300; - new40 = timings[ata_mode2idx(mode)] << 8; - } - else { - mask44 = 0x0f; - new44 = ((timings[ata_mode2idx(mode)] & 0x30) >> 2) | - (timings[ata_mode2idx(mode)] & 0x03); - } - if (ch->unit) { - mask40 <<= 16; - new40 <<= 16; - mask44 <<= 4; - new44 <<= 4; + atadev->mode = mode; } - pci_write_config(gparent, 0x40, (reg40 & ~mask40) | new40, 4); - pci_write_config(gparent, 0x44, (reg44 & ~mask44) | new44, 1); - - atadev->mode = mode; } static void @@ -2555,7 +2558,8 @@ { struct ata_pci_controller *ctlr = device_get_softc(dev); static struct ata_chip_id ids[] = - {{ ATA_IT8212F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8212F" }, >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809291424.m8TEOxIT007667>