summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/audio/include/AudioDevice.h10
-rw-r--r--usr/src/cmd/audio/utilities/AudioDevice.cc15
-rw-r--r--usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.c11
-rw-r--r--usr/src/pkgdefs/SUNWaudd/postinstall10
-rw-r--r--usr/src/pkgdefs/SUNWaudd/preremove7
-rw-r--r--usr/src/pkgdefs/SUNWaudd/prototype_sparc7
-rw-r--r--usr/src/pkgdefs/SUNWaudh/prototype_sparc7
-rw-r--r--usr/src/pkgdefs/SUNWhea/prototype_com1
-rw-r--r--usr/src/pkgdefs/SUNWhea/prototype_sparc2
-rw-r--r--usr/src/pkgdefs/SUNWos86r/postinstall35
-rw-r--r--usr/src/pkgdefs/SUNWos86r/postremove11
-rw-r--r--usr/src/pkgdefs/SUNWos86r/prototype_i3868
-rw-r--r--usr/src/pkgdefs/common_files/i.drvalias10
-rw-r--r--usr/src/pkgdefs/common_files/i.kclasses_i38622
-rw-r--r--usr/src/pkgdefs/common_files/i.minorperm_sparc31
-rw-r--r--usr/src/pkgdefs/common_files/i.nametomajor8
-rw-r--r--usr/src/tools/scripts/bfu.sh20
-rw-r--r--usr/src/uts/Makefile.uts5
-rw-r--r--usr/src/uts/common/io/asy.c222
-rw-r--r--usr/src/uts/common/io/audio/inc.flg9
-rw-r--r--usr/src/uts/common/io/dktp/dcdev/dadk.c74
-rw-r--r--usr/src/uts/common/io/dktp/dcdev/gda.c10
-rw-r--r--usr/src/uts/common/io/dktp/hba/ghd/ghd_dma.h14
-rw-r--r--usr/src/uts/common/io/dktp/hba/ghd/ghd_scsa.h19
-rw-r--r--usr/src/uts/common/io/hotplug/pciehpc/pciehpc.c17
-rw-r--r--usr/src/uts/common/io/scsi/conf/scsi_confsubr.c60
-rw-r--r--usr/src/uts/common/io/scsi/impl/scsi_resource.c22
-rw-r--r--usr/src/uts/common/io/scsi/impl/scsi_subr.c26
-rw-r--r--usr/src/uts/common/io/scsi/targets/st.c79
-rw-r--r--usr/src/uts/common/io/vgasubr.c10
-rw-r--r--usr/src/uts/common/os/sunddi.c111
-rw-r--r--usr/src/uts/common/os/sunpci.c140
-rw-r--r--usr/src/uts/common/sys/Makefile7
-rw-r--r--usr/src/uts/common/sys/ddi_obsolete.h201
-rw-r--r--usr/src/uts/common/sys/dktp/hba.h22
-rw-r--r--usr/src/uts/common/sys/sunddi.h573
-rw-r--r--usr/src/uts/common/vm/hat.c8
-rw-r--r--usr/src/uts/i86pc/Makefile.files11
-rw-r--r--usr/src/uts/i86pc/Makefile.i86pc7
-rw-r--r--usr/src/uts/i86pc/Makefile.rules13
-rw-r--r--usr/src/uts/i86pc/chs/Makefile74
-rw-r--r--usr/src/uts/i86pc/io/dnet.c166
-rw-r--r--usr/src/uts/i86pc/io/gfx_private/gfxp_vgatext.c8
-rw-r--r--usr/src/uts/i86pc/io/mscsi.conf20
-rw-r--r--usr/src/uts/i86pc/io/pciex/hotplug/pciehpc/pciehpc_ck804.c9
-rw-r--r--usr/src/uts/intel/ia32/ml/ddi_i86_asm.s440
-rw-r--r--usr/src/uts/intel/ia32/os/ddi_i86.c108
-rw-r--r--usr/src/uts/intel/io/vgatext/vgatext.c8
-rw-r--r--usr/src/uts/intel/os/master12
-rw-r--r--usr/src/uts/intel/sys/archsystm.h11
-rw-r--r--usr/src/uts/intel/sys/ddi_isa.h292
-rw-r--r--usr/src/uts/sparc/Makefile.sparc8
-rw-r--r--usr/src/uts/sparc/dbri/Makefile73
-rw-r--r--usr/src/uts/sparc/os/minor_perm20
-rw-r--r--usr/src/uts/sparc/sys/ddi_isa.h109
-rw-r--r--usr/src/uts/sun/Makefile.files12
-rw-r--r--usr/src/uts/sun/Makefile.rules13
-rw-r--r--usr/src/uts/sun/io/bpp.c108
-rw-r--r--usr/src/uts/sun/io/dada/adapters/ghd/ghd_dma.c193
-rw-r--r--usr/src/uts/sun/io/dada/impl/dcd_resource.c31
-rw-r--r--usr/src/uts/sun/sys/Makefile9
-rw-r--r--usr/src/uts/sun/sys/bpp_var.h9
-rw-r--r--usr/src/uts/sun/sys/dada/adapters/ghd/ghd.h8
-rw-r--r--usr/src/uts/sun/sys/dada/adapters/ghd/ghd_dma.h52
-rw-r--r--usr/src/uts/sun/sys/dada/adapters/ghd/ghd_scsa.h16
-rw-r--r--usr/src/uts/sun/sys/mmcodecreg.h252
-rw-r--r--usr/src/uts/sun4/io/efcode/fc_ddi.c105
-rw-r--r--usr/src/uts/sun4/io/efcode/fcpci.c76
-rw-r--r--usr/src/uts/sun4/os/dvma.c32
-rw-r--r--usr/src/uts/sun4/sys/fcode.h14
70 files changed, 1415 insertions, 2748 deletions
diff --git a/usr/src/cmd/audio/include/AudioDevice.h b/usr/src/cmd/audio/include/AudioDevice.h
index 07cbf9e669..9f7881537e 100644
--- a/usr/src/cmd/audio/include/AudioDevice.h
+++ b/usr/src/cmd/audio/include/AudioDevice.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,8 +19,8 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 1993-2001 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#ifndef _MULTIMEDIA_AUDIODEVICE_H
@@ -45,7 +44,6 @@ extern "C" {
enum AudioDeviceType {
AudioDeviceUnknown, // unknown device type
AudioDeviceAMD, // AM79C30
- AudioDeviceDBRI, // DBRI & MMCodec (SpeakerBox)
AudioDeviceSBPRO, // SoundBlaster Pro
AudioDeviceSB16, // SoundBlaster 16
AudioDeviceSPECTRUM, // MediaVision Audio Spectrum 16
diff --git a/usr/src/cmd/audio/utilities/AudioDevice.cc b/usr/src/cmd/audio/utilities/AudioDevice.cc
index f88944dd75..a4b701bf00 100644
--- a/usr/src/cmd/audio/utilities/AudioDevice.cc
+++ b/usr/src/cmd/audio/utilities/AudioDevice.cc
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -263,9 +263,7 @@ decode_devtype()
*/
if (ioctl(getfd(), AUDIO_GETDEV, &adev) >= 0) {
#ifdef MAX_AUDIO_DEV_LEN
- if (strcmp(adev.name, "SUNW,dbri") == 0)
- devtype = AudioDeviceDBRI;
- else if (strcmp(adev.name, "SUNW,CS4231") == 0)
+ if (strcmp(adev.name, "SUNW,CS4231") == 0)
devtype = AudioDeviceCODEC;
else if (strcmp(adev.name, "SUNW,audiots") == 0)
devtype = AudioDeviceCODEC;
@@ -283,10 +281,6 @@ decode_devtype()
devtype = AudioDeviceUnknown;
#else /* 4.1.3 */
switch (adev) {
- case AUDIO_DEV_SPEAKERBOX:
- case AUDIO_DEV_CODEC:
- devtype = AudioDeviceDBRI;
- break;
case AUDIO_DEV_AMD:
devtype = AudioDeviceAMD;
break;
@@ -335,7 +329,6 @@ CanSetHeader(
h.sample_rate = 8000;
break;
- case AudioDeviceDBRI:
case AudioDeviceCODEC:
if (h.channels > 2)
return (FALSE);
diff --git a/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.c b/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.c
index 7ee27b9a3e..ee9b73c5a8 100644
--- a/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.c
+++ b/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -520,10 +520,6 @@ int tone[] = {
* a series of small packets is heard as
* clicks, whereas a series of NFS packets
* in an 8k read sounds like a "WHAAAARP".
- *
- * Note: add 4 constant bytes to sound segments
- * to avoid an artifact of DBRI/MMCODEC that
- * results in a screech due to underrun (bug 114552).
*/
void
click(len)
@@ -534,7 +530,6 @@ click(len)
if (audio) {
write(audio, tone, len);
- write(audio, "\377\377\377\377", 4);
}
}
diff --git a/usr/src/pkgdefs/SUNWaudd/postinstall b/usr/src/pkgdefs/SUNWaudd/postinstall
index 515f10fd69..93f2039cdb 100644
--- a/usr/src/pkgdefs/SUNWaudd/postinstall
+++ b/usr/src/pkgdefs/SUNWaudd/postinstall
@@ -3,9 +3,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -20,6 +19,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -50,10 +50,6 @@ case "${ARCH}" in
-n audioens || \
EXIT=1
- not_installed dbri || \
- add_drv -b ${BASEDIR} \
- -i '"SUNW,DBRId" "SUNW,DBRIe" "SUNW,DBRIf"' -n dbri || EXIT=1
-
not_installed audiots || \
add_drv -b ${BASEDIR} -i '"pci10b9,5451"' -n audiots || EXIT=1
diff --git a/usr/src/pkgdefs/SUNWaudd/preremove b/usr/src/pkgdefs/SUNWaudd/preremove
index 456f56eb8b..f646f7ecfa 100644
--- a/usr/src/pkgdefs/SUNWaudd/preremove
+++ b/usr/src/pkgdefs/SUNWaudd/preremove
@@ -3,9 +3,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -20,6 +19,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -47,7 +47,6 @@ case "${ARCH}" in
sparc)
installed audiocs || rem_drv -b ${BASEDIR} audiocs || EXIT=1
installed audioens || rem_drv -b ${BASEDIR} audioens || EXIT=1
- installed dbri || rem_drv -b ${BASEDIR} dbri || EXIT=1
installed audiots || rem_drv -b ${BASEDIR} audiots || EXIT=1
installed audio1575 || rem_drv -b ${BASEDIR} audio1575 || EXIT=1
;;
diff --git a/usr/src/pkgdefs/SUNWaudd/prototype_sparc b/usr/src/pkgdefs/SUNWaudd/prototype_sparc
index 449b9107e1..cb0c0b4a48 100644
--- a/usr/src/pkgdefs/SUNWaudd/prototype_sparc
+++ b/usr/src/pkgdefs/SUNWaudd/prototype_sparc
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -52,7 +52,6 @@ f none kernel/drv/sparcv9/audiocs 755 root sys
f none kernel/drv/sparcv9/audioens 755 root sys
f none kernel/drv/sparcv9/audiots 755 root sys
f none kernel/drv/sparcv9/audio1575 755 root sys
-f none kernel/drv/sparcv9/dbri 755 root sys
d none kernel/misc/sparcv9 755 root sys
f none kernel/misc/sparcv9/amsrc1 755 root sys
f none kernel/misc/sparcv9/amsrc2 755 root sys
diff --git a/usr/src/pkgdefs/SUNWaudh/prototype_sparc b/usr/src/pkgdefs/SUNWaudh/prototype_sparc
index a4481d4777..5c59192742 100644
--- a/usr/src/pkgdefs/SUNWaudh/prototype_sparc
+++ b/usr/src/pkgdefs/SUNWaudh/prototype_sparc
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -44,7 +44,6 @@
#
# SUNWaudh
#
-f none usr/include/sys/dbriio.h 644 root bin
f none usr/include/sys/audio/audio_4231.h 644 root bin
f none usr/include/sys/audio/audiots.h 644 root bin
f none usr/include/sys/audio/audio1575.h 644 root bin
diff --git a/usr/src/pkgdefs/SUNWhea/prototype_com b/usr/src/pkgdefs/SUNWhea/prototype_com
index e09e8b4aab..001dafc9e9 100644
--- a/usr/src/pkgdefs/SUNWhea/prototype_com
+++ b/usr/src/pkgdefs/SUNWhea/prototype_com
@@ -579,6 +579,7 @@ f none usr/include/sys/ddi_implfuncs.h 644 root bin
f none usr/include/sys/ddi_intr.h 644 root bin
f none usr/include/sys/ddi_intr_impl.h 644 root bin
f none usr/include/sys/ddi_isa.h 644 root bin
+f none usr/include/sys/ddi_obsolete.h 644 root bin
f none usr/include/sys/ddidevmap.h 644 root bin
f none usr/include/sys/ddidmareq.h 644 root bin
f none usr/include/sys/ddimapreq.h 644 root bin
diff --git a/usr/src/pkgdefs/SUNWhea/prototype_sparc b/usr/src/pkgdefs/SUNWhea/prototype_sparc
index 0a61c54d83..e6652f329f 100644
--- a/usr/src/pkgdefs/SUNWhea/prototype_sparc
+++ b/usr/src/pkgdefs/SUNWhea/prototype_sparc
@@ -18,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -92,7 +93,6 @@ f none usr/include/sys/isdnio.h 644 root bin
f none usr/include/sys/mace.h 644 root bin
f none usr/include/sys/memfb.h 644 root bin
f none usr/include/sys/memreg.h 644 root bin
-f none usr/include/sys/mmcodecreg.h 644 root bin
f none usr/include/sys/obpdefs.h 644 root bin
f none usr/include/sys/ramdac.h 644 root bin
f none usr/include/sys/scsi/adapters/espcmd.h 644 root bin
diff --git a/usr/src/pkgdefs/SUNWos86r/postinstall b/usr/src/pkgdefs/SUNWos86r/postinstall
index 37a2971290..42e3f8eb58 100644
--- a/usr/src/pkgdefs/SUNWos86r/postinstall
+++ b/usr/src/pkgdefs/SUNWos86r/postinstall
@@ -3,9 +3,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -183,37 +182,10 @@ check_rem_drv()
fi
}
-#
-# Update entries in the /etc/driver_classes for drivers which change
-# from class "scsi" to class "dada".
-#
-drvclasses_updates()
-{
- nawk "
- BEGIN {
- # Drivers in class "dada"
- drv[\"chs\"] = 1
- }
- /^#/ || /^$/ {
- print
- next
- }
-
- # Advertise the direct-attach drivers as class "dada"
-
- drv[\$1] > 0 {
- \$2 = \"dada\"
- }
- { printf \"%s\t%s\n\", \$1, \$2 }" ${BASEDIR}/etc/driver_classes > /tmp/d.$$
-
- cp /tmp/d.$$ ${BASEDIR}/etc/driver_classes
- rm /tmp/d.$$
-}
# Platform-specific drivers
case "${ARCH}" in
i386)
- drvclasses_updates
check_add_drv -b "${BASEDIR}" \
-i '"pci1011,2" "pci1011,9" "pci1011,14" "pci1011,19" "pci1109,1400" "pci1109,2400" "pci10b8,2001" "pci2646,1"' \
dnet
@@ -227,9 +199,6 @@ i386)
-i '"pci1011,21" "pci1014,22"' \
pci_pci
check_add_drv -b "${BASEDIR}" \
- -c dada -i '"pci1014,2e"' \
- chs
- check_add_drv -b "${BASEDIR}" \
-c scsi \
-i '"pci1000,1" "pci1000,2" "pci1000,3" "pci1000,4" "pci1000,6" "pci1000,c" "pci1000,f" "pci1000,8f" ' \
ncrs
diff --git a/usr/src/pkgdefs/SUNWos86r/postremove b/usr/src/pkgdefs/SUNWos86r/postremove
index e9881deadb..34cf90859f 100644
--- a/usr/src/pkgdefs/SUNWos86r/postremove
+++ b/usr/src/pkgdefs/SUNWos86r/postremove
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,7 @@
#
# CDDL HEADER END
#
-#
-# postremove script for SUNWos86r package.
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -28,6 +26,8 @@
#ident "%Z%%M% %I% %E% SMI"
#
+#
+# postremove script for SUNWos86r package.
#
# Unload and remove nolonger present drivers
#
@@ -53,7 +53,6 @@ i386)
rem_drv -b "${BASEDIR}" pcn
rem_drv -b "${BASEDIR}" ncrs
rem_drv -b "${BASEDIR}" iprb
- rem_drv -b "${BASEDIR}" chs
rem_drv -b "${BASEDIR}" sd
rem_drv -b "${BASEDIR}" spwr
rem_drv -b "${BASEDIR}" elxl
diff --git a/usr/src/pkgdefs/SUNWos86r/prototype_i386 b/usr/src/pkgdefs/SUNWos86r/prototype_i386
index 6979c34a76..fb8dc7c93a 100644
--- a/usr/src/pkgdefs/SUNWos86r/prototype_i386
+++ b/usr/src/pkgdefs/SUNWos86r/prototype_i386
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -81,8 +81,6 @@ f none kernel/drv/elxl 755 root sys
f none kernel/drv/elxl.conf 644 root sys
f none kernel/drv/iprb 755 root sys
f none kernel/drv/iprb.conf 644 root sys
-f none kernel/drv/chs 755 root sys
-f none kernel/drv/chs.conf 644 root sys
f none kernel/drv/ncrs 755 root sys
f none kernel/drv/ncrs.conf 644 root sys
f none kernel/drv/pcn 755 root sys
diff --git a/usr/src/pkgdefs/common_files/i.drvalias b/usr/src/pkgdefs/common_files/i.drvalias
index 7165d59dc0..4c6708e7ad 100644
--- a/usr/src/pkgdefs/common_files/i.drvalias
+++ b/usr/src/pkgdefs/common_files/i.drvalias
@@ -3,9 +3,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -20,6 +19,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -37,6 +37,9 @@ obsolete_sparc()
sed -e '/^cpu modi4v0m[ ]*$/d' \
-e '/^PFUaga PFU,aga[ ]*$/d' \
-e '/^dbri SUNW,DBRIs3[ ]*$/d' \
+ -e '/^dbri SUNW,DBRId[ ]*$/d' \
+ -e '/^dbri SUNW,DBRIe[ ]*$/d' \
+ -e '/^dbri SUNW,DBRIf[ ]*$/d' \
-e '/^leo SUNW,leo104[ ]*$/d' \
-e '/^atapicd "ide-cdrom"[ ]*$/d' \
-e '/^cpu TI,TMS390Z50[ ]*$/d' \
@@ -83,6 +86,7 @@ obsolete_i386() {
-e '/^p9000[ ]*"pci100e,9001"[ ]*$/d' \
-e '/^p9100[ ]*"pci100e,9100"[ ]*$/d' \
-e '/^spwr[ ]*"pci10b8,0005"[ ]*$/d' \
+ -e '/^chs[ ]*"pci1014,2e"[ ]*$/d' \
-e '/^cpqncr[ ]*"pcie11,7004"[ ]*$/d' \
-e '/^smartii[ ]*"pcie11,4030"[ ]*$/d' \
-e '/^smartii[ ]*"pcie11,4031"[ ]*$/d'
diff --git a/usr/src/pkgdefs/common_files/i.kclasses_i386 b/usr/src/pkgdefs/common_files/i.kclasses_i386
index 5b83359fa7..786840a822 100644
--- a/usr/src/pkgdefs/common_files/i.kclasses_i386
+++ b/usr/src/pkgdefs/common_files/i.kclasses_i386
@@ -3,9 +3,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -20,21 +19,32 @@
#
# CDDL HEADER END
#
+
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+#ident "%Z%%M% %I% %E% SMI"
+#
PATH="/usr/bin:/usr/sbin:${PATH}"
export PATH
+obsolete()
+{
+ nawk 'BEGIN {
+ obs["chs"] = 1;
+ } !($1 in obs) {print $0}'
+}
while read src dest
do
if [ ! -f $dest ] ; then
cp $src $dest
else
+ obsolete < $dest > /tmp/odc.$$.tmp
+ cp /tmp/odc.$$.tmp $dest
+ rm -f /dev/odc.$$.tmp
+
grep '^#pragma' $src > /tmp/newident.$$ 2>/dev/null
sed -e '/^aha[ ].*scsi/d' \
-e '/^aic[ ].*scsi/d' \
diff --git a/usr/src/pkgdefs/common_files/i.minorperm_sparc b/usr/src/pkgdefs/common_files/i.minorperm_sparc
index c964c65e86..3d5055f54b 100644
--- a/usr/src/pkgdefs/common_files/i.minorperm_sparc
+++ b/usr/src/pkgdefs/common_files/i.minorperm_sparc
@@ -3,9 +3,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -20,12 +19,13 @@
#
# CDDL HEADER END
#
-#
-# ident "%Z%%M% %I% %E% SMI"
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# ident "%Z%%M% %I% %E% SMI"
+#
#
# NOTE: When a change is made to the source file for
@@ -64,22 +64,6 @@
make_chattr_list() {
cat > /tmp/chattr.$$ << EOF
audio:* 0666 root sys 0600 root sys /dev/sound/*
-dbri:sound,audio 0666 root sys 0600 root sys /dev/sound/*
-SUNW,DBRId:sound,audio 0666 root sys 0600 root sys /dev/sound/*
-SUNW,DBRIe:sound,audio 0666 root sys 0600 root sys /dev/sound/*
-SUNW,DBRIf:sound,audio 0666 root sys 0600 root sys /dev/sound/*
-dbri:sound,audioctl 0666 root sys 0600 root sys /dev/sound/*
-SUNW,DBRId:sound,audioctl 0666 root sys 0600 root sys /dev/sound/*
-SUNW,DBRIe:sound,audioctl 0666 root sys 0600 root sys /dev/sound/*
-SUNW,DBRIf:sound,audioctl 0666 root sys 0600 root sys /dev/sound/*
-dbri:aux,audio 0666 root sys 0600 root sys /dev/sound/*
-SUNW,DBRId:aux,audio 0666 root sys 0600 root sys /dev/sound/*
-SUNW,DBRIe:aux,audio 0666 root sys 0600 root sys /dev/sound/*
-SUNW,DBRIf:aux,audio 0666 root sys 0600 root sys /dev/sound/*
-dbri:aux,audioctl 0666 root sys 0600 root sys /dev/sound/*
-SUNW,DBRId:aux,audioctl 0666 root sys 0600 root sys /dev/sound/*
-SUNW,DBRIe:aux,audioctl 0666 root sys 0600 root sys /dev/sound/*
-SUNW,DBRIf:aux,audioctl 0666 root sys 0600 root sys /dev/sound/*
vol:volctl 0600 root sys 0666 root sys /dev/volctl
sad:user 0600 root sys 0666 root sys /dev/sad/user
se:* 0666 root sys 0600 uucp uucp /dev/cua/*
@@ -137,7 +121,6 @@ cat > /tmp/delete.$$ << EOF
mm:mbio /dev/mbio /devices/pseudo/mm:mbio
mm:mbmem /dev/mbmem /devices/pseudo/mm:mbmem
clone:amd,0,aux,audio
-clone:dbri,0,aux,audio
sw:drum
rip:rawip
zs:*
@@ -174,6 +157,10 @@ cgeight:*
SUNW,sx:*
sx_cmem:*
stc:*
+dbri:*
+SUNW,DBRId:*
+SUNW,DBRIe:*
+SUNW,DBRIf:*
EOF
}
diff --git a/usr/src/pkgdefs/common_files/i.nametomajor b/usr/src/pkgdefs/common_files/i.nametomajor
index b534bccbbf..c6b6a58547 100644
--- a/usr/src/pkgdefs/common_files/i.nametomajor
+++ b/usr/src/pkgdefs/common_files/i.nametomajor
@@ -3,9 +3,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -20,6 +19,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -112,6 +112,7 @@ obsolete_sparc()
obs["tcoo"] = 1;
obs["sp"] = 1;
obs["consfb"] = 1;
+ obs["dbri"] = 1;
obs["XXunusedXX"] = 1;
obs["sw"] = 1;
obs["cgtwo"] = 1;
@@ -189,6 +190,7 @@ obsolete_i386()
obs["audiocs"] = 1;
obs["blogic"] = 1;
obs["chanmux"] = 1;
+ obs["chs"] = 1;
obs["cmtp"] = 1;
obs["corvette"] = 1;
obs["cpqncr"] = 1;
diff --git a/usr/src/tools/scripts/bfu.sh b/usr/src/tools/scripts/bfu.sh
index 2a2d57b75d..70dbe4f065 100644
--- a/usr/src/tools/scripts/bfu.sh
+++ b/usr/src/tools/scripts/bfu.sh
@@ -3,9 +3,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -4864,7 +4863,6 @@ mondo_loop() {
$root/kernel/drv/conskbd \
$root/kernel/drv/consms \
$root/kernel/drv/dad \
- $root/kernel/drv/dbri \
$root/kernel/drv/devinfo \
$root/kernel/drv/ecpp \
$root/kernel/drv/ehci \
@@ -5493,6 +5491,20 @@ mondo_loop() {
rm -f $usr/lib/adb/hwpp.nxt
#
+ # Remove drivers for EOF of chs as per PSARC/2005/581
+ #
+ rm -f $root/kernel/drv/chs
+ rm -f $root/kernel/drv/chs.conf
+ rm -f $root/boot/solaris/drivers/notisa.020/chs.bef
+
+ #
+ # Remove drivers & header files for EOF of dbri as per PSARC 2005/582
+ #
+ rm -f $root/kernel/drv/sparcv9/dbri
+ rm -f $root/usr/include/sys/dbriio.h
+ rm -f $root/usr/include/sys/mmcodecreg.h
+
+ #
# Remove drivers for EOF of pcscsi as per PSARC/2005/003
#
rm -f $root/kernel/drv/pcscsi
diff --git a/usr/src/uts/Makefile.uts b/usr/src/uts/Makefile.uts
index f8a9613ce6..aacf71100e 100644
--- a/usr/src/uts/Makefile.uts
+++ b/usr/src/uts/Makefile.uts
@@ -201,8 +201,9 @@ LINT_MODULE= $(MODULE)
EXTRA_OPTIONS =
AS_DEFS = -D_ASM -D__STDC__=0
-ALWAYS_DEFS_32 = -D_KERNEL -D_SYSCALL32
-ALWAYS_DEFS_64 = -D_KERNEL -D_SYSCALL32 -D_SYSCALL32_IMPL -D_ELF64
+ALWAYS_DEFS_32 = -D_KERNEL -D_SYSCALL32 -D_DDI_STRICT
+ALWAYS_DEFS_64 = -D_KERNEL -D_SYSCALL32 -D_SYSCALL32_IMPL -D_ELF64 \
+ -D_DDI_STRICT
#
# XX64 This should be defined by the compiler!
#
diff --git a/usr/src/uts/common/io/asy.c b/usr/src/uts/common/io/asy.c
index bf61b90a6d..4e76b15131 100644
--- a/usr/src/uts/common/io/asy.c
+++ b/usr/src/uts/common/io/asy.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
@@ -636,7 +636,7 @@ asyattach(dev_info_t *devi, ddi_attach_cmd_t cmd)
* the system to hang if there was input available.
*/
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR, 0x00);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR, 0x00);
/* establish default usage */
asy->asy_mcr |= RTS|DTR; /* do use RTS/DTR after open */
@@ -744,17 +744,17 @@ asyattach(dev_info_t *devi, ddi_attach_cmd_t cmd)
}
/* disable all interrupts */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR, 0);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR, 0);
/* select baud rate generator */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR, DLAB);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR, DLAB);
/* Set the baud rate to 9600 */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + (DAT+DLL),
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + (DAT+DLL),
asyspdtab[asy->asy_bidx] & 0xff);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + (DAT+DLH),
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + (DAT+DLH),
(asyspdtab[asy->asy_bidx] >> 8) & 0xff);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
asy->asy_lcr);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR, mcr);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR, mcr);
mutex_exit(&asy->asy_excl_hi);
mutex_exit(&asy->asy_excl);
@@ -991,11 +991,11 @@ asy_identify_chip(dev_info_t *devi, struct asycom *asy)
/* Check scratch register works. */
/* write to scratch register */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + SCR, SCRTEST);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + SCR, SCRTEST);
/* make sure that pattern doesn't just linger on the bus */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + FIFOR, 0x00);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + FIFOR, 0x00);
/* read data back from scratch register */
- ret = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + SCR);
+ ret = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + SCR);
if (ret != SCRTEST) {
/*
* Scratch register not working.
@@ -1013,22 +1013,22 @@ asy_identify_chip(dev_info_t *devi, struct asycom *asy)
* Use 16550 fifo reset sequence specified in NS application
* note. Disable fifos until chip is initialized.
*/
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + FIFOR, 0x00); /* clear */
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + FIFOR, FIFO_ON); /* enable */
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + FIFOR, FIFO_ON | FIFORXFLSH);
/* reset */
if (asymaxchip >= ASY16650 && asy_scr_test) {
/*
* Reset 16650 enhanced regs also, in case we have one of these
*/
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
EFRACCESS);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + EFR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + EFR,
0);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
STOP1|BITS8);
}
@@ -1047,8 +1047,8 @@ asy_identify_chip(dev_info_t *devi, struct asycom *asy)
asy_reset_fifo(asy, FIFOTXFLSH | FIFORXFLSH);
- mcr = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + MCR);
- ret = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + ISR);
+ mcr = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + MCR);
+ ret = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + ISR);
DEBUGCONT4(ASY_DEBUG_CHIP,
"asy%d: probe fifo FIFOR=0x%02x ISR=0x%02x MCR=0x%02x\n",
asy->asy_unit, asy->asy_fifor | FIFOTXFLSH | FIFORXFLSH,
@@ -1117,22 +1117,22 @@ asy_identify_chip(dev_info_t *devi, struct asycom *asy)
if (asy->asy_hwtype == ASY16550A && asymaxchip >= ASY16650 &&
asy_scr_test) {
/* Enable enhanced mode register access */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
EFRACCESS);
/* zero scratch register (not scratch register if enhanced) */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + SCR, 0);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + SCR, 0);
/* Disable enhanced mode register access */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
STOP1|BITS8);
/* read back scratch register */
- ret = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + SCR);
+ ret = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + SCR);
if (ret == SCRTEST) {
/* looks like we have an ST16650 -- enable it */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
EFRACCESS);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + EFR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + EFR,
ENHENABLE);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
STOP1|BITS8);
asy->asy_hwtype = ASY16650;
asy->asy_fifo_buf = 32;
@@ -1153,22 +1153,22 @@ asy_identify_chip(dev_info_t *devi, struct asycom *asy)
int i;
/* Set baud rate to 57600 (fairly arbitrary choice) */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
DLAB);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + DAT,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + DAT,
asyspdtab[B57600] & 0xff);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR,
(asyspdtab[B57600] >> 8) & 0xff);
/* Set 8 bits, 1 stop bit */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
STOP1|BITS8);
/* Set loopback mode */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR,
DTR | RTS | ASY_LOOP | OUT1 | OUT2);
/* Overfill fifo */
for (i = 0; i < asy->asy_fifo_buf * 2; i++) {
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + DAT, i);
}
/*
@@ -1198,11 +1198,11 @@ asy_identify_chip(dev_info_t *devi, struct asycom *asy)
/* Now see how many characters we can read back */
for (i = 0; i < asy->asy_fifo_buf * 3; i++) {
- ret = ddi_io_get8(asy->asy_iohandle,
+ ret = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LSR);
if (!(ret & RCA))
break; /* FIFO emptied */
- (void) ddi_io_get8(asy->asy_iohandle,
+ (void) ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + DAT); /* lose another */
}
@@ -1244,18 +1244,18 @@ asy_identify_chip(dev_info_t *devi, struct asycom *asy)
*/
if (asy->asy_hwtype >= ASY16650 && hwtype < ASY16650) {
/* Disable 16650 enhanced mode */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
EFRACCESS);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + EFR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + EFR,
0);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
STOP1|BITS8);
}
asy_reset_fifo(asy, FIFOTXFLSH | FIFORXFLSH);
asy->asy_hwtype = hwtype;
/* Clear loopback mode and restore DTR/RTS */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR, mcr);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR, mcr);
}
DEBUGNOTE3(ASY_DEBUG_CHIP, "asy%d %s @ %p",
@@ -1378,8 +1378,8 @@ again:
mutex_enter(&asy->asy_excl_hi);
}
- mcr = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + MCR);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR,
+ mcr = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + MCR);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR,
mcr|(asy->asy_mcr&DTR));
DEBUGCONT3(ASY_DEBUG_INIT,
@@ -1399,7 +1399,7 @@ again:
/*
* Check carrier.
*/
- asy->asy_msr = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + MSR);
+ asy->asy_msr = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + MSR);
DEBUGCONT3(ASY_DEBUG_INIT, "asy%dopen: TS_SOFTCAR is %s, "
"MSR & DCD is %s\n",
unit,
@@ -1557,8 +1557,8 @@ asyclose(queue_t *q, int flag, cred_t *credp)
async->async_utbrktid = 0;
}
mutex_enter(&asy->asy_excl_hi);
- lcr = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + LCR);
- ddi_io_put8(asy->asy_iohandle,
+ lcr = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + LCR);
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + LCR, (lcr & ~SETBREAK));
mutex_exit(&asy->asy_excl_hi);
async->async_flags &= ~ASYNC_OUT_SUSPEND;
@@ -1644,12 +1644,12 @@ nodrain:
instance,
asy->asy_flags & ASY_IGNORE_CD,
asy->asy_flags & ASY_RTS_DTR_OFF);
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + MCR, asy->asy_mcr|OUT2);
} else {
DEBUGCONT1(ASY_DEBUG_MODEM,
"asy%dclose: Dropping DTR and RTS\n", instance);
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + MCR, OUT2);
}
async->async_dtrtid =
@@ -1660,9 +1660,9 @@ nodrain:
* If nobody's using it now, turn off receiver interrupts.
*/
if ((async->async_flags & (ASYNC_WOPEN|ASYNC_ISOPEN)) == 0) {
- icr = ddi_io_get8(asy->asy_iohandle,
+ icr = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + ICR);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR,
(icr & ~RIEN));
}
mutex_exit(&asy->asy_excl_hi);
@@ -1704,7 +1704,7 @@ asy_isbusy(struct asycom *asy)
ASSERT(mutex_owned(&asy->asy_excl));
ASSERT(mutex_owned(&asy->asy_excl_hi));
return ((async->async_ocnt > 0) ||
- ((ddi_io_get8(asy->asy_iohandle,
+ ((ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LSR) & (XSRE|XHRE)) == 0));
}
@@ -1737,18 +1737,18 @@ asy_reset_fifo(struct asycom *asy, uchar_t flush)
/* On a 16750, we have to set DLAB in order to set FIFOEXTRA. */
if (asy->asy_hwtype >= ASY16750) {
- lcr = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + LCR);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ lcr = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + LCR);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
lcr | DLAB);
}
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + FIFOR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + FIFOR,
asy->asy_fifor | flush);
/* Clear DLAB */
if (asy->asy_hwtype >= ASY16750) {
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR, lcr);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR, lcr);
}
}
@@ -1800,14 +1800,14 @@ asy_program(struct asycom *asy, int mode)
(CLOCAL|CREAD|CSTOPB|CSIZE|PARENB|PARODD|CBAUD|CBAUDEXT);
/* disable interrupts */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR, 0);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR, 0);
ocflags = asy->asy_ocflag;
/* flush/reset the status registers */
- (void) ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + ISR);
- (void) ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + LSR);
- asy->asy_msr = flush_reg = ddi_io_get8(asy->asy_iohandle,
+ (void) ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + ISR);
+ (void) ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + LSR);
+ asy->asy_msr = flush_reg = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + MSR);
/*
* The device is programmed in the open sequence, if we
@@ -1844,17 +1844,17 @@ asy_program(struct asycom *asy, int mode)
if (mode == ASY_INIT)
if (asy->asy_use_fifo == FIFO_ON) {
for (flush_reg = asy->asy_fifo_buf; flush_reg-- > 0; ) {
- (void) ddi_io_get8(asy->asy_iohandle,
+ (void) ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + DAT);
}
} else {
- flush_reg = ddi_io_get8(asy->asy_iohandle,
+ flush_reg = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + DAT);
}
if (ocflags != (c_flag & ~CLOCAL) || mode == ASY_INIT) {
/* Set line control */
- lcr = ddi_io_get8(asy->asy_iohandle,
+ lcr = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LCR);
lcr &= ~(WLS0|WLS1|STB|PEN|EPS);
@@ -1883,16 +1883,16 @@ asy_program(struct asycom *asy, int mode)
}
/* set the baud rate, unless it is "0" */
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + LCR, DLAB);
if (baudrate != 0) {
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + DAT,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + DAT,
asyspdtab[baudrate] & 0xff);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR,
(asyspdtab[baudrate] >> 8) & 0xff);
}
/* set the line control modes */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR, lcr);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR, lcr);
/*
* If we have a FIFO buffer, enable/flush
@@ -1909,10 +1909,10 @@ asy_program(struct asycom *asy, int mode)
}
if (baudrate == 0)
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR,
(asy->asy_mcr & RTS) | OUT2);
else
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR,
asy->asy_mcr | OUT2);
/*
@@ -1940,7 +1940,7 @@ asy_program(struct asycom *asy, int mode)
if (c_flag & CREAD)
icr |= RIEN;
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR, icr);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + ICR, icr);
DEBUGCONT1(ASY_DEBUG_PROCS, "asy%d_program: done\n", instance);
}
@@ -1978,7 +1978,7 @@ asyintr(caddr_t argasy)
int ret_status = DDI_INTR_UNCLAIMED;
uchar_t interrupt_id, lsr;
- interrupt_id = ddi_io_get8(asy->asy_iohandle,
+ interrupt_id = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + ISR) & 0x0F;
async = asy->asy_priv;
if ((async == NULL) || asy_addedsoft == 0 ||
@@ -1992,11 +1992,11 @@ asyintr(caddr_t argasy)
* reading any data from data status register
* reading modem status
*/
- (void) ddi_io_get8(asy->asy_iohandle,
+ (void) ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LSR);
- (void) ddi_io_get8(asy->asy_iohandle,
+ (void) ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + DAT);
- asy->asy_msr = ddi_io_get8(asy->asy_iohandle,
+ asy->asy_msr = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + MSR);
return (DDI_INTR_CLAIMED);
}
@@ -2007,7 +2007,7 @@ asyintr(caddr_t argasy)
* interrupt is edge triggered.
*/
/* CSTYLED */
- for (;; interrupt_id = (ddi_io_get8(asy->asy_iohandle,
+ for (;; interrupt_id = (ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + ISR) & 0x0F)) {
if (interrupt_id & NOINTERRUPT)
break;
@@ -2015,7 +2015,7 @@ asyintr(caddr_t argasy)
DEBUGCONT1(ASY_DEBUG_INTR,
"asyintr: interrupt_id = 0x%d\n", interrupt_id);
- lsr = ddi_io_get8(asy->asy_iohandle,
+ lsr = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LSR);
switch (interrupt_id) {
case RxRDY:
@@ -2075,7 +2075,7 @@ async_txint(struct asycom *asy)
!(async->async_flags &
(ASYNC_HW_OUT_FLW|ASYNC_SW_OUT_FLW|ASYNC_STOPPED))) {
while (fifo_len-- > 0 && async->async_ocnt-- > 0) {
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + DAT, *async->async_optr++);
}
async->async_flags |= ASYNC_PROGRESS;
@@ -2170,9 +2170,9 @@ async_rxint(struct asycom *asy, uchar_t lsr)
tp = &async->async_ttycommon;
if (!(tp->t_cflag & CREAD)) {
while (lsr & (RCA|PARERR|FRMERR|BRKDET|OVRRUN)) {
- (void) (ddi_io_get8(asy->asy_iohandle,
+ (void) (ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + DAT) & 0xff);
- lsr = ddi_io_get8(asy->asy_iohandle,
+ lsr = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LSR);
if (looplim-- < 0) /* limit loop */
break;
@@ -2184,7 +2184,7 @@ async_rxint(struct asycom *asy, uchar_t lsr)
c = 0;
s = 0; /* reset error status */
if (lsr & RCA) {
- c = ddi_io_get8(asy->asy_iohandle,
+ c = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + DAT) & 0xff;
/*
@@ -2272,7 +2272,7 @@ async_rxint(struct asycom *asy, uchar_t lsr)
else
async->async_sw_overrun = 1;
check_looplim:
- lsr = ddi_io_get8(asy->asy_iohandle,
+ lsr = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LSR);
if (looplim-- < 0) /* limit loop */
break;
@@ -2306,7 +2306,7 @@ async_msint(struct asycom *asy)
async_msint_retry:
/* this resets the interrupt */
- msr = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + MSR);
+ msr = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + MSR);
DEBUGCONT10(ASY_DEBUG_STATE,
"async%d_msint call #%d:\n"
" transition: %3s %3s %3s %3s\n"
@@ -2347,7 +2347,7 @@ async_msint_retry:
* status, we would miss a change of modem status event that occured
* after we initiated a read MSR operation.
*/
- msr = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + MSR);
+ msr = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + MSR);
if (STATES(msr) != STATES(asy->asy_msr))
goto async_msint_retry;
}
@@ -2480,9 +2480,9 @@ begin:
* not stopped, and send a hangup
* notification upstream.
*/
- val = ddi_io_get8(asy->asy_iohandle,
+ val = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + MCR);
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + MCR, (val & ~DTR));
if (async->async_flags & ASYNC_BUSY) {
DEBUGCONT0(ASY_DEBUG_BUSY,
@@ -2728,9 +2728,9 @@ async_restart(void *arg)
if ((async->async_flags & ASYNC_BREAK) &&
!(async->async_flags & ASYNC_OUT_SUSPEND)) {
mutex_enter(&asy->asy_excl_hi);
- lcr = ddi_io_get8(asy->asy_iohandle,
+ lcr = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LCR);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
(lcr & ~SETBREAK));
mutex_exit(&asy->asy_excl_hi);
}
@@ -2834,9 +2834,9 @@ async_nstart(struct asyncline *async, int mode)
* the next message.
*/
mutex_enter(&asy->asy_excl_hi);
- val = ddi_io_get8(asy->asy_iohandle,
+ val = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LCR);
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + LCR, (val | SETBREAK));
mutex_exit(&asy->asy_excl_hi);
async->async_flags |= ASYNC_BREAK;
@@ -2917,10 +2917,10 @@ async_nstart(struct asyncline *async, int mode)
*/
didsome = B_FALSE;
while (--fifo_len >= 0 && cc > 0) {
- if (!(ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + LSR) &
+ if (!(ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + LSR) &
XHRE))
break;
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + DAT,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + DAT,
*xmit_addr++);
cc--;
didsome = B_TRUE;
@@ -2954,13 +2954,13 @@ async_resume(struct asyncline *async)
DEBUGCONT1(ASY_DEBUG_PROCS, "async%d_resume\n", instance);
#endif
- if (ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + LSR) & XHRE) {
+ if (ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + LSR) & XHRE) {
if (async_flowcontrol_sw_input(asy, FLOW_CHECK, IN_FLOW_NULL))
return;
if (async->async_ocnt > 0 &&
!(async->async_flags &
(ASYNC_HW_OUT_FLW|ASYNC_SW_OUT_FLW|ASYNC_OUT_SUSPEND))) {
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + DAT, *async->async_optr++);
async->async_ocnt--;
async->async_flags |= ASYNC_PROGRESS;
@@ -3008,8 +3008,8 @@ async_resume_utbrk(struct asyncline *async)
* really clean the HW break.
*/
if (!(async->async_flags & ASYNC_BREAK)) {
- val = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + LCR);
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
+ val = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + LCR);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + LCR,
(val & ~SETBREAK));
}
async->async_flags &= ~ASYNC_OUT_SUSPEND;
@@ -3285,7 +3285,7 @@ async_ioctl(struct asyncline *async, queue_t *wq, mblk_t *mp)
index = BAUDINDEX(
async->async_ttycommon.t_cflag);
async->async_flags |= ASYNC_BREAK;
- while ((ddi_io_get8(asy->asy_iohandle,
+ while ((ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LSR) & XSRE) == 0) {
mutex_exit(&asy->asy_excl_hi);
mutex_exit(&asy->asy_excl);
@@ -3300,9 +3300,9 @@ async_ioctl(struct asyncline *async, queue_t *wq, mblk_t *mp)
* it will turn the break bit off, and call
* "async_start" to grab the next message.
*/
- val = ddi_io_get8(asy->asy_iohandle,
+ val = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LCR);
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + LCR,
(val | SETBREAK));
mutex_exit(&asy->asy_excl_hi);
@@ -3328,7 +3328,7 @@ async_ioctl(struct asyncline *async, queue_t *wq, mblk_t *mp)
async->async_flags |= ASYNC_HOLD_UTBRK;
index = BAUDINDEX(
async->async_ttycommon.t_cflag);
- while ((ddi_io_get8(asy->asy_iohandle,
+ while ((ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LSR) & XSRE) == 0) {
mutex_exit(&asy->asy_excl_hi);
mutex_exit(&asy->asy_excl);
@@ -3337,9 +3337,9 @@ async_ioctl(struct asyncline *async, queue_t *wq, mblk_t *mp)
mutex_enter(&asy->asy_excl);
mutex_enter(&asy->asy_excl_hi);
}
- val = ddi_io_get8(asy->asy_iohandle,
+ val = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LCR);
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + LCR, (val | SETBREAK));
mutex_exit(&asy->asy_excl_hi);
/* wait for 100ms to hold BREAK */
@@ -3861,14 +3861,14 @@ asyputchar(struct cons_polledio_arg *arg, uchar_t c)
if (c == '\n')
asyputchar(arg, '\r');
- while ((ddi_io_get8(asy->asy_iohandle,
+ while ((ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LSR) & XHRE) == 0) {
/* wait for xmit to finish */
drv_usecwait(10);
}
/* put the character out */
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + DAT, c);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + DAT, c);
}
/*
@@ -3880,7 +3880,7 @@ asyischar(struct cons_polledio_arg *arg)
{
struct asycom *asy = (struct asycom *)arg;
- return ((ddi_io_get8(asy->asy_iohandle,
+ return ((ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + LSR) & RCA) != 0);
}
@@ -3894,7 +3894,7 @@ asygetchar(struct cons_polledio_arg *arg)
while (!asyischar(arg))
drv_usecwait(10);
- return (ddi_io_get8(asy->asy_iohandle,
+ return (ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + DAT));
}
@@ -3911,7 +3911,7 @@ asymctl(struct asycom *asy, int bits, int how)
ASSERT(mutex_owned(&asy->asy_excl));
/* Read Modem Control Registers */
- mcr_r = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + MCR);
+ mcr_r = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + MCR);
switch (how) {
@@ -3939,14 +3939,14 @@ asymctl(struct asycom *asy, int bits, int how)
* If modem interrupts are enabled, we return the
* saved value of msr. We read MSR only in async_msint()
*/
- if (ddi_io_get8(asy->asy_iohandle,
+ if (ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + ICR) & MIEN) {
msr_r = asy->asy_msr;
DEBUGCONT2(ASY_DEBUG_MODEM,
"asy%dmctl: TIOCMGET, read msr_r = %x\n",
instance, msr_r);
} else {
- msr_r = ddi_io_get8(asy->asy_iohandle,
+ msr_r = ddi_get8(asy->asy_iohandle,
asy->asy_ioaddr + MSR);
DEBUGCONT2(ASY_DEBUG_MODEM,
"asy%dmctl: TIOCMGET, read MSR = %x\n",
@@ -3957,7 +3957,7 @@ asymctl(struct asycom *asy, int bits, int how)
return (asytodm(mcr_r, msr_r));
}
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR, mcr_r);
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + MCR, mcr_r);
return (mcr_r);
}
@@ -4300,14 +4300,14 @@ async_flowcontrol_sw_input(struct asycom *asy, async_flowc_action onoff,
if (((async->async_flags & (ASYNC_SW_IN_NEEDED | ASYNC_BREAK |
ASYNC_OUT_SUSPEND)) == ASYNC_SW_IN_NEEDED) &&
- (ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + LSR) & XHRE)) {
+ (ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + LSR) & XHRE)) {
/*
* If we get this far, then we know we need to send out
* XON or XOFF char.
*/
async->async_flags = (async->async_flags &
~ASYNC_SW_IN_NEEDED) | ASYNC_BUSY;
- ddi_io_put8(asy->asy_iohandle, asy->asy_ioaddr + DAT,
+ ddi_put8(asy->asy_iohandle, asy->asy_ioaddr + DAT,
async->async_flags & ASYNC_SW_IN_FLOW ?
async->async_stopc : async->async_startc);
rval = B_TRUE;
@@ -4404,11 +4404,11 @@ async_flowcontrol_hw_input(struct asycom *asy, async_flowc_action onoff,
default:
break;
}
- mcr = ddi_io_get8(asy->asy_iohandle, asy->asy_ioaddr + MCR);
+ mcr = ddi_get8(asy->asy_iohandle, asy->asy_ioaddr + MCR);
flag = (async->async_flags & ASYNC_HW_IN_FLOW) ? 0 : RTS;
if (((mcr ^ flag) & RTS) != 0) {
- ddi_io_put8(asy->asy_iohandle,
+ ddi_put8(asy->asy_iohandle,
asy->asy_ioaddr + MCR, (mcr ^ RTS));
}
}
diff --git a/usr/src/uts/common/io/audio/inc.flg b/usr/src/uts/common/io/audio/inc.flg
index 0985fb1493..98ec4f57f6 100644
--- a/usr/src/uts/common/io/audio/inc.flg
+++ b/usr/src/uts/common/io/audio/inc.flg
@@ -3,9 +3,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -20,12 +19,13 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-
#ident "%Z%%M% %I% %E% SMI"
+#
# This file brings down all that is needed to build just
# audio drivers.
@@ -82,7 +82,6 @@ find_files "s.*" \
usr/src/uts/sparc/mixer \
usr/src/uts/sparc/amsrc1 \
usr/src/uts/sparc/amsrc2 \
- usr/src/uts/sparc/dbri \
usr/src/uts/sparc/diaudio \
usr/src/uts/i86pc/audioens \
usr/src/uts/i86pc/audio810 \
diff --git a/usr/src/uts/common/io/dktp/dcdev/dadk.c b/usr/src/uts/common/io/dktp/dcdev/dadk.c
index 10a27ac12a..02b22ef9db 100644
--- a/usr/src/uts/common/io/dktp/dcdev/dadk.c
+++ b/usr/src/uts/common/io/dktp/dcdev/dadk.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -78,6 +78,46 @@ struct tgcom_objops dadk_com_ops = {
0, 0
};
+/*
+ * architecture dependent allocation restrictions for dadk_iob_alloc(). For
+ * x86, we'll set dma_attr_addr_hi to dadk_max_phys_addr and dma_attr_sgllen
+ * to dadk_sgl_size during _init().
+ */
+#if defined(__sparc)
+static ddi_dma_attr_t dadk_alloc_attr = {
+ DMA_ATTR_V0, /* version number */
+ 0x0, /* lowest usable address */
+ 0xFFFFFFFFull, /* high DMA address range */
+ 0xFFFFFFFFull, /* DMA counter register */
+ 1, /* DMA address alignment */
+ 1, /* DMA burstsizes */
+ 1, /* min effective DMA size */
+ 0xFFFFFFFFull, /* max DMA xfer size */
+ 0xFFFFFFFFull, /* segment boundary */
+ 1, /* s/g list length */
+ 512, /* granularity of device */
+ 0, /* DMA transfer flags */
+};
+#elif defined(__x86)
+static ddi_dma_attr_t dadk_alloc_attr = {
+ DMA_ATTR_V0, /* version number */
+ 0x0, /* lowest usable address */
+ 0x0, /* high DMA address range [set in _init()] */
+ 0xFFFFull, /* DMA counter register */
+ 512, /* DMA address alignment */
+ 1, /* DMA burstsizes */
+ 1, /* min effective DMA size */
+ 0xFFFFFFFFull, /* max DMA xfer size */
+ 0xFFFFFFFFull, /* segment boundary */
+ 0, /* s/g list length [set in _init()] */
+ 512, /* granularity of device */
+ 0, /* DMA transfer flags */
+};
+
+uint64_t dadk_max_phys_addr = 0xFFFFFFFFull;
+int dadk_sgl_size = 0xFF;
+#endif
+
static int dadk_rmb_ioctl(struct dadk *dadkp, int cmd, intptr_t arg, int flags,
int silent);
static void dadk_rmb_iodone(struct buf *bp);
@@ -216,6 +256,20 @@ _init(void)
if (dadk_debug & DENT)
PRF("dadk_init: call\n");
#endif
+
+#if defined(__x86)
+ /* set the max physical address for iob allocs on x86 */
+ dadk_alloc_attr.dma_attr_addr_hi = dadk_max_phys_addr;
+
+ /*
+ * set the sgllen for iob allocs on x86. If this is set less than
+ * the number of pages the buffer will take (taking into account
+ * alignment), it would force the allocator to try and allocate
+ * contiguous pages.
+ */
+ dadk_alloc_attr.dma_attr_sgllen = dadk_sgl_size;
+#endif
+
return (mod_install(&modlinkage));
}
@@ -862,6 +916,7 @@ dadk_iob_alloc(opaque_t objp, daddr_t blkno, ssize_t xfer, int kmsflg)
struct dadk *dadkp = (struct dadk *)objp;
struct buf *bp;
struct tgdk_iob *iobp;
+ size_t rlen;
iobp = kmem_zalloc(sizeof (*iobp), kmsflg);
if (iobp == NULL)
@@ -877,8 +932,15 @@ dadk_iob_alloc(opaque_t objp, daddr_t blkno, ssize_t xfer, int kmsflg)
>> dadkp->dad_secshf) << dadkp->dad_secshf;
bp->b_un.b_addr = 0;
- if (ddi_iopb_alloc((dadkp->dad_sd)->sd_dev, (ddi_dma_lim_t *)0,
- (uint_t)iobp->b_pbytecnt, &bp->b_un.b_addr)) {
+ /*
+ * use i_ddi_mem_alloc() for now until we have an interface to allocate
+ * memory for DMA which doesn't require a DMA handle. ddi_iopb_alloc()
+ * is obsolete and we want more flexibility in controlling the DMA
+ * address constraints..
+ */
+ if (i_ddi_mem_alloc((dadkp->dad_sd)->sd_dev, &dadk_alloc_attr,
+ (size_t)iobp->b_pbytecnt, ((kmsflg == KM_SLEEP) ? 1 : 0), 0, NULL,
+ &bp->b_un.b_addr, &rlen, NULL) != DDI_SUCCESS) {
freerbuf(bp);
kmem_free(iobp, sizeof (*iobp));
return (NULL);
@@ -902,7 +964,7 @@ dadk_iob_free(opaque_t objp, struct tgdk_iob *iobp)
if (iobp->b_bp && (iobp->b_flag & IOB_BPALLOC)) {
bp = iobp->b_bp;
if (bp->b_un.b_addr && (iobp->b_flag & IOB_BPBUFALLOC))
- ddi_iopb_free((caddr_t)bp->b_un.b_addr);
+ i_ddi_mem_free((caddr_t)bp->b_un.b_addr, 0);
freerbuf(bp);
}
kmem_free(iobp, sizeof (*iobp));
diff --git a/usr/src/uts/common/io/dktp/dcdev/gda.c b/usr/src/uts/common/io/dktp/dcdev/gda.c
index f28775bd4d..ca40757c9f 100644
--- a/usr/src/uts/common/io/dktp/dcdev/gda.c
+++ b/usr/src/uts/common/io/dktp/dcdev/gda.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -170,7 +170,7 @@ gda_free(opaque_t objp, struct cmpkt *pktp, struct buf *bp)
if (bp) {
if (bp->b_un.b_addr)
- ddi_iopb_free((caddr_t)bp->b_un.b_addr);
+ i_ddi_mem_free((caddr_t)bp->b_un.b_addr, 0);
freerbuf(bp);
}
}
diff --git a/usr/src/uts/common/io/dktp/hba/ghd/ghd_dma.h b/usr/src/uts/common/io/dktp/hba/ghd/ghd_dma.h
index 8a6cba9866..ad785d1272 100644
--- a/usr/src/uts/common/io/dktp/hba/ghd/ghd_dma.h
+++ b/usr/src/uts/common/io/dktp/hba/ghd/ghd_dma.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,8 +19,8 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 1999, Sun Microsystems, Inc.
- * All Rights Reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#ifndef _GHD_DMA_H
@@ -39,11 +38,6 @@ extern "C" {
#include "ghd.h"
-void ghd_dmafree(gcmd_t *gcmdp);
-
-int ghd_dmaget(ccc_t *cccp, gcmd_t *gcmdp, struct buf *bp, int flags,
- int (*callback)(), caddr_t arg, ddi_dma_lim_t *sg_limitp);
-
int ghd_dmaget_attr(ccc_t *cccp, gcmd_t *gcmdp, long count, int sg_size,
uint_t *xfer);
diff --git a/usr/src/uts/common/io/dktp/hba/ghd/ghd_scsa.h b/usr/src/uts/common/io/dktp/hba/ghd/ghd_scsa.h
index bcd8ae9c8a..2e622df39f 100644
--- a/usr/src/uts/common/io/dktp/hba/ghd/ghd_scsa.h
+++ b/usr/src/uts/common/io/dktp/hba/ghd/ghd_scsa.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,14 +19,14 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 1999, by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#ifndef _GHD_SCSA_H
#define _GHD_SCSA_H
-#pragma ident "%Z%%M% %I% %E% SMI"
+#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
@@ -45,12 +44,6 @@ extern "C" {
#define HBA_SETGEOM(hd, sec) (((hd) << 16) | (sec))
-struct scsi_pkt *ghd_tran_init_pkt(ccc_t *cccp, struct scsi_address *ap,
- struct scsi_pkt *pktp, struct buf *bp, int cmdlen,
- int statuslen, int tgtlen, int flags,
- int (*callback)(), caddr_t arg, int ccblen,
- ddi_dma_lim_t *sg_limitp);
-
void ghd_tran_sync_pkt(struct scsi_address *ap,
struct scsi_pkt *pktp);
@@ -68,4 +61,4 @@ struct scsi_pkt *ghd_tran_init_pkt_attr(ccc_t *cccp, struct scsi_address *ap,
}
#endif
-#endif /* _GHD_SCSA_H */
+#endif /* _GHD_SCSA_H */
diff --git a/usr/src/uts/common/io/hotplug/pciehpc/pciehpc.c b/usr/src/uts/common/io/hotplug/pciehpc/pciehpc.c
index 17cd0f9018..e532582f3b 100644
--- a/usr/src/uts/common/io/hotplug/pciehpc/pciehpc.c
+++ b/usr/src/uts/common/io/hotplug/pciehpc/pciehpc.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -1612,7 +1611,7 @@ pciehpc_reg_get8(pciehpc_t *ctrl_p, uint_t off)
return ((uint8_t)ctrl_p->regops.get(ctrl_p->regops.cookie,
(off_t)off));
else
- return (ddi_mem_get8(ctrl_p->cfghdl,
+ return (ddi_get8(ctrl_p->cfghdl,
(uint8_t *)(ctrl_p->regs_base + off)));
}
@@ -1625,7 +1624,7 @@ pciehpc_reg_get16(pciehpc_t *ctrl_p, uint_t off)
return ((uint16_t)ctrl_p->regops.get(ctrl_p->regops.cookie,
(off_t)off));
else
- return (ddi_mem_get16(ctrl_p->cfghdl,
+ return (ddi_get16(ctrl_p->cfghdl,
(uint16_t *)(ctrl_p->regs_base + off)));
}
@@ -1638,7 +1637,7 @@ pciehpc_reg_get32(pciehpc_t *ctrl_p, uint_t off)
return ((uint32_t)ctrl_p->regops.get(ctrl_p->regops.cookie,
(off_t)off));
else
- return (ddi_mem_get32(ctrl_p->cfghdl,
+ return (ddi_get32(ctrl_p->cfghdl,
(uint32_t *)(ctrl_p->regs_base + off)));
}
@@ -1651,7 +1650,7 @@ pciehpc_reg_put8(pciehpc_t *ctrl_p, uint_t off, uint8_t val)
if (ctrl_p->regops.put != NULL)
ctrl_p->regops.put(ctrl_p->regops.cookie, (off_t)off, (uint_t)val);
else
- ddi_mem_put8(ctrl_p->cfghdl,
+ ddi_put8(ctrl_p->cfghdl,
(uint8_t *)(ctrl_p->regs_base + off), val);
}
@@ -1664,7 +1663,7 @@ pciehpc_reg_put16(pciehpc_t *ctrl_p, uint_t off, uint16_t val)
if (ctrl_p->regops.put != NULL)
ctrl_p->regops.put(ctrl_p->regops.cookie, (off_t)off, (uint_t)val);
else
- ddi_mem_put16(ctrl_p->cfghdl,
+ ddi_put16(ctrl_p->cfghdl,
(uint16_t *)(ctrl_p->regs_base + off), val);
}
@@ -1677,7 +1676,7 @@ pciehpc_reg_put32(pciehpc_t *ctrl_p, uint_t off, uint32_t val)
if (ctrl_p->regops.put != NULL)
ctrl_p->regops.put(ctrl_p->regops.cookie, (off_t)off, (uint_t)val);
else
- ddi_mem_put32(ctrl_p->cfghdl,
+ ddi_put32(ctrl_p->cfghdl,
(uint32_t *)(ctrl_p->regs_base + off), val);
}
diff --git a/usr/src/uts/common/io/scsi/conf/scsi_confsubr.c b/usr/src/uts/common/io/scsi/conf/scsi_confsubr.c
index 50814d6dbd..3da45d39d2 100644
--- a/usr/src/uts/common/io/scsi/conf/scsi_confsubr.c
+++ b/usr/src/uts/common/io/scsi/conf/scsi_confsubr.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -137,11 +137,65 @@ int scsi_probe_debug = 0;
int scsi_test_busy_timeout = SCSI_POLL_TIMEOUT; /* in seconds */
int scsi_test_busy_delay = 10000; /* 10msec in usec */
+/*
+ * architecture dependent allocation restrictions. For x86, we'll set
+ * dma_attr_addr_hi to scsi_max_phys_addr and dma_attr_sgllen to
+ * scsi_sgl_size during _init().
+ */
+#if defined(__sparc)
+ddi_dma_attr_t scsi_alloc_attr = {
+ DMA_ATTR_V0, /* version number */
+ 0x0, /* lowest usable address */
+ 0xFFFFFFFFull, /* high DMA address range */
+ 0xFFFFFFFFull, /* DMA counter register */
+ 1, /* DMA address alignment */
+ 1, /* DMA burstsizes */
+ 1, /* min effective DMA size */
+ 0xFFFFFFFFull, /* max DMA xfer size */
+ 0xFFFFFFFFull, /* segment boundary */
+ 1, /* s/g list length */
+ 512, /* granularity of device */
+ 0 /* DMA transfer flags */
+};
+#elif defined(__x86)
+ddi_dma_attr_t scsi_alloc_attr = {
+ DMA_ATTR_V0, /* version number */
+ 0x0, /* lowest usable address */
+ 0x0, /* high DMA address range [set in _init()] */
+ 0xFFFFull, /* DMA counter register */
+ 1, /* DMA address alignment */
+ 1, /* DMA burstsizes */
+ 1, /* min effective DMA size */
+ 0xFFFFFFFFull, /* max DMA xfer size */
+ 0xFFFFFFFFull, /* segment boundary */
+ 0, /* s/g list length */
+ 512, /* granularity of device [set in _init()] */
+ 0 /* DMA transfer flags */
+};
+uint64_t scsi_max_phys_addr = 0xFFFFFFFFull;
+int scsi_sgl_size = 0xFF;
+#endif
+
+
int
_init()
{
scsi_initialize_hba_interface();
scsi_watch_init();
+
+#if defined(__x86)
+ /* set the max physical address for iob allocs on x86 */
+ scsi_alloc_attr.dma_attr_addr_hi = scsi_max_phys_addr;
+
+ /*
+ * set the sgllen for iob allocs on x86. If this is set less than
+ * the number of pages the buffer will take (taking into account
+ * alignment), it would force the allocator to try and allocate
+ * contiguous pages.
+ */
+ scsi_alloc_attr.dma_attr_sgllen = scsi_sgl_size;
+#endif
+
return (mod_install(&modlinkage));
}
diff --git a/usr/src/uts/common/io/scsi/impl/scsi_resource.c b/usr/src/uts/common/io/scsi/impl/scsi_resource.c
index 5833c73216..9fcdb43f17 100644
--- a/usr/src/uts/common/io/scsi/impl/scsi_resource.c
+++ b/usr/src/uts/common/io/scsi/impl/scsi_resource.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -39,7 +39,7 @@
*/
uintptr_t scsi_callback_id = 0;
-
+extern ddi_dma_attr_t scsi_alloc_attr;
struct buf *
scsi_alloc_consistent_buf(struct scsi_address *ap,
@@ -49,6 +49,7 @@ scsi_alloc_consistent_buf(struct scsi_address *ap,
dev_info_t *pdip;
struct buf *bp;
int kmflag;
+ size_t rlen;
TRACE_0(TR_FAC_SCSI_RES, TR_SCSI_ALLOC_CONSISTENT_BUF_START,
"scsi_alloc_consistent_buf_start");
@@ -76,8 +77,15 @@ scsi_alloc_consistent_buf(struct scsi_address *ap,
if (datalen) {
pdip = (A_TO_TRAN(ap))->tran_hba_dip;
- while (ddi_iopb_alloc(pdip, (ddi_dma_lim_t *)0, datalen,
- &bp->b_un.b_addr)) {
+ /*
+ * use i_ddi_mem_alloc() for now until we have an interface to
+ * allocate memory for DMA which doesn't require a DMA handle.
+ * ddi_iopb_alloc() is obsolete and we want more flexibility in
+ * controlling the DMA address constraints.
+ */
+ while (i_ddi_mem_alloc(pdip, &scsi_alloc_attr, datalen,
+ ((callback == SLEEP_FUNC) ? 1 : 0), 0, NULL,
+ &bp->b_un.b_addr, &rlen, NULL) != DDI_SUCCESS) {
if (callback == SLEEP_FUNC) {
delay(drv_usectohz(10000));
} else {
@@ -115,7 +123,7 @@ scsi_free_consistent_buf(struct buf *bp)
if (!bp)
return;
if (bp->b_un.b_addr)
- ddi_iopb_free((caddr_t)bp->b_un.b_addr);
+ i_ddi_mem_free((caddr_t)bp->b_un.b_addr, 0);
freerbuf(bp);
if (scsi_callback_id != 0) {
ddi_run_callback(&scsi_callback_id);
diff --git a/usr/src/uts/common/io/scsi/impl/scsi_subr.c b/usr/src/uts/common/io/scsi/impl/scsi_subr.c
index 23a12d9fcb..aa236e45c6 100644
--- a/usr/src/uts/common/io/scsi/impl/scsi_subr.c
+++ b/usr/src/uts/common/io/scsi/impl/scsi_subr.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -53,6 +53,7 @@ static char scsi_log_buffer[MAXPATHLEN + 1];
#define CSEC 10000 /* usecs */
#define SEC_TO_CSEC (1000000/CSEC)
+extern ddi_dma_attr_t scsi_alloc_attr;
/*PRINTFLIKE4*/
static void impl_scsi_log(dev_info_t *dev, char *label, uint_t level,
@@ -274,13 +275,22 @@ get_pktiopb(struct scsi_address *ap, caddr_t *datap, int cdblen, int statuslen,
dev_info_t *pdip = tran->tran_hba_dip;
struct scsi_pkt *pkt = NULL;
struct buf local;
+ size_t rlen;
if (!datap)
return (pkt);
*datap = (caddr_t)0;
bzero((caddr_t)&local, sizeof (struct buf));
- if (ddi_iopb_alloc(pdip, (ddi_dma_lim_t *)0,
- (uint_t)datalen, &local.b_un.b_addr)) {
+
+ /*
+ * use i_ddi_mem_alloc() for now until we have an interface to allocate
+ * memory for DMA which doesn't require a DMA handle. ddi_iopb_alloc()
+ * is obsolete and we want more flexibility in controlling the DMA
+ * address constraints.
+ */
+ if (i_ddi_mem_alloc(pdip, &scsi_alloc_attr, datalen,
+ ((func == SLEEP_FUNC) ? 1 : 0), 0, NULL, &local.b_un.b_addr, &rlen,
+ NULL) != DDI_SUCCESS) {
return (pkt);
}
if (readflag)
@@ -291,7 +301,7 @@ get_pktiopb(struct scsi_address *ap, caddr_t *datap, int cdblen, int statuslen,
(func == SLEEP_FUNC) ? SLEEP_FUNC : NULL_FUNC,
NULL);
if (!pkt) {
- ddi_iopb_free(local.b_un.b_addr);
+ i_ddi_mem_free(local.b_un.b_addr, 0);
if (func != NULL_FUNC) {
ddi_set_callback(func, NULL, &scsi_callback_id);
}
@@ -313,7 +323,7 @@ free_pktiopb(struct scsi_pkt *pkt, caddr_t datap, int datalen)
(*tran->tran_destroy_pkt)(ap, pkt);
if (datap && datalen) {
- ddi_iopb_free(datap);
+ i_ddi_mem_free(datap, 0);
}
if (scsi_callback_id != 0) {
ddi_run_callback(&scsi_callback_id);
diff --git a/usr/src/uts/common/io/scsi/targets/st.c b/usr/src/uts/common/io/scsi/targets/st.c
index 1b7ed6b31e..00f2ca8ec5 100644
--- a/usr/src/uts/common/io/scsi/targets/st.c
+++ b/usr/src/uts/common/io/scsi/targets/st.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -307,6 +307,46 @@ static struct cln_bit_position {
};
/*
+ * architecture dependent allocation restrictions. For x86, we'll set
+ * dma_attr_addr_hi to st_max_phys_addr and dma_attr_sgllen to
+ * st_sgl_size during _init().
+ */
+#if defined(__sparc)
+static ddi_dma_attr_t st_alloc_attr = {
+ DMA_ATTR_V0, /* version number */
+ 0x0, /* lowest usable address */
+ 0xFFFFFFFFull, /* high DMA address range */
+ 0xFFFFFFFFull, /* DMA counter register */
+ 1, /* DMA address alignment */
+ 1, /* DMA burstsizes */
+ 1, /* min effective DMA size */
+ 0xFFFFFFFFull, /* max DMA xfer size */
+ 0xFFFFFFFFull, /* segment boundary */
+ 1, /* s/g list length */
+ 512, /* granularity of device */
+ 0 /* DMA transfer flags */
+};
+#elif defined(__x86)
+static ddi_dma_attr_t st_alloc_attr = {
+ DMA_ATTR_V0, /* version number */
+ 0x0, /* lowest usable address */
+ 0x0, /* high DMA address range [set in _init()] */
+ 0xFFFFull, /* DMA counter register */
+ 512, /* DMA address alignment */
+ 1, /* DMA burstsizes */
+ 1, /* min effective DMA size */
+ 0xFFFFFFFFull, /* max DMA xfer size */
+ 0xFFFFFFFFull, /* segment boundary */
+ 0, /* s/g list length */
+ 512, /* granularity of device [set in _init()] */
+ 0 /* DMA transfer flags */
+};
+uint64_t st_max_phys_addr = 0xFFFFFFFFull;
+int st_sgl_size = 0xF;
+
+#endif
+
+/*
* Configuration Data:
*
* Device driver ops vector
@@ -537,6 +577,19 @@ _init(void)
ddi_soft_state_fini(&st_state);
}
+#if defined(__x86)
+ /* set the max physical address for iob allocs on x86 */
+ st_alloc_attr.dma_attr_addr_hi = st_max_phys_addr;
+
+ /*
+ * set the sgllen for iob allocs on x86. If this is set less than
+ * the number of pages the buffer will take (taking into account
+ * alignment), it would force the allocator to try and allocate
+ * contiguous pages.
+ */
+ st_alloc_attr.dma_attr_sgllen = st_sgl_size;
+#endif
+
return (e);
}
@@ -788,7 +841,7 @@ st_attach(dev_info_t *devi, ddi_attach_cmd_t cmd)
kmem_free(un->un_uscsi_rqs_buf, SENSE_LENGTH);
}
if (un->un_mspl) {
- ddi_iopb_free((caddr_t)un->un_mspl);
+ i_ddi_mem_free((caddr_t)un->un_mspl, 0);
}
scsi_destroy_pkt(un->un_rqs);
scsi_free_consistent_buf(un->un_rqs_bp);
@@ -1047,7 +1100,7 @@ st_detach(dev_info_t *devi, ddi_detach_cmd_t cmd)
kmem_free(un->un_uscsi_rqs_buf, SENSE_LENGTH);
}
if (un->un_mspl) {
- ddi_iopb_free((caddr_t)un->un_mspl);
+ i_ddi_mem_free((caddr_t)un->un_mspl, 0);
}
if (un->un_rqs) {
scsi_destroy_pkt(un->un_rqs);
@@ -1265,6 +1318,7 @@ st_doattach(struct scsi_device *devp, int (*canwait)())
int km_flags = (canwait != NULL_FUNC) ? KM_SLEEP : KM_NOSLEEP;
int instance;
struct buf *bp;
+ size_t rlen;
/*
* Call the routine scsi_probe to do some of the dirty work.
@@ -1333,12 +1387,19 @@ st_doattach(struct scsi_device *devp, int (*canwait)())
un->un_uscsi_rqs_buf = kmem_alloc(SENSE_LENGTH, KM_SLEEP);
- (void) ddi_iopb_alloc(devp->sd_dev, (ddi_dma_lim_t *)0,
- sizeof (struct seq_mode), (caddr_t *)&un->un_mspl);
+ /*
+ * use i_ddi_mem_alloc() for now until we have an interface to allocate
+ * memory for DMA which doesn't require a DMA handle. ddi_iopb_alloc()
+ * is obsolete and we want more flexibility in controlling the DMA
+ * address constraints.
+ */
+ (void) i_ddi_mem_alloc(devp->sd_dev, &st_alloc_attr,
+ sizeof (struct seq_mode), ((km_flags == KM_SLEEP) ? 1 : 0), 0,
+ NULL, (caddr_t *)&un->un_mspl, &rlen, NULL);
if (!un->un_sbufp || !un->un_mspl) {
if (un->un_mspl) {
- ddi_iopb_free((caddr_t)un->un_mspl);
+ i_ddi_mem_free((caddr_t)un->un_mspl, 0);
}
ST_DEBUG6(devp->sd_dev, st_label, SCSI_DEBUG,
"probe partial failure: no space\n");
@@ -1418,7 +1479,7 @@ error:
ddi_remove_minor_node(devp->sd_dev, NULL);
if (un) {
if (un->un_mspl) {
- ddi_iopb_free((caddr_t)un->un_mspl);
+ i_ddi_mem_free((caddr_t)un->un_mspl, 0);
}
if (un->un_sbufp) {
freerbuf(un->un_sbufp);
diff --git a/usr/src/uts/common/io/vgasubr.c b/usr/src/uts/common/io/vgasubr.c
index 777bee8ab7..5fc151232a 100644
--- a/usr/src/uts/common/io/vgasubr.c
+++ b/usr/src/uts/common/io/vgasubr.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -83,8 +83,8 @@ vga_get_hardware_settings(struct vgaregmap *reg, int *width, int *height)
if (GET_VERT_X2(reg)) *height *= 2;
}
-#define PUTB(reg, off, v) ddi_io_put8(reg->handle, reg->addr + (off), v)
-#define GETB(reg, off) ddi_io_get8(reg->handle, reg->addr + (off))
+#define PUTB(reg, off, v) ddi_put8(reg->handle, reg->addr + (off), v)
+#define GETB(reg, off) ddi_get8(reg->handle, reg->addr + (off))
int
vga_get_reg(struct vgaregmap *reg, int indexreg)
diff --git a/usr/src/uts/common/os/sunddi.c b/usr/src/uts/common/os/sunddi.c
index 081e9d9005..8bcef42c64 100644
--- a/usr/src/uts/common/os/sunddi.c
+++ b/usr/src/uts/common/os/sunddi.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -405,97 +405,130 @@ ddi_poke(dev_info_t *devi, size_t size, void *addr, void *value_p)
return (i_ddi_peekpoke(devi, DDI_CTLOPS_POKE, size, addr, value_p));
}
-#ifdef _LP64
int
ddi_peek8(dev_info_t *dip, int8_t *addr, int8_t *val_p)
-#else /* _ILP32 */
-int
-ddi_peekc(dev_info_t *dip, int8_t *addr, int8_t *val_p)
-#endif
{
return (i_ddi_peekpoke(dip, DDI_CTLOPS_PEEK, sizeof (*val_p), addr,
val_p));
}
-#ifdef _LP64
int
ddi_peek16(dev_info_t *dip, int16_t *addr, int16_t *val_p)
-#else /* _ILP32 */
-int
-ddi_peeks(dev_info_t *dip, int16_t *addr, int16_t *val_p)
-#endif
{
return (i_ddi_peekpoke(dip, DDI_CTLOPS_PEEK, sizeof (*val_p), addr,
val_p));
}
-#ifdef _LP64
int
ddi_peek32(dev_info_t *dip, int32_t *addr, int32_t *val_p)
-#else /* _ILP32 */
-int
-ddi_peekl(dev_info_t *dip, int32_t *addr, int32_t *val_p)
-#endif
{
return (i_ddi_peekpoke(dip, DDI_CTLOPS_PEEK, sizeof (*val_p), addr,
val_p));
}
-#ifdef _LP64
int
ddi_peek64(dev_info_t *dip, int64_t *addr, int64_t *val_p)
-#else /* _ILP32 */
+{
+ return (i_ddi_peekpoke(dip, DDI_CTLOPS_PEEK, sizeof (*val_p), addr,
+ val_p));
+}
+
+
+/*
+ * We need to separate the old interfaces from the new ones and leave them
+ * in here for a while. Previous versions of the OS defined the new interfaces
+ * to the old interfaces. This way we can fix things up so that we can
+ * eventually remove these interfaces.
+ * e.g. A 3rd party module/driver using ddi_peek8 and built against S10
+ * or earlier will actually have a reference to ddi_peekc in the binary.
+ */
+#ifdef _ILP32
+int
+ddi_peekc(dev_info_t *dip, int8_t *addr, int8_t *val_p)
+{
+ return (i_ddi_peekpoke(dip, DDI_CTLOPS_PEEK, sizeof (*val_p), addr,
+ val_p));
+}
+
+int
+ddi_peeks(dev_info_t *dip, int16_t *addr, int16_t *val_p)
+{
+ return (i_ddi_peekpoke(dip, DDI_CTLOPS_PEEK, sizeof (*val_p), addr,
+ val_p));
+}
+
+int
+ddi_peekl(dev_info_t *dip, int32_t *addr, int32_t *val_p)
+{
+ return (i_ddi_peekpoke(dip, DDI_CTLOPS_PEEK, sizeof (*val_p), addr,
+ val_p));
+}
+
int
ddi_peekd(dev_info_t *dip, int64_t *addr, int64_t *val_p)
-#endif
{
return (i_ddi_peekpoke(dip, DDI_CTLOPS_PEEK, sizeof (*val_p), addr,
val_p));
}
+#endif /* _ILP32 */
-#ifdef _LP64
int
ddi_poke8(dev_info_t *dip, int8_t *addr, int8_t val)
-#else /* _ILP32 */
-int
-ddi_pokec(dev_info_t *dip, int8_t *addr, int8_t val)
-#endif
{
return (i_ddi_peekpoke(dip, DDI_CTLOPS_POKE, sizeof (val), addr, &val));
}
-#ifdef _LP64
int
ddi_poke16(dev_info_t *dip, int16_t *addr, int16_t val)
-#else /* _ILP32 */
-int
-ddi_pokes(dev_info_t *dip, int16_t *addr, int16_t val)
-#endif
{
return (i_ddi_peekpoke(dip, DDI_CTLOPS_POKE, sizeof (val), addr, &val));
}
-#ifdef _LP64
int
ddi_poke32(dev_info_t *dip, int32_t *addr, int32_t val)
-#else /* _ILP32 */
-int
-ddi_pokel(dev_info_t *dip, int32_t *addr, int32_t val)
-#endif
{
return (i_ddi_peekpoke(dip, DDI_CTLOPS_POKE, sizeof (val), addr, &val));
}
-#ifdef _LP64
int
ddi_poke64(dev_info_t *dip, int64_t *addr, int64_t val)
-#else /* _ILP32 */
+{
+ return (i_ddi_peekpoke(dip, DDI_CTLOPS_POKE, sizeof (val), addr, &val));
+}
+
+/*
+ * We need to separate the old interfaces from the new ones and leave them
+ * in here for a while. Previous versions of the OS defined the new interfaces
+ * to the old interfaces. This way we can fix things up so that we can
+ * eventually remove these interfaces.
+ * e.g. A 3rd party module/driver using ddi_poke8 and built against S10
+ * or earlier will actually have a reference to ddi_pokec in the binary.
+ */
+#ifdef _ILP32
+int
+ddi_pokec(dev_info_t *dip, int8_t *addr, int8_t val)
+{
+ return (i_ddi_peekpoke(dip, DDI_CTLOPS_POKE, sizeof (val), addr, &val));
+}
+
+int
+ddi_pokes(dev_info_t *dip, int16_t *addr, int16_t val)
+{
+ return (i_ddi_peekpoke(dip, DDI_CTLOPS_POKE, sizeof (val), addr, &val));
+}
+
+int
+ddi_pokel(dev_info_t *dip, int32_t *addr, int32_t val)
+{
+ return (i_ddi_peekpoke(dip, DDI_CTLOPS_POKE, sizeof (val), addr, &val));
+}
+
int
ddi_poked(dev_info_t *dip, int64_t *addr, int64_t val)
-#endif
{
return (i_ddi_peekpoke(dip, DDI_CTLOPS_POKE, sizeof (val), addr, &val));
}
+#endif /* _ILP32 */
/*
* ddi_peekpokeio() is used primarily by the mem drivers for moving
diff --git a/usr/src/uts/common/os/sunpci.c b/usr/src/uts/common/os/sunpci.c
index 56fbbe98e8..92b35f2a05 100644
--- a/usr/src/uts/common/os/sunpci.c
+++ b/usr/src/uts/common/os/sunpci.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -460,13 +460,8 @@ pci_bdg_check_status(dev_info_t *dip, ddi_fm_error_t *derr,
(unknown ? DDI_FM_UNKNOWN : DDI_FM_OK)));
}
-#ifdef _LP64
uint8_t
pci_config_get8(ddi_acc_handle_t handle, off_t offset)
-#else /* _ILP32 */
-uint8_t
-pci_config_getb(ddi_acc_handle_t handle, off_t offset)
-#endif
{
caddr_t cfgaddr;
ddi_acc_hdl_t *hp;
@@ -476,13 +471,8 @@ pci_config_getb(ddi_acc_handle_t handle, off_t offset)
return (ddi_get8(handle, (uint8_t *)cfgaddr));
}
-#ifdef _LP64
uint16_t
pci_config_get16(ddi_acc_handle_t handle, off_t offset)
-#else /* _ILP32 */
-uint16_t
-pci_config_getw(ddi_acc_handle_t handle, off_t offset)
-#endif
{
caddr_t cfgaddr;
ddi_acc_hdl_t *hp;
@@ -492,13 +482,8 @@ pci_config_getw(ddi_acc_handle_t handle, off_t offset)
return (ddi_get16(handle, (uint16_t *)cfgaddr));
}
-#ifdef _LP64
uint32_t
pci_config_get32(ddi_acc_handle_t handle, off_t offset)
-#else /* _ILP32 */
-uint32_t
-pci_config_getl(ddi_acc_handle_t handle, off_t offset)
-#endif
{
caddr_t cfgaddr;
ddi_acc_hdl_t *hp;
@@ -508,13 +493,8 @@ pci_config_getl(ddi_acc_handle_t handle, off_t offset)
return (ddi_get32(handle, (uint32_t *)cfgaddr));
}
-#ifdef _LP64
uint64_t
pci_config_get64(ddi_acc_handle_t handle, off_t offset)
-#else /* _ILP32 */
-uint64_t
-pci_config_getll(ddi_acc_handle_t handle, off_t offset)
-#endif
{
caddr_t cfgaddr;
ddi_acc_hdl_t *hp;
@@ -524,13 +504,8 @@ pci_config_getll(ddi_acc_handle_t handle, off_t offset)
return (ddi_get64(handle, (uint64_t *)cfgaddr));
}
-#ifdef _LP64
void
pci_config_put8(ddi_acc_handle_t handle, off_t offset, uint8_t value)
-#else /* _ILP32 */
-void
-pci_config_putb(ddi_acc_handle_t handle, off_t offset, uint8_t value)
-#endif
{
caddr_t cfgaddr;
ddi_acc_hdl_t *hp;
@@ -540,13 +515,8 @@ pci_config_putb(ddi_acc_handle_t handle, off_t offset, uint8_t value)
ddi_put8(handle, (uint8_t *)cfgaddr, value);
}
-#ifdef _LP64
void
pci_config_put16(ddi_acc_handle_t handle, off_t offset, uint16_t value)
-#else /* _ILP32 */
-void
-pci_config_putw(ddi_acc_handle_t handle, off_t offset, uint16_t value)
-#endif
{
caddr_t cfgaddr;
ddi_acc_hdl_t *hp;
@@ -556,13 +526,8 @@ pci_config_putw(ddi_acc_handle_t handle, off_t offset, uint16_t value)
ddi_put16(handle, (uint16_t *)cfgaddr, value);
}
-#ifdef _LP64
void
pci_config_put32(ddi_acc_handle_t handle, off_t offset, uint32_t value)
-#else /* _ILP32 */
-void
-pci_config_putl(ddi_acc_handle_t handle, off_t offset, uint32_t value)
-#endif
{
caddr_t cfgaddr;
ddi_acc_hdl_t *hp;
@@ -572,13 +537,105 @@ pci_config_putl(ddi_acc_handle_t handle, off_t offset, uint32_t value)
ddi_put32(handle, (uint32_t *)cfgaddr, value);
}
-#ifdef _LP64
void
pci_config_put64(ddi_acc_handle_t handle, off_t offset, uint64_t value)
-#else /* _ILP32 */
+{
+ caddr_t cfgaddr;
+ ddi_acc_hdl_t *hp;
+
+ hp = impl_acc_hdl_get(handle);
+ cfgaddr = hp->ah_addr + offset;
+ ddi_put64(handle, (uint64_t *)cfgaddr, value);
+}
+
+/*
+ * We need to separate the old interfaces from the new ones and leave them
+ * in here for a while. Previous versions of the OS defined the new interfaces
+ * to the old interfaces. This way we can fix things up so that we can
+ * eventually remove these interfaces.
+ * e.g. A 3rd party module/driver using pci_config_get8 and built against S10
+ * or earlier will actually have a reference to pci_config_getb in the binary.
+ */
+#ifdef _ILP32
+uint8_t
+pci_config_getb(ddi_acc_handle_t handle, off_t offset)
+{
+ caddr_t cfgaddr;
+ ddi_acc_hdl_t *hp;
+
+ hp = impl_acc_hdl_get(handle);
+ cfgaddr = hp->ah_addr + offset;
+ return (ddi_get8(handle, (uint8_t *)cfgaddr));
+}
+
+uint16_t
+pci_config_getw(ddi_acc_handle_t handle, off_t offset)
+{
+ caddr_t cfgaddr;
+ ddi_acc_hdl_t *hp;
+
+ hp = impl_acc_hdl_get(handle);
+ cfgaddr = hp->ah_addr + offset;
+ return (ddi_get16(handle, (uint16_t *)cfgaddr));
+}
+
+uint32_t
+pci_config_getl(ddi_acc_handle_t handle, off_t offset)
+{
+ caddr_t cfgaddr;
+ ddi_acc_hdl_t *hp;
+
+ hp = impl_acc_hdl_get(handle);
+ cfgaddr = hp->ah_addr + offset;
+ return (ddi_get32(handle, (uint32_t *)cfgaddr));
+}
+
+uint64_t
+pci_config_getll(ddi_acc_handle_t handle, off_t offset)
+{
+ caddr_t cfgaddr;
+ ddi_acc_hdl_t *hp;
+
+ hp = impl_acc_hdl_get(handle);
+ cfgaddr = hp->ah_addr + offset;
+ return (ddi_get64(handle, (uint64_t *)cfgaddr));
+}
+
+void
+pci_config_putb(ddi_acc_handle_t handle, off_t offset, uint8_t value)
+{
+ caddr_t cfgaddr;
+ ddi_acc_hdl_t *hp;
+
+ hp = impl_acc_hdl_get(handle);
+ cfgaddr = hp->ah_addr + offset;
+ ddi_put8(handle, (uint8_t *)cfgaddr, value);
+}
+
+void
+pci_config_putw(ddi_acc_handle_t handle, off_t offset, uint16_t value)
+{
+ caddr_t cfgaddr;
+ ddi_acc_hdl_t *hp;
+
+ hp = impl_acc_hdl_get(handle);
+ cfgaddr = hp->ah_addr + offset;
+ ddi_put16(handle, (uint16_t *)cfgaddr, value);
+}
+
+void
+pci_config_putl(ddi_acc_handle_t handle, off_t offset, uint32_t value)
+{
+ caddr_t cfgaddr;
+ ddi_acc_hdl_t *hp;
+
+ hp = impl_acc_hdl_get(handle);
+ cfgaddr = hp->ah_addr + offset;
+ ddi_put32(handle, (uint32_t *)cfgaddr, value);
+}
+
void
pci_config_putll(ddi_acc_handle_t handle, off_t offset, uint64_t value)
-#endif
{
caddr_t cfgaddr;
ddi_acc_hdl_t *hp;
@@ -587,6 +644,7 @@ pci_config_putll(ddi_acc_handle_t handle, off_t offset, uint64_t value)
cfgaddr = hp->ah_addr + offset;
ddi_put64(handle, (uint64_t *)cfgaddr, value);
}
+#endif /* _ILP32 */
/*ARGSUSED*/
int
diff --git a/usr/src/uts/common/sys/Makefile b/usr/src/uts/common/sys/Makefile
index 5575b0f5a3..443e4f9223 100644
--- a/usr/src/uts/common/sys/Makefile
+++ b/usr/src/uts/common/sys/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -153,6 +153,7 @@ CHKHDRS= \
ddi_intr_impl.h \
ddi_impldefs.h \
ddi_implfuncs.h \
+ ddi_obsolete.h \
ddidevmap.h \
ddidmareq.h \
ddimapreq.h \
diff --git a/usr/src/uts/common/sys/ddi_obsolete.h b/usr/src/uts/common/sys/ddi_obsolete.h
new file mode 100644
index 0000000000..c6a44c78de
--- /dev/null
+++ b/usr/src/uts/common/sys/ddi_obsolete.h
@@ -0,0 +1,201 @@
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _SYS_DDI_OBSOLETE_H
+#define _SYS_DDI_OBSOLETE_H
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*
+ * Obsoleted DDI Interfaces
+ */
+
+#include <sys/types.h>
+#include <sys/dditypes.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * The following are intentionally outside of _DDI_STRICT, they are obsolete
+ * and shouldn't be used by drivers, but are still used in the consolidation.
+ * e.g. DDI implementation.
+ */
+int ddi_iomin(dev_info_t *dip, int initial, int streaming);
+
+
+#ifndef _DDI_STRICT
+
+
+int ddi_dma_setup(dev_info_t *dip, struct ddi_dma_req *dmareqp,
+ ddi_dma_handle_t *handlep);
+int ddi_dma_addr_setup(dev_info_t *dip, struct as *as, caddr_t addr, size_t len,
+ uint_t flags, int (*waitfp)(), caddr_t arg, ddi_dma_lim_t *limits,
+ ddi_dma_handle_t *handlep);
+int ddi_dma_buf_setup(dev_info_t *dip, struct buf *bp, uint_t flags,
+ int (*waitfp)(), caddr_t arg, ddi_dma_lim_t *limits,
+ ddi_dma_handle_t *handlep);
+int ddi_dma_kvaddrp(ddi_dma_handle_t, off_t, size_t, caddr_t *);
+int ddi_dma_htoc(ddi_dma_handle_t handle, off_t off, ddi_dma_cookie_t *cookiep);
+int ddi_dma_coff(ddi_dma_handle_t handle, ddi_dma_cookie_t *cookiep,
+ off_t *offp);
+int ddi_dma_curwin(ddi_dma_handle_t handle, off_t *offp, size_t *lenp);
+int ddi_dma_nextwin(ddi_dma_handle_t, ddi_dma_win_t, ddi_dma_win_t *);
+int ddi_dma_nextseg(ddi_dma_win_t, ddi_dma_seg_t, ddi_dma_seg_t *);
+int ddi_dma_segtocookie(ddi_dma_seg_t, off_t *, off_t *, ddi_dma_cookie_t *);
+int ddi_dma_free(ddi_dma_handle_t handle);
+int ddi_iopb_alloc(dev_info_t *dip, ddi_dma_lim_t *limits, uint_t length,
+ caddr_t *iopbp);
+void ddi_iopb_free(caddr_t iopb);
+int ddi_mem_alloc(dev_info_t *dip, ddi_dma_lim_t *limits, uint_t length,
+ uint_t flags, caddr_t *kaddrp, uint_t *real_length);
+void ddi_mem_free(caddr_t kaddr);
+int ddi_dma_get_attr(ddi_dma_handle_t handle, ddi_dma_attr_t *attrp);
+int ddi_dma_devalign(ddi_dma_handle_t handle, uint_t *alignment,
+ uint_t *mineffect);
+void ddi_dmalim_merge(ddi_dma_lim_t *limit, ddi_dma_lim_t *modifier);
+
+#if defined(__sparc)
+int ddi_dma_movwin(ddi_dma_handle_t, off_t *offp, size_t *lenp,
+ ddi_dma_cookie_t *);
+#endif
+
+uint8_t ddi_mem_get8(ddi_acc_handle_t handle, uint8_t *host_addr);
+uint16_t ddi_mem_get16(ddi_acc_handle_t handle, uint16_t *host_addr);
+uint32_t ddi_mem_get32(ddi_acc_handle_t handle, uint32_t *host_addr);
+uint64_t ddi_mem_get64(ddi_acc_handle_t handle, uint64_t *host_addr);
+void ddi_mem_put8(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value);
+void ddi_mem_put16(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value);
+void ddi_mem_put32(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value);
+void ddi_mem_put64(ddi_acc_handle_t handle, uint64_t *dev_addr, uint64_t value);
+
+void ddi_mem_rep_get8(ddi_acc_handle_t handle, uint8_t *host_addr,
+ uint8_t *dev_addr, size_t repcount, uint_t flags);
+void ddi_mem_rep_get16(ddi_acc_handle_t handle, uint16_t *host_addr,
+ uint16_t *dev_addr, size_t repcount, uint_t flags);
+void ddi_mem_rep_get32(ddi_acc_handle_t handle, uint32_t *host_addr,
+ uint32_t *dev_addr, size_t repcount, uint_t flags);
+void ddi_mem_rep_get64(ddi_acc_handle_t handle, uint64_t *host_addr,
+ uint64_t *dev_addr, size_t repcount, uint_t flags);
+void ddi_mem_rep_put8(ddi_acc_handle_t handle, uint8_t *host_addr,
+ uint8_t *dev_addr, size_t repcount, uint_t flags);
+void ddi_mem_rep_put16(ddi_acc_handle_t handle, uint16_t *host_addr,
+ uint16_t *dev_addr, size_t repcount, uint_t flags);
+void ddi_mem_rep_put32(ddi_acc_handle_t handle, uint32_t *host_addr,
+ uint32_t *dev_addr, size_t repcount, uint_t flags);
+void ddi_mem_rep_put64(ddi_acc_handle_t handle, uint64_t *host_addr,
+ uint64_t *dev_addr, size_t repcount, uint_t flags);
+
+uint8_t ddi_io_get8(ddi_acc_handle_t handle, uint8_t *dev_addr);
+uint16_t ddi_io_get16(ddi_acc_handle_t handle, uint16_t *dev_addr);
+uint32_t ddi_io_get32(ddi_acc_handle_t handle, uint32_t *dev_addr);
+void ddi_io_put8(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value);
+void ddi_io_put16(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value);
+void ddi_io_put32(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value);
+
+void ddi_io_rep_get8(ddi_acc_handle_t handle,
+ uint8_t *host_addr, uint8_t *dev_addr, size_t repcount);
+void ddi_io_rep_get16(ddi_acc_handle_t handle,
+ uint16_t *host_addr, uint16_t *dev_addr, size_t repcount);
+void ddi_io_rep_get32(ddi_acc_handle_t handle,
+ uint32_t *host_addr, uint32_t *dev_addr, size_t repcount);
+void ddi_io_rep_put8(ddi_acc_handle_t handle,
+ uint8_t *host_addr, uint8_t *dev_addr, size_t repcount);
+void ddi_io_rep_put16(ddi_acc_handle_t handle,
+ uint16_t *host_addr, uint16_t *dev_addr, size_t repcount);
+void ddi_io_rep_put32(ddi_acc_handle_t handle,
+ uint32_t *host_addr, uint32_t *dev_addr, size_t repcount);
+
+/* only support older interfaces on 32-bit systems */
+#ifdef _ILP32
+#define ddi_mem_getb ddi_mem_get8
+#define ddi_mem_getw ddi_mem_get16
+#define ddi_mem_getl ddi_mem_get32
+#define ddi_mem_getll ddi_mem_get64
+#define ddi_mem_rep_getb ddi_mem_rep_get8
+#define ddi_mem_rep_getw ddi_mem_rep_get16
+#define ddi_mem_rep_getl ddi_mem_rep_get32
+#define ddi_mem_rep_getll ddi_mem_rep_get64
+#define ddi_mem_putb ddi_mem_put8
+#define ddi_mem_putw ddi_mem_put16
+#define ddi_mem_putl ddi_mem_put32
+#define ddi_mem_putll ddi_mem_put64
+#define ddi_mem_rep_putb ddi_mem_rep_put8
+#define ddi_mem_rep_putw ddi_mem_rep_put16
+#define ddi_mem_rep_putl ddi_mem_rep_put32
+#define ddi_mem_rep_putll ddi_mem_rep_put64
+#define ddi_io_getb ddi_io_get8
+#define ddi_io_getw ddi_io_get16
+#define ddi_io_getl ddi_io_get32
+#define ddi_io_putb ddi_io_put8
+#define ddi_io_putw ddi_io_put16
+#define ddi_io_putl ddi_io_put32
+#define ddi_getb ddi_get8
+#define ddi_getw ddi_get16
+#define ddi_getl ddi_get32
+#define ddi_getll ddi_get64
+#define ddi_rep_getb ddi_rep_get8
+#define ddi_rep_getw ddi_rep_get16
+#define ddi_rep_getl ddi_rep_get32
+#define ddi_rep_getll ddi_rep_get64
+#define ddi_putb ddi_put8
+#define ddi_putw ddi_put16
+#define ddi_putl ddi_put32
+#define ddi_putll ddi_put64
+#define ddi_rep_putb ddi_rep_put8
+#define ddi_rep_putw ddi_rep_put16
+#define ddi_rep_putl ddi_rep_put32
+#define ddi_rep_putll ddi_rep_put64
+
+/* These can't be define's since they're not asm routines */
+void ddi_io_rep_getb(ddi_acc_handle_t handle, uint8_t *host_addr,
+ uint8_t *dev_addr, size_t repcount);
+void ddi_io_rep_getw(ddi_acc_handle_t handle, uint16_t *host_addr,
+ uint16_t *dev_addr, size_t repcount);
+void ddi_io_rep_getl(ddi_acc_handle_t handle, uint32_t *host_addr,
+ uint32_t *dev_addr, size_t repcount);
+void ddi_io_rep_putb(ddi_acc_handle_t handle, uint8_t *host_addr,
+ uint8_t *dev_addr, size_t repcount);
+void ddi_io_rep_putw(ddi_acc_handle_t handle, uint16_t *host_addr,
+ uint16_t *dev_addr, size_t repcount);
+void ddi_io_rep_putl(ddi_acc_handle_t handle, uint32_t *host_addr,
+ uint32_t *dev_addr, size_t repcount);
+
+int ddi_peekc(dev_info_t *dip, int8_t *addr, int8_t *val_p);
+int ddi_peeks(dev_info_t *dip, int16_t *addr, int16_t *val_p);
+int ddi_peekl(dev_info_t *dip, int32_t *addr, int32_t *val_p);
+int ddi_peekd(dev_info_t *dip, int64_t *addr, int64_t *val_p);
+int ddi_pokec(dev_info_t *dip, int8_t *addr, int8_t val);
+int ddi_pokes(dev_info_t *dip, int16_t *addr, int16_t val);
+int ddi_pokel(dev_info_t *dip, int32_t *addr, int32_t val);
+int ddi_poked(dev_info_t *dip, int64_t *addr, int64_t val);
+
+uint8_t pci_config_getb(ddi_acc_handle_t handle, off_t offset);
+uint16_t pci_config_getw(ddi_acc_handle_t handle, off_t offset);
+uint32_t pci_config_getl(ddi_acc_handle_t handle, off_t offset);
+uint64_t pci_config_getll(ddi_acc_handle_t handle, off_t offset);
+void pci_config_putb(ddi_acc_handle_t handle, off_t offset, uint8_t value);
+void pci_config_putw(ddi_acc_handle_t handle, off_t offset, uint16_t value);
+void pci_config_putl(ddi_acc_handle_t handle, off_t offset, uint32_t value);
+void pci_config_putll(ddi_acc_handle_t handle, off_t offset, uint64_t value);
+
+extern void repinsb(int port, uint8_t *addr, int count);
+extern void repinsw(int port, uint16_t *addr, int count);
+extern void repinsd(int port, uint32_t *addr, int count);
+extern void repoutsb(int port, uint8_t *addr, int count);
+extern void repoutsw(int port, uint16_t *addr, int count);
+extern void repoutsd(int port, uint32_t *addr, int count);
+#endif
+
+#endif /* not _DDI_STRICT */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SYS_DDI_OBSOLETE_H */
diff --git a/usr/src/uts/common/sys/dktp/hba.h b/usr/src/uts/common/sys/dktp/hba.h
index 4cb24f349e..c51c537b86 100644
--- a/usr/src/uts/common/sys/dktp/hba.h
+++ b/usr/src/uts/common/sys/dktp/hba.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -116,21 +115,6 @@ struct scsi_cbthread {
struct scsi_cmd *cb_tail; /* queue tail pointer */
};
-
-extern uint8_t inb(int port);
-extern uint16_t inw(int port);
-extern uint32_t inl(int port);
-extern void repinsb(int port, uint8_t *addr, int count);
-extern void repinsw(int port, uint16_t *addr, int count);
-extern void repinsd(int port, uint32_t *addr, int count);
-
-extern void outb(int port, uint8_t value);
-extern void outw(int port, uint16_t value);
-extern void outl(int port, uint32_t value);
-extern void repoutsb(int port, uint8_t *addr, int count);
-extern void repoutsw(int port, uint16_t *addr, int count);
-extern void repoutsd(int port, uint32_t *addr, int count);
-
#endif /* _KERNEL */
#ifdef __cplusplus
diff --git a/usr/src/uts/common/sys/sunddi.h b/usr/src/uts/common/sys/sunddi.h
index dae7ff52f2..7c8aad2560 100644
--- a/usr/src/uts/common/sys/sunddi.h
+++ b/usr/src/uts/common/sys/sunddi.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -56,6 +55,9 @@
#if defined(__GNUC__) && defined(_ASM_INLINES) && defined(_KERNEL)
#include <asm/sunddi.h>
#endif
+#ifdef _KERNEL
+#include <sys/ddi_obsolete.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -489,8 +491,6 @@ int
nullbusmap(dev_info_t *dip, dev_info_t *rdip, ddi_map_req_t *mp, off_t offset,
off_t len, caddr_t *vaddrp);
-#ifdef _LP64
-
int ddi_peek8(dev_info_t *dip, int8_t *addr, int8_t *val_p);
int ddi_peek16(dev_info_t *dip, int16_t *addr, int16_t *val_p);
int ddi_peek32(dev_info_t *dip, int32_t *addr, int32_t *val_p);
@@ -501,34 +501,6 @@ int ddi_poke16(dev_info_t *dip, int16_t *addr, int16_t val);
int ddi_poke32(dev_info_t *dip, int32_t *addr, int32_t val);
int ddi_poke64(dev_info_t *dip, int64_t *addr, int64_t val);
-#else /* _ILP32 */
-
-int ddi_peekc(dev_info_t *dip, int8_t *addr, int8_t *val_p);
-#define ddi_peek8 ddi_peekc
-
-int ddi_peeks(dev_info_t *dip, int16_t *addr, int16_t *val_p);
-#define ddi_peek16 ddi_peeks
-
-int ddi_peekl(dev_info_t *dip, int32_t *addr, int32_t *val_p);
-#define ddi_peek32 ddi_peekl
-
-int ddi_peekd(dev_info_t *dip, int64_t *addr, int64_t *val_p);
-#define ddi_peek64 ddi_peekd
-
-int ddi_pokec(dev_info_t *dip, int8_t *addr, int8_t val);
-#define ddi_poke8 ddi_pokec
-
-int ddi_pokes(dev_info_t *dip, int16_t *addr, int16_t val);
-#define ddi_poke16 ddi_pokes
-
-int ddi_pokel(dev_info_t *dip, int32_t *addr, int32_t val);
-#define ddi_poke32 ddi_pokel
-
-int ddi_poked(dev_info_t *dip, int64_t *addr, int64_t val);
-#define ddi_poke64 ddi_poked
-
-#endif /* _LP64 */
-
/*
* Peek and poke to and from a uio structure in xfersize pieces,
* using the parent nexi.
@@ -1130,287 +1102,6 @@ dev_info_t *
ddi_find_devinfo(char *name, int instance, int attached);
/*
- * DMA Mapping Setup
- *
- * The basic interface function is ddi_dma_setup(). This function
- * is to designed to allow a DMA mapping to be established to a
- * memory object. This function returns DDI_DMA_MAPPED if the
- * request was successfully filled. If this occurs, then the
- * argument handlep is filled in. This value is the DMA handle
- * for the mapping, and is used in a variety of other functions.
- * The handle is an opaque handle on the mapping, and no further
- * information may be inferred from it by the caller.
- *
- * Specifics of arguments to ddi_dma_setup:
- *
- * dip - devinfo pointer, which identifies the base device that wishes
- * to establish a dma mapping. The device may either be a leaf device,
- * or a device which is both a leaf and a nexus (e.g., a device which
- * has a dma engine but no children devices).
- *
- * dmareqp - pointer to a dma request structure. This structure contains
- * all the info necessary to establish the mapping (see <sys/ddidmareq.h>).
- * This structure may be impermanent, as its information is copied and
- * saved, if necessary, by implementation specific functions. The caller
- * is responsible for filling in the dmar_flags, dmar_length, dmar_type,
- * dmar_addr_un, dmar_fp and dmar_arg fields. Any other elements of the
- * ddi_dma_req structure should neither be examined or modified by the
- * caller.
- *
- * handlep - this is a pointer to a ddi_dma_handle_t. It is the callers
- * responsibility to hang on to this handle, because it becomes the token
- * used in all other DDI dma functions. If the handle pointer is NULL,
- * then no mapping is made, and the call is being used by the caller
- * to simply determine whether such a mapping *could* be made.
- *
- * Discussion of DMA resource callback functions:
- *
- * If a request could not be filled, it was because either there were
- * not enough mapping resources available to satisfy the request, and the
- * dmar_fp field was not set to DDI_DMA_SLEEP, or the mapping could not
- * be established at all (DDI_DMA_NOMAPPING) due to a basic inability of
- * available hardware to map the object. Callers should be prepared to deal
- * with all possible returns. It is suggested that the appropriate system
- * error number for the DDI_DMA_NOMAPPING returns is EFAULT.
- *
- * If the caller does not care whether a DMA mapping can be set up now,
- * the caller should set the field dmar_fp to DDI_DMA_DONTWAIT. This
- * implies that the caller will appropriately deal with resource
- * exhaustion.
- *
- * If the caller either cannot or does not wish to sleep awaiting mapping
- * resources, the caller may specify, via the field dmar_fp, a function to
- * call with the argument specified in dmar_arg, when resources might have
- * become available. The callback function will be called from interrupt
- * context, but in such a fashion to guarantee that spl blocking (in systems
- * that use this method of data protection) by the caller will not be
- * bypassed.
- *
- *
- * When function specified via dmar_fp is called, it may attempt to try and get
- * the mapping again. If it succeeds in getting the mapping, or does not need
- * to get the mapping any more, it must return 1. If it tries to get the
- * mapping but fails to do so, and it wants to be called back later, it
- * must return 0.
- *
- * Failure to observe this protocol will have unpredictable results.
- *
- * The callback function must provide its own data structure integrity
- * when it is invoked.
- */
-
-int
-ddi_dma_setup(dev_info_t *dip, struct ddi_dma_req *dmareqp,
- ddi_dma_handle_t *handlep);
-
-/*
- * The following three functions are convenience wrappers for ddi_dma_setup().
- */
-
-int
-ddi_dma_addr_setup(dev_info_t *dip, struct as *as, caddr_t addr, size_t len,
- uint_t flags, int (*waitfp)(), caddr_t arg,
- ddi_dma_lim_t *limits, ddi_dma_handle_t *handlep);
-
-int
-ddi_dma_buf_setup(dev_info_t *dip, struct buf *bp, uint_t flags,
- int (*waitfp)(), caddr_t arg, ddi_dma_lim_t *limits,
- ddi_dma_handle_t *handlep);
-
-/*
- * Kernel addressability of the DMA object
- *
- * It might often be very useful to be able to get an IU mapping
- * to the object which has DMA active to/from it. In fact, it might
- * even really be a requirement.
- *
- * The cacheability of the object with respect to I/O and I/U caches
- * is affected by this function as follows:
- *
- * If a kernel virtual mapping to the object owned by the handle
- * existed already, and is IU cacheable, then the extant mapping
- * is locked and returned in kaddrp. By inference, kaddrp will
- * be an IU cacheable reference.
- *
- * If a kernel virtual mapping to the object owned by the handle
- * existed already, and is not IU cacheable, then the extant mapping
- * is locked and returned in kaddrp. By inference, kaddrp will
- * *not* be an IU cacheable reference.
- *
- * If a kernel virtual mapping to the object owned by the handle
- * does not exist already, a mapping will be created that will
- * *not* be an IU cacheable reference.
- *
- * The IO cacheability of the object owned by the handle is ignored
- * and unaffected.
- *
- * This function returns the mapping values as describe above.
- *
- * When the DMA object owned by handle is freed (by ddi_dma_free()- see
- * below), any mappings created by ddi_dma_kvaddrp() cease to be valid.
- * This will be the convention that drivers must follow, as it will be
- * impossible to enforce this programmatically.
- */
-
-int
-ddi_dma_kvaddrp(ddi_dma_handle_t, off_t, size_t, caddr_t *);
-
-
-/*
- * Device addressability of the DMA object
- *
- * The handle that identifies an object mapped for DMA is an opaque entity.
- * When a device driver wishes to load its dma engine with the appropriate
- * values for transferring data to the mapped object, it has to get the
- * value. Since the exact shape and form of this address is device specific,
- * the value returned is a 'cookie' that each device may then interpret
- * as it needs to. See <sys/dditypes.h> for the form of what the DMA cookie
- * looks like.
- *
- * Returns DDI_SUCCESS for successful cookie generation,
- * or DDI_FAILURE if it cannot generate the DMA cookie.
- */
-
-int
-ddi_dma_htoc(ddi_dma_handle_t handle, off_t off, ddi_dma_cookie_t *cookiep);
-
-/*
- * Given a DMA cookie, return its offset within the object referred to
- * by the DMA handle. This is so at the end of a dma transfer, the device
- * may take its specific ending address and find out how far into the
- * memory object described by the handle the device got.
- */
-
-int
-ddi_dma_coff(ddi_dma_handle_t handle, ddi_dma_cookie_t *cookiep, off_t *offp);
-
-/*
- * DMA mapping manipulation
- *
- * It may be desirable or convenient for some devices to allow partial
- * mapping of an object for dma. This allows the mapping for DMA of
- * arbitrarily large objects since only a portion of the object may
- * be mapped for DMA at any point in time.
- *
- * In order to support this as well as other operations, the paradigm
- * of a 'mapping window' is defined here. The object to be mapped has
- * attributes of location and length. A window can be established upon
- * this object. The window has attributes of offset (from the base mapping
- * of the object) and length. It is assumed that length and offset are
- * positive with respect to the base of the mapped object.
- *
- * In order to get support for such a window, the flag DDI_DMA_PARTIAL
- * must be set in the request flags when the object is mapped for DMA.
- * Each implementation may elect whether or not to support such an
- * operation. Each implementation may also choose to ignore the request
- * for a PARTIAL mapping and either reject the mapping of the object
- * for being too big (DDI_DMA_TOOBIG) or may map the entire object.
- * The caller who asks the object to be mapped for DMA will know
- * whether a partial mapping has been made by receiving the qualified
- * return value of DDI_DMA_PARTIAL_MAP instead of DDI_DMA_MAPPED.
- * All dma window functions will return DDI_FAILURE if the object
- * is not mapped partially.
- *
- * All other DDI dma functions (except ddi_dma_Free) operate *only* on
- * the mapped portion of the object. That is, functions such as ddi_dma_sync,
- * ddi_dma_segtocookie, and so on, only operate on the currently mapped
- * window.
- */
-
-#if defined(__sparc)
-
-/*
- * ddi_dma_movwin - Move window from current offset/length to new
- * offset/length. Returns DDI_SUCCESS if able to do so, else returns
- * DDI_FAILURE if unable to do so, or the new window would be out of bounds
- * or the object isn't set up for windows. If length is (off_t) -1, the
- * If the optional cp argument is specified, an implicit ddi_dma_htoc
- * is done to fill that in. The new offset and length will be returned
- * in the arguments *offp and *lenp (resp).
- *
- * In this implementation, only fixed width windows are used. It is
- * recommended that the windowsize should be retrieved via the function
- * ddi_dma_curwin (below) and that used to specify new offsets and lengths
- * since the window will be fixed at that size and will only move modulo
- * winsize.
- *
- * The caller must guarantee that their device's dma engine is quiescent
- * with respect to the current DMA window.
- *
- * The implementation will try to be rapid with respect to moving a window,
- * but since an appropriate ddi_dma_sync() is likely to be done, there
- * will be no guaranteed latency. In practice this should not be too
- * horrible, but don't depend upon any particular latency.
- */
-
-int
-ddi_dma_movwin(ddi_dma_handle_t, off_t *offp, size_t *lenp, ddi_dma_cookie_t *);
-
-#endif
-
-/*
- * ddi_dma_curwin - report the current offset/length of the window.
- *
- * Returns DDI_SUCCESS if offset and length
- * successfully established, else DDI_FAILURE.
- */
-
-int
-ddi_dma_curwin(ddi_dma_handle_t handle, off_t *offp, size_t *lenp);
-
-/*
- * Get next dma window
- *
- * ddi_dma_nextwin takes a handle and a window, and fills in a pointer to
- * the next window within the object. If win is "NULL", a pointer to the
- * first window within the object is filled in.
- *
- * Returns DDI_SUCCESS if successfully filled in the window pointer,
- * DDI_DMA_STALE if win does not refer to the currently active
- * window,
- * DDI_DMA_DONE else there is no next window.
- */
-
-int
-ddi_dma_nextwin(ddi_dma_handle_t, ddi_dma_win_t, ddi_dma_win_t *);
-
-/*
- * Get next segment
- *
- * ddi_dma_nextseg takes a window and a segment and fills in a pointer to
- * the next segment within the window. If seg is "NULL", a pointer to the
- * first segment within the window is filled in.
- *
- * Returns DDI_SUCCESS if successfully filled in the segment pointer,
- * DDI_DMA_STALE if win does not refer to the currently active
- * window.
- * DDI_DMA_DONE else there is no next segment.
- */
-
-int
-ddi_dma_nextseg(ddi_dma_win_t, ddi_dma_seg_t, ddi_dma_seg_t *);
-
-/*
- * Segment to cookie
- *
- * ddi_dma_segtocookie takes a segment and fills in the cookie pointed
- * to by cookiep with the appropriate address, length and bus type to be
- * used to program the DMA engine. ddi_dma_segtocookie also fills in the
- * range within the object (specified by <off, len>) this particular
- * segment is mapping. <off, len> are filled in to give some control
- * where in the object the current dma transfer is active.
- *
- * Returns DDI_SUCCESS if successfully filled in all values,
- * else DDI_FAILURE
- *
- * This function is documented as Obsolete and is replaced by
- * ddi_dma_nextcookie(9F)
- */
-
-int
-ddi_dma_segtocookie(ddi_dma_seg_t, off_t *, off_t *, ddi_dma_cookie_t *);
-
-/*
* Synchronization of I/O with respect to various
* caches and system write buffers.
*
@@ -1486,97 +1177,6 @@ int
ddi_dma_sync(ddi_dma_handle_t handle, off_t offset, size_t len, uint_t flags);
/*
- * DMA mapping de-allocation
- *
- * When an I/O transfer completes, the resources required to map the
- * object for DMA should be completely released. As a side effect,
- * various cache synchronization might need to occur (see above).
- *
- * Returns DDI_SUCCESS if the all underlying caches are successfully
- * flushed, else DDI_FAILURE.
- *
- */
-
-int
-ddi_dma_free(ddi_dma_handle_t handle);
-
-/*
- * Device constraint cognizant kernel memory allocation- consistent access.
- *
- * IOPB allocation and de-allocation
- *
- * An IOPB allocation allocates some primary memory such that both
- * the kernel and the specified DMA device might be able to access it in a
- * non-cacheable (otherwise known as byte-consistent or non-streaming mode)
- * fashion. The allocation will obey the beginning alignment and padding
- * constraints as specified in the initial limits argument and as subsequently
- * modified by intervening parents. The limits argument may be NULL, in
- * which case the system picks a reasonable beginning limits.
- *
- * A kernel virtual address to the allocated primary memory is returned,
- * but no DMA mapping to the object is established (drivers must use the
- * ddi_dma_map() routines for that).
- *
- * If no iopb space can be allocated, DDI_FAILURE is returned.
- */
-
-int
-ddi_iopb_alloc(dev_info_t *dip, ddi_dma_lim_t *limits, uint_t length,
- caddr_t *iopbp);
-
-/*
- * Deallocate an IOPB kernel virtual mapping.
- */
-
-void
-ddi_iopb_free(caddr_t iopb);
-
-/*
- * Device constraint cognizant kernel memory allocation- streaming access.
- *
- * Similar to ddi_iopb_alloc, but for primary memory that is intended
- * to be accessed in a streaming fashion. The allocation will obey the
- * beginning alignment and padding constraints as specified in the initial
- * limits argument and as subsequently modified by intervening parents.
- * The limits argument may be NULL, in which case the system picks a
- * reasonable beginning limits.
- *
- * A flags value of 0x1 indicates whether the caller can wait for
- * memory to become available. Other bits in the flags argument
- * are reserved for future use and must be zero.
- *
- * Upon return from a successful call, the new real length of
- * the allocation is returned (for use in mapping the memory
- * later).
- */
-
-int
-ddi_mem_alloc(dev_info_t *dip, ddi_dma_lim_t *limits, uint_t length,
- uint_t flags, caddr_t *kaddrp, uint_t *real_length);
-
-/*
- * Free the memory allocated via ddi_mem_alloc().
- *
- * Note that passing an address not allocated via ddi_mem_alloc()
- * will panic the system.
- */
-
-void
-ddi_mem_free(caddr_t kaddr);
-
-/*
- * Dma alignment, minimum transfers sizes, and burst sizes allowed.
- * Some with tears, some without.
- */
-
-/*
- * Return a copy of the DMA attributes for the given handle.
- */
-
-int
-ddi_dma_get_attr(ddi_dma_handle_t handle, ddi_dma_attr_t *attrp);
-
-/*
* Return the allowable DMA burst size for the object mapped by handle.
* The burst sizes will returned in an integer that encodes power
* of two burst sizes that are allowed in bit encoded format. For
@@ -1589,47 +1189,6 @@ int
ddi_dma_burstsizes(ddi_dma_handle_t handle);
/*
- * Return the required beginning alignment for a transfer and
- * the minimum sized effect a transfer would have. The beginning
- * alignment will be some power of two. The minimum sized effect
- * indicates, for writes, how much of the mapped object will be
- * affected by the minimum access and for reads how much of the
- * mapped object will accessed.
- */
-
-int
-ddi_dma_devalign(ddi_dma_handle_t handle, uint_t *alignment, uint_t *mineffect);
-
-/*
- * Like ddi_dma_devalign, but without having to map the object.
- * The object is assumed to be primary memory, and it is assumed
- * a minimum effective transfer is also the appropriate alignment
- * to be using. The streaming flag, if non-zero, indicates that the
- * returned value should be modified to account for streaming mode
- * accesses (e.g., with I/O caches enabled). The initial value
- * is passed by the requester if it has a dma engine that has
- * a minimum cycle constraint (or, for streaming mode, the most
- * efficient size).
- */
-
-int
-ddi_iomin(dev_info_t *dip, int initial, int streaming);
-
-/*
- * Given two DMA limit structures, apply the limitations
- * of one to the other, following the rules of limits
- * and the wishes of the caller.
- *
- * The rules of dma limit structures are that you cannot
- * make things *less* restrictive as you apply one set
- * of limits to another.
- *
- */
-
-void
-ddi_dmalim_merge(ddi_dma_lim_t *limit, ddi_dma_lim_t *modifier);
-
-/*
* Merge DMA attributes
*/
@@ -2119,15 +1678,9 @@ extern int proc_signal(void *pref, int sig);
extern uint8_t inb(int port);
extern uint16_t inw(int port);
extern uint32_t inl(int port);
-extern void repinsb(int port, uint8_t *addr, int count);
-extern void repinsw(int port, uint16_t *addr, int count);
-extern void repinsd(int port, uint32_t *addr, int count);
extern void outb(int port, uint8_t value);
extern void outw(int port, uint16_t value);
extern void outl(int port, uint32_t value);
-extern void repoutsb(int port, uint8_t *addr, int count);
-extern void repoutsw(int port, uint16_t *addr, int count);
-extern void repoutsd(int port, uint32_t *addr, int count);
/*
* Console bell routines
@@ -2178,8 +1731,6 @@ ddi_regs_map_free(ddi_acc_handle_t *handle);
* these are the prototypes for the common portable data access functions
*/
-#ifdef _LP64
-
uint8_t
ddi_get8(ddi_acc_handle_t handle, uint8_t *addr);
@@ -2234,82 +1785,6 @@ void
ddi_rep_put64(ddi_acc_handle_t handle, uint64_t *host_addr, uint64_t *dev_addr,
size_t repcount, uint_t flags);
-#else /* _ILP32 */
-
-uint8_t
-ddi_getb(ddi_acc_handle_t handle, uint8_t *addr);
-#define ddi_get8 ddi_getb
-
-uint16_t
-ddi_getw(ddi_acc_handle_t handle, uint16_t *addr);
-#define ddi_get16 ddi_getw
-
-uint32_t
-ddi_getl(ddi_acc_handle_t handle, uint32_t *addr);
-#define ddi_get32 ddi_getl
-
-uint64_t
-ddi_getll(ddi_acc_handle_t handle, uint64_t *addr);
-#define ddi_get64 ddi_getll
-
-void
-ddi_rep_getb(ddi_acc_handle_t handle, uint8_t *host_addr, uint8_t *dev_addr,
- size_t repcount, uint_t flags);
-#define ddi_rep_get8 ddi_rep_getb
-
-void
-ddi_rep_getw(ddi_acc_handle_t handle, uint16_t *host_addr, uint16_t *dev_addr,
- size_t repcount, uint_t flags);
-#define ddi_rep_get16 ddi_rep_getw
-
-void
-ddi_rep_getl(ddi_acc_handle_t handle, uint32_t *host_addr, uint32_t *dev_addr,
- size_t repcount, uint_t flags);
-#define ddi_rep_get32 ddi_rep_getl
-
-void
-ddi_rep_getll(ddi_acc_handle_t handle, uint64_t *host_addr, uint64_t *dev_addr,
- size_t repcount, uint_t flags);
-#define ddi_rep_get64 ddi_rep_getll
-
-void
-ddi_putb(ddi_acc_handle_t handle, uint8_t *addr, uint8_t value);
-#define ddi_put8 ddi_putb
-
-void
-ddi_putw(ddi_acc_handle_t handle, uint16_t *addr, uint16_t value);
-#define ddi_put16 ddi_putw
-
-void
-ddi_putl(ddi_acc_handle_t handle, uint32_t *addr, uint32_t value);
-#define ddi_put32 ddi_putl
-
-void
-ddi_putll(ddi_acc_handle_t handle, uint64_t *addr, uint64_t value);
-#define ddi_put64 ddi_putll
-
-void
-ddi_rep_putb(ddi_acc_handle_t handle, uint8_t *host_addr, uint8_t *dev_addr,
- size_t repcount, uint_t flags);
-#define ddi_rep_put8 ddi_rep_putb
-
-void
-ddi_rep_putw(ddi_acc_handle_t handle, uint16_t *host_addr, uint16_t *dev_addr,
- size_t repcount, uint_t flags);
-#define ddi_rep_put16 ddi_rep_putw
-
-void
-ddi_rep_putl(ddi_acc_handle_t handle, uint32_t *host_addr, uint32_t *dev_addr,
- size_t repcount, uint_t flags);
-#define ddi_rep_put32 ddi_rep_putl
-
-void
-ddi_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr, uint64_t *dev_addr,
- size_t repcount, uint_t flags);
-#define ddi_rep_put64 ddi_rep_putll
-
-#endif /* _LP64 */
-
/*
* these are special device handling functions
*/
@@ -2352,8 +1827,6 @@ pci_config_setup(dev_info_t *dip, ddi_acc_handle_t *handle);
void
pci_config_teardown(ddi_acc_handle_t *handle);
-#ifdef _LP64
-
uint8_t
pci_config_get8(ddi_acc_handle_t handle, off_t offset);
@@ -2378,42 +1851,6 @@ pci_config_put32(ddi_acc_handle_t handle, off_t offset, uint32_t value);
void
pci_config_put64(ddi_acc_handle_t handle, off_t offset, uint64_t value);
-#else /* _ILP32 */
-
-uint8_t
-pci_config_getb(ddi_acc_handle_t handle, off_t offset);
-#define pci_config_get8 pci_config_getb
-
-uint16_t
-pci_config_getw(ddi_acc_handle_t handle, off_t offset);
-#define pci_config_get16 pci_config_getw
-
-uint32_t
-pci_config_getl(ddi_acc_handle_t handle, off_t offset);
-#define pci_config_get32 pci_config_getl
-
-uint64_t
-pci_config_getll(ddi_acc_handle_t handle, off_t offset);
-#define pci_config_get64 pci_config_getll
-
-void
-pci_config_putb(ddi_acc_handle_t handle, off_t offset, uint8_t value);
-#define pci_config_put8 pci_config_putb
-
-void
-pci_config_putw(ddi_acc_handle_t handle, off_t offset, uint16_t value);
-#define pci_config_put16 pci_config_putw
-
-void
-pci_config_putl(ddi_acc_handle_t handle, off_t offset, uint32_t value);
-#define pci_config_put32 pci_config_putl
-
-void
-pci_config_putll(ddi_acc_handle_t handle, off_t offset, uint64_t value);
-#define pci_config_put64 pci_config_putll
-
-#endif /* _LP64 */
-
int
pci_report_pmcap(dev_info_t *dip, int cap, void *arg);
diff --git a/usr/src/uts/common/vm/hat.c b/usr/src/uts/common/vm/hat.c
index 24d6e50b1a..8ecf77b3f8 100644
--- a/usr/src/uts/common/vm/hat.c
+++ b/usr/src/uts/common/vm/hat.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -119,7 +119,7 @@ hat_getkpfnum_badcall(void *caller)
* until this list can be removed.
*/
if (strcmp(modname, "dnet") == 0 || strcmp(modname, "pcn") == 0 ||
- strcmp(modname, "adp") == 0 || strcmp(modname, "chs") == 0)
+ strcmp(modname, "adp") == 0)
return;
#endif /* __sparc / __i386 */
diff --git a/usr/src/uts/i86pc/Makefile.files b/usr/src/uts/i86pc/Makefile.files
index 0a0b69b601..c1521e2966 100644
--- a/usr/src/uts/i86pc/Makefile.files
+++ b/usr/src/uts/i86pc/Makefile.files
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -116,11 +116,6 @@ ATA_OBJS += $(GHD_OBJS) ata_blacklist.o ata_common.o ata_disk.o \
ata_dma.o atapi.o atapi_fsm.o ata_debug.o \
sil3xxx.o
-CHS_OBJS += chs.o chs_busops.o chs_conf.o chs_dac.o \
- chs_devops.o chs_hba.o chs_interrupt.o \
- chs_intr.o chs_queue.o chs_raid.o \
- chs_transport.o chs_viper.o chs_viperconf.o
-
NCRS_OBJS += glm.o
ELXL_OBJS += elxl.o elxl_cmn.o mii.o
diff --git a/usr/src/uts/i86pc/Makefile.i86pc b/usr/src/uts/i86pc/Makefile.i86pc
index fec8b5272a..fb651d4374 100644
--- a/usr/src/uts/i86pc/Makefile.i86pc
+++ b/usr/src/uts/i86pc/Makefile.i86pc
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# uts/i86pc/Makefile.i86pc
#
@@ -248,7 +248,6 @@ DRV_KMODS += npe
DRV_KMODS_32 += bscv
DRV_KMODS_32 += bscbus
-DRV_KMODS_32 += chs
DRV_KMODS += elxl
DRV_KMODS += fd
DRV_KMODS += fdc
diff --git a/usr/src/uts/i86pc/Makefile.rules b/usr/src/uts/i86pc/Makefile.rules
index a2727901bb..08cf9503b6 100644
--- a/usr/src/uts/i86pc/Makefile.rules
+++ b/usr/src/uts/i86pc/Makefile.rules
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -49,10 +49,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/dktp/hba/chs/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/dktp/hba/ncrs/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -218,9 +214,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/conf/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/dktp/hba/chs/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/dktp/hba/ncrs/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
diff --git a/usr/src/uts/i86pc/chs/Makefile b/usr/src/uts/i86pc/chs/Makefile
deleted file mode 100644
index c1281e14ea..0000000000
--- a/usr/src/uts/i86pc/chs/Makefile
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# uts/i86pc/chs/Makefile
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# This makefile drives the production of the chs "drv"
-# kernel module.
-#
-# i86pc implementation architecture dependent
-#
-
-#
-# Path to the base of the uts directory tree (usually /usr/src/uts).
-#
-UTSBASE = ../..
-
-#
-# Define the module and object file sets.
-#
-MODULE = chs
-OBJECTS = $(CHS_OBJS:%=$(OBJS_DIR)/%)
-LINTS = $(CHS_OBJS:%.o=$(LINTS_DIR)/%.ln)
-ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
-CONF_SRCDIR = $(UTSBASE)/i86pc/io/dktp/hba/chs
-
-#
-# Include common rules.
-#
-include $(UTSBASE)/i86pc/Makefile.i86pc
-
-#
-# Define targets
-#
-ALL_TARGET = $(BINARY) $(CONFMOD)
-LINT_TARGET = $(MODULE).lint
-INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
-
-#
-# Overrides.
-#
-DEBUG_FLGS = -DCHS_DEBUG
-$(NOT_RELEASE_BUILD)DEBUG_DEFS += $(DEBUG_FLGS)
-
-DEF_BUILDS = $(DEF_BUILDS32)
-ALL_BUILDS = $(ALL_BUILDS32)
-
-#
-# Default build targets.
-#
-.KEEP_STATE:
-
-def: $(DEF_DEPS)
-
-all: $(ALL_DEPS)
-
-clean: $(CLEAN_DEPS)
-
-clobber: $(CLOBBER_DEPS)
-
-lint: $(LINT_DEPS)
-
-modlintlib: $(MODLINTLIB_DEPS)
-
-clean.lint: $(CLEAN_LINT_DEPS)
-
-install: $(INSTALL_DEPS)
-
-#
-# Include common targets.
-#
-include $(UTSBASE)/i86pc/Makefile.targ
diff --git a/usr/src/uts/i86pc/io/dnet.c b/usr/src/uts/i86pc/io/dnet.c
index 14bc161515..e3e4d87ae3 100644
--- a/usr/src/uts/i86pc/io/dnet.c
+++ b/usr/src/uts/i86pc/io/dnet.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -512,9 +512,9 @@ dnethack(dev_info_t *devinfo)
/*
* Reset the chip
*/
- ddi_io_put32(io_handle, REG32(io_reg, BUS_MODE_REG), SW_RESET);
+ ddi_put32(io_handle, REG32(io_reg, BUS_MODE_REG), SW_RESET);
drv_usecwait(3);
- ddi_io_put32(io_handle, REG32(io_reg, BUS_MODE_REG), 0);
+ ddi_put32(io_handle, REG32(io_reg, BUS_MODE_REG), 0);
drv_usecwait(8);
secondary = dnet_read_srom(devinfo, deviceid, io_handle,
@@ -967,16 +967,16 @@ dnet_reset_board(gld_mac_info_t *macinfo)
*/
/* XXX function return value ignored */
/* (void) dnet_stop_board(macinfo); */
- val = ddi_io_get32(dnetp->io_handle,
+ val = ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG));
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, OPN_MODE_REG),
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, OPN_MODE_REG),
val & ~(START_TRANSMIT | START_RECEIVE));
/*
* Reset the chip
*/
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, INT_MASK_REG), 0);
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, INT_MASK_REG), 0);
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, BUS_MODE_REG), SW_RESET);
drv_usecwait(5);
}
@@ -1006,7 +1006,7 @@ dnet_chip_init(gld_mac_info_t *macinfo)
struct dnetinstance *dnetp = (struct dnetinstance *)
(macinfo->gldm_private);
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, BUS_MODE_REG),
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, BUS_MODE_REG),
CACHE_ALIGN | BURST_SIZE); /* CSR0 */
/*
@@ -1017,13 +1017,13 @@ dnet_chip_init(gld_mac_info_t *macinfo)
/*
* Set the base address of the Rx descriptor list in CSR3
*/
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, RX_BASE_ADDR_REG),
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, RX_BASE_ADDR_REG),
(uint32_t)(dnetp->rx_desc_paddr));
/*
* Set the base address of the Tx descrptor list in CSR4
*/
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, TX_BASE_ADDR_REG),
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, TX_BASE_ADDR_REG),
(uint32_t)(dnetp->tx_desc_paddr));
dnetp->tx_current_desc = dnetp->rx_current_desc = 0;
@@ -1052,14 +1052,14 @@ dnet_start(gld_mac_info_t *macinfo)
/*
* start the board and enable receiving
*/
- val = ddi_io_get32(dnetp->io_handle,
+ val = ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG));
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, OPN_MODE_REG),
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, OPN_MODE_REG),
val | START_TRANSMIT);
(void) dnet_set_addr(macinfo, dnetp->curr_macaddr);
- val = ddi_io_get32(dnetp->io_handle,
+ val = ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG));
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, OPN_MODE_REG),
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, OPN_MODE_REG),
val | START_RECEIVE);
enable_interrupts(dnetp, 1);
return (0);
@@ -1106,9 +1106,9 @@ dnet_stop_board(gld_mac_info_t *macinfo)
* stop the board and disable transmit/receive
*/
mutex_enter(&dnetp->intrlock);
- val = ddi_io_get32(dnetp->io_handle,
+ val = ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG));
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, OPN_MODE_REG),
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, OPN_MODE_REG),
val & ~(START_TRANSMIT | START_RECEIVE));
mutex_exit(&dnetp->intrlock);
return (0);
@@ -1135,7 +1135,7 @@ dnet_set_addr(gld_mac_info_t *macinfo, uchar_t *macaddr)
cmn_err(CE_NOTE, "dnet_set_addr(0x%p)", (void *) macinfo);
#endif
bcopy(macaddr, dnetp->curr_macaddr, ETHERADDRL);
- val = ddi_io_get32(dnetp->io_handle,
+ val = ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG));
if (!(val & START_TRANSMIT))
return (0);
@@ -1194,7 +1194,7 @@ dnet_set_addr(gld_mac_info_t *macinfo, uchar_t *macaddr)
hashp[ index / 16 ] |= 1 << (index % 16);
desc->desc0.own = 1;
- ddi_io_put8(dnetp->io_handle, REG8(dnetp->io_reg, TX_POLL_REG),
+ ddi_put8(dnetp->io_handle, REG8(dnetp->io_reg, TX_POLL_REG),
TX_POLL_DEMAND);
return (0);
}
@@ -1323,14 +1323,14 @@ dnet_set_promiscuous(gld_mac_info_t *macinfo, int on)
}
dnetp->promisc = on;
- val = ddi_io_get32(dnetp->io_handle,
+ val = ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG));
if (on != GLD_MAC_PROMISC_NONE)
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG),
val | PROM_MODE);
else
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG),
val & (~PROM_MODE));
mutex_exit(&dnetp->intrlock);
@@ -1590,7 +1590,7 @@ dnet_send(gld_mac_info_t *macinfo, mblk_t *mp)
/*
* Kick the transmitter
*/
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, TX_POLL_REG),
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, TX_POLL_REG),
TX_POLL_DEMAND);
mutex_exit(&dnetp->intrlock);
return (GLD_TX_OK); /* successful transmit attempt */
@@ -1615,7 +1615,7 @@ dnetintr(gld_mac_info_t *macinfo)
if (dnetdebug & DNETINT)
cmn_err(CE_NOTE, "dnetintr(0x%p)", (void *)macinfo);
#endif
- int_status = ddi_io_get32(dnetp->io_handle, REG32(dnetp->io_reg,
+ int_status = ddi_get32(dnetp->io_handle, REG32(dnetp->io_reg,
STATUS_REG));
/*
@@ -1629,7 +1629,7 @@ dnetintr(gld_mac_info_t *macinfo)
dnetp->stat_intr++;
if (int_status & GPTIMER_INTR) {
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, STATUS_REG), GPTIMER_INTR);
if (dnetp->timer.cb)
dnetp->timer.cb(dnetp);
@@ -1638,7 +1638,7 @@ dnetintr(gld_mac_info_t *macinfo)
}
if (int_status & TX_INTR) {
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, STATUS_REG), TX_INTR);
mutex_enter(&dnetp->txlock);
if (dnetp->need_gld_sched) {
@@ -1658,7 +1658,7 @@ dnetintr(gld_mac_info_t *macinfo)
* Check if receive interrupt bit is set
*/
if (int_status & RX_INTR) {
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, STATUS_REG), RX_INTR);
dnet_getp(macinfo);
}
@@ -1739,7 +1739,7 @@ dnet_getp(gld_mac_info_t *macinfo)
* If the workaround is not in place, we must still update
* the missed frame statistic from the on-chip counter.
*/
- misses = ddi_io_get32(dnetp->io_handle,
+ misses = ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, MISSED_FRAME_REG));
dnetp->stat_missed += (misses & MISSED_FRAME_MASK);
}
@@ -1765,7 +1765,7 @@ dnet_getp(gld_mac_info_t *macinfo)
} while (!(dnetp->rx_desc[marker].desc0.own) &&
marker != index);
- misses = ddi_io_get32(dnetp->io_handle,
+ misses = ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, MISSED_FRAME_REG));
dnetp->stat_missed +=
(misses & MISSED_FRAME_MASK);
@@ -1774,15 +1774,15 @@ dnet_getp(gld_mac_info_t *macinfo)
* Overflow(s) have occurred : stop receiver,
* and wait until in stopped state
*/
- opn = ddi_io_get32(dnetp->io_handle,
+ opn = ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG));
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG),
opn & ~(START_RECEIVE));
do {
drv_usecwait(10);
- } while ((ddi_io_get32(dnetp->io_handle,
+ } while ((ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, STATUS_REG)) &
RECEIVE_PROCESS_STATE) != 0);
#ifdef DNETDEBUG
@@ -1797,9 +1797,9 @@ dnet_getp(gld_mac_info_t *macinfo)
}
/* restart the receiver */
- opn = ddi_io_get32(dnetp->io_handle,
+ opn = ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG));
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG),
opn | START_RECEIVE);
marker = dnetp->rx_current_desc = index;
@@ -1912,7 +1912,7 @@ dnet_getp(gld_mac_info_t *macinfo)
(dnetp->rx_current_desc+1) % dnetp->max_rx_desc;
/* Demand receive polling by the chip */
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, RX_POLL_REG), RX_POLL_DEMAND);
continue;
@@ -1953,7 +1953,7 @@ dnet_getp(gld_mac_info_t *macinfo)
(dnetp->rx_current_desc+1) % dnetp->max_rx_desc;
/* Demand polling by chip */
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, RX_POLL_REG), RX_POLL_DEMAND);
/* send the packet upstream */
@@ -2087,7 +2087,7 @@ write_gpr(struct dnetinstance *dnetp, uint32_t val)
val |= CWE_21143, val &= ~GPR_CONTROL_WRITE;
/* Write to upper half of CSR15 */
dnetp->gprsia = (dnetp->gprsia & 0xffff) | (val << 16);
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, SIA_GENERAL_REG),
dnetp->gprsia);
break;
@@ -2095,7 +2095,7 @@ write_gpr(struct dnetinstance *dnetp, uint32_t val)
/* Set the correct bit for a control write */
if (val & GPR_CONTROL_WRITE)
val |= CWE_21140, val &= ~GPR_CONTROL_WRITE;
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, GP_REG),
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, GP_REG),
val);
break;
}
@@ -2107,10 +2107,10 @@ read_gpr(struct dnetinstance *dnetp)
switch (dnetp->board_type) {
case DEVICE_ID_21143:
/* Read upper half of CSR15 */
- return (ddi_io_get32(dnetp->io_handle,
+ return (ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, SIA_GENERAL_REG)) >> 16);
default:
- return (ddi_io_get32(dnetp->io_handle,
+ return (ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, GP_REG)));
}
}
@@ -2194,10 +2194,10 @@ set_opr(gld_mac_info_t *macinfo)
}
if (opnmode_len) {
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG), val);
dnet_reset_board(macinfo);
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, OPN_MODE_REG), val);
return;
}
@@ -2237,9 +2237,9 @@ set_opr(gld_mac_info_t *macinfo)
if (dnetdebug & DNETREGCFG)
cmn_err(CE_NOTE, "OPN: %x", val);
#endif
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, OPN_MODE_REG), val);
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, OPN_MODE_REG), val);
dnet_reset_board(macinfo);
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, OPN_MODE_REG), val);
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, OPN_MODE_REG), val);
}
static void
@@ -2263,10 +2263,10 @@ set_sia(gld_mac_info_t *macinfo)
sia_delay = ddi_getprop(DDI_DEV_T_ANY, dnetp->devinfo,
DDI_PROP_DONTPASS, "sia-delay", 10000);
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, SIA_CONNECT_REG), 0);
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, SIA_TXRX_REG),
block->un.sia.csr14);
@@ -2275,20 +2275,20 @@ set_sia(gld_mac_info_t *macinfo)
* to keep the GP half intact
*/
dnetp->gprsia = (dnetp->gprsia&0xffff0000)|block->un.sia.csr15;
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, SIA_GENERAL_REG),
dnetp->gprsia);
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, SIA_CONNECT_REG),
block->un.sia.csr13);
drv_usecwait(sia_delay);
} else if (dnetp->board_type != DEVICE_ID_21140) {
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, SIA_CONNECT_REG), 0);
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, SIA_TXRX_REG), 0);
}
}
@@ -3029,10 +3029,10 @@ dnet_read21040addr(dev_info_t *dip, ddi_acc_handle_t io_handle, int io_reg,
DDI_PROP_DONTPASS, macoffset_propname, 0) + ETHERADDRL;
/* Reset ROM pointer */
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG), 0);
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG), 0);
for (i = 0; i < *len; i++) {
do {
- val = ddi_io_get32(io_handle,
+ val = ddi_get32(io_handle,
REG32(io_reg, ETHER_ROM_REG));
} while (val & 0x80000000);
addr[i] = val & 0xFF;
@@ -3057,55 +3057,55 @@ dnet_read21140srom(ddi_acc_handle_t io_handle, int io_reg, uchar_t *addr,
rom_addr = 0;
for (i = 0; i < maxlen; i += 2) {
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM);
drv_nsecwait(30);
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP);
drv_nsecwait(50);
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP | SEL_CLK);
drv_nsecwait(250);
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP);
drv_nsecwait(100);
/* command */
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP | DATA_IN);
drv_nsecwait(150);
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP | DATA_IN | SEL_CLK);
drv_nsecwait(250);
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP | DATA_IN);
drv_nsecwait(250);
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP | DATA_IN | SEL_CLK);
drv_nsecwait(250);
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP | DATA_IN);
drv_nsecwait(100);
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP);
drv_nsecwait(150);
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP | SEL_CLK);
drv_nsecwait(250);
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP);
drv_nsecwait(100);
/* Address */
for (j = HIGH_ADDRESS_BIT; j >= 1; j >>= 1) {
bit = (rom_addr & j) ? DATA_IN : 0;
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP | bit);
drv_nsecwait(150);
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP | bit | SEL_CLK);
drv_nsecwait(250);
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP | bit);
drv_nsecwait(100);
}
@@ -3114,15 +3114,15 @@ dnet_read21140srom(ddi_acc_handle_t io_handle, int io_reg, uchar_t *addr,
/* Data */
word = 0;
for (j = 0x8000; j >= 1; j >>= 1) {
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP | SEL_CLK);
drv_nsecwait(100);
- dout = ddi_io_get32(io_handle,
+ dout = ddi_get32(io_handle,
REG32(io_reg, ETHER_ROM_REG));
drv_nsecwait(150);
if (dout & DATA_OUT)
word |= j;
- ddi_io_put32(io_handle,
+ ddi_put32(io_handle,
REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM | SEL_CHIP);
drv_nsecwait(250);
@@ -3130,7 +3130,7 @@ dnet_read21140srom(ddi_acc_handle_t io_handle, int io_reg, uchar_t *addr,
addr[i] = (word & 0x0000FF);
addr[i + 1] = (word >> 8);
rom_addr++;
- ddi_io_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
+ ddi_put32(io_handle, REG32(io_reg, ETHER_ROM_REG),
READ_OP | SEL_ROM);
drv_nsecwait(100);
}
@@ -3656,7 +3656,7 @@ send_test_packet(gld_mac_info_t *macinfo)
desc[bufindex].desc1.int_on_comp = 1;
desc[bufindex].desc0.own = 1;
- ddi_io_put8(dnetp->io_handle, REG8(dnetp->io_reg, TX_POLL_REG),
+ ddi_put8(dnetp->io_handle, REG8(dnetp->io_reg, TX_POLL_REG),
TX_POLL_DEMAND);
/*
@@ -3698,7 +3698,7 @@ enable_interrupts(struct dnetinstance *dnetp, int enable_xmit)
/* Don't enable interrupts if they have been forced off */
if (dnetp->interrupts_disabled)
return;
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, INT_MASK_REG),
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, INT_MASK_REG),
NORMAL_INTR_MASK | ABNORMAL_INTR_MASK | TX_UNDERFLOW_MASK |
(enable_xmit ? TX_INTERRUPT_MASK : 0) |
(dnetp->timer.cb ? GPTIMER_INTR : 0) |
@@ -3938,7 +3938,7 @@ dnet_detach_hacked_interrupt(dev_info_t *devinfo)
struct dnetinstance *altdnetp =
(struct dnetinstance *)mac->gldm_private;
altdnetp->interrupts_disabled = 1;
- ddi_io_put32(altdnetp->io_handle,
+ ddi_put32(altdnetp->io_handle,
REG32(altdnetp->io_reg, INT_MASK_REG), 0);
}
}
@@ -4051,20 +4051,20 @@ dnet_mii_read(dev_info_t *dip, int phy_addr, int reg_num)
mii_tristate(dnetp);
/* Check that the PHY generated a zero bit the 2nd clock */
- tmp = ddi_io_get32(dnetp->io_handle,
+ tmp = ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, ETHER_ROM_REG));
turned_around = (tmp & MII_DATA_IN) ? 0 : 1;
/* read data WORD */
for (i = 0; i < bits_in_ushort; i++) {
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, ETHER_ROM_REG), MII_READ);
drv_usecwait(MII_DELAY);
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, ETHER_ROM_REG), MII_READ | MII_CLOCK);
drv_usecwait(MII_DELAY);
- tmp = ddi_io_get32(dnetp->io_handle,
+ tmp = ddi_get32(dnetp->io_handle,
REG32(dnetp->io_reg, ETHER_ROM_REG));
drv_usecwait(MII_DELAY);
data = (data << 1) | (tmp >> MII_DATA_IN_POSITION) & 0x0001;
@@ -4110,11 +4110,11 @@ write_mii(struct dnetinstance *dnetp, uint32_t mii_data, int data_size)
for (i = data_size; i > 0; i--) {
dbit = ((mii_data >>
(31 - MII_WRITE_DATA_POSITION)) & MII_WRITE_DATA);
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, ETHER_ROM_REG),
MII_WRITE | dbit);
drv_usecwait(MII_DELAY);
- ddi_io_put32(dnetp->io_handle,
+ ddi_put32(dnetp->io_handle,
REG32(dnetp->io_reg, ETHER_ROM_REG),
MII_WRITE | MII_CLOCK | dbit);
drv_usecwait(MII_DELAY);
@@ -4130,10 +4130,10 @@ static void
mii_tristate(struct dnetinstance *dnetp)
{
ASSERT(MUTEX_HELD(&dnetp->intrlock));
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, ETHER_ROM_REG),
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, ETHER_ROM_REG),
MII_WRITE_TS);
drv_usecwait(MII_DELAY);
- ddi_io_put32(dnetp->io_handle, REG32(dnetp->io_reg, ETHER_ROM_REG),
+ ddi_put32(dnetp->io_handle, REG32(dnetp->io_reg, ETHER_ROM_REG),
MII_WRITE_TS | MII_CLOCK);
drv_usecwait(MII_DELAY);
}
diff --git a/usr/src/uts/i86pc/io/gfx_private/gfxp_vgatext.c b/usr/src/uts/i86pc/io/gfx_private/gfxp_vgatext.c
index aa6dbea4d1..5cf92bd434 100644
--- a/usr/src/uts/i86pc/io/gfx_private/gfxp_vgatext.c
+++ b/usr/src/uts/i86pc/io/gfx_private/gfxp_vgatext.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
@@ -301,7 +301,7 @@ gfxp_vgatext_attach(dev_info_t *devi, ddi_attach_cmd_t cmd,
goto fail;
softc->fb.mapped = B_TRUE;
- if (ddi_io_get8(softc->regs.handle,
+ if (ddi_get8(softc->regs.handle,
softc->regs.addr + VGA_MISC_R) & VGA_MISC_IOA_SEL)
softc->text_base = (caddr_t)softc->fb.addr + VGA_COLOR_BASE;
else
diff --git a/usr/src/uts/i86pc/io/mscsi.conf b/usr/src/uts/i86pc/io/mscsi.conf
index c4260ac757..90f721857e 100644
--- a/usr/src/uts/i86pc/io/mscsi.conf
+++ b/usr/src/uts/i86pc/io/mscsi.conf
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,11 +18,12 @@
#
# CDDL HEADER END
#
+
#
-# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-
+#
#pragma ident "%Z%%M% %I% %E% SMI"
#
@@ -38,16 +38,6 @@
# the generic class entries below can be uncommented, and the
# driver-specific entries can be removed.
#
-name="mscsi" parent="chs" reg=0,0,0 mscsi-bus=0;
-name="mscsi" parent="chs" reg=1,0,0 mscsi-bus=1;
-name="mscsi" parent="chs" reg=2,0,0 mscsi-bus=2;
-name="mscsi" parent="chs" reg=3,0,0 mscsi-bus=3;
-name="mscsi" parent="chs" reg=4,0,0 mscsi-bus=4;
-name="mscsi" parent="chs" reg=5,0,0 mscsi-bus=5;
-name="mscsi" parent="chs" reg=6,0,0 mscsi-bus=6;
-name="mscsi" parent="chs" reg=7,0,0 mscsi-bus=7;
-name="mscsi" parent="chs" reg=8,0,0 mscsi-bus=8;
-name="mscsi" parent="chs" reg=9,0,0 mscsi-bus=9;
#name="mscsi" class="mscsi" reg=0,0,0 mscsi-bus=0;
#name="mscsi" class="mscsi" reg=1,0,0 mscsi-bus=1;
diff --git a/usr/src/uts/i86pc/io/pciex/hotplug/pciehpc/pciehpc_ck804.c b/usr/src/uts/i86pc/io/pciex/hotplug/pciehpc/pciehpc_ck804.c
index 62794c00ee..8408500358 100644
--- a/usr/src/uts/i86pc/io/pciex/hotplug/pciehpc/pciehpc_ck804.c
+++ b/usr/src/uts/i86pc/io/pciex/hotplug/pciehpc/pciehpc_ck804.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -838,7 +837,7 @@ ck804_reg_get16(pciehpc_t *ctrl_p, uint_t off)
ASSERT(ck804_p != NULL);
- return (ddi_mem_get16(ck804_p->analog_bar_hdl,
+ return (ddi_get16(ck804_p->analog_bar_hdl,
(uint16_t *)(ck804_p->analog_bar_base + off)));
}
@@ -849,6 +848,6 @@ ck804_reg_put16(pciehpc_t *ctrl_p, uint_t off, uint16_t val)
ASSERT(ck804_p != NULL);
- ddi_mem_put16(ck804_p->analog_bar_hdl,
+ ddi_put16(ck804_p->analog_bar_hdl,
(uint16_t *)(ck804_p->analog_bar_base + off), val);
}
diff --git a/usr/src/uts/intel/ia32/ml/ddi_i86_asm.s b/usr/src/uts/intel/ia32/ml/ddi_i86_asm.s
index 1e396db610..f46048fadd 100644
--- a/usr/src/uts/intel/ia32/ml/ddi_i86_asm.s
+++ b/usr/src/uts/intel/ia32/ml/ddi_i86_asm.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -37,8 +37,6 @@
#if defined(lint) || defined(__lint)
-#ifdef _LP64
-
/*ARGSUSED*/
uint8_t
ddi_get8(ddi_acc_handle_t handle, uint8_t *addr)
@@ -267,253 +265,13 @@ ddi_mem_rep_put64(ddi_acc_handle_t handle, uint64_t *host_addr,
uint64_t *dev_addr, size_t repcount, uint_t flags)
{}
-#else /* _ILP32 */
-
-uint8_t
-ddi_io_getb(ddi_acc_handle_t handle, uint8_t *addr)
-{
- return ((((ddi_acc_impl_t *)handle)->ahi_get8)
- ((ddi_acc_impl_t *)handle, addr));
-}
-
-uint16_t
-ddi_getw(ddi_acc_handle_t handle, uint16_t *addr)
-{
- return ((((ddi_acc_impl_t *)handle)->ahi_get16)
- ((ddi_acc_impl_t *)handle, addr));
-}
-
-uint16_t
-ddi_mem_getw(ddi_acc_handle_t handle, uint16_t *addr)
-{
- return ((((ddi_acc_impl_t *)handle)->ahi_get16)
- ((ddi_acc_impl_t *)handle, addr));
-}
-
-uint16_t
-ddi_io_getw(ddi_acc_handle_t handle, uint16_t *addr)
-{
- return ((((ddi_acc_impl_t *)handle)->ahi_get16)
- ((ddi_acc_impl_t *)handle, addr));
-}
-
-uint32_t
-ddi_getl(ddi_acc_handle_t handle, uint32_t *addr)
-{
- return ((((ddi_acc_impl_t *)handle)->ahi_get32)
- ((ddi_acc_impl_t *)handle, addr));
-}
-
-uint32_t
-ddi_mem_getl(ddi_acc_handle_t handle, uint32_t *addr)
-{
- return ((((ddi_acc_impl_t *)handle)->ahi_get32)
- ((ddi_acc_impl_t *)handle, addr));
-}
-
-uint32_t
-ddi_io_getl(ddi_acc_handle_t handle, uint32_t *addr)
-{
- return ((((ddi_acc_impl_t *)handle)->ahi_get32)
- ((ddi_acc_impl_t *)handle, addr));
-}
-
-uint64_t
-ddi_getll(ddi_acc_handle_t handle, uint64_t *addr)
-{
- return ((((ddi_acc_impl_t *)handle)->ahi_get64)
- ((ddi_acc_impl_t *)handle, addr));
-}
-
-uint64_t
-ddi_mem_getll(ddi_acc_handle_t handle, uint64_t *addr)
-{
- return ((((ddi_acc_impl_t *)handle)->ahi_get64)
- ((ddi_acc_impl_t *)handle, addr));
-}
-
-void
-ddi_putb(ddi_acc_handle_t handle, uint8_t *addr, uint8_t value)
-{
- (((ddi_acc_impl_t *)handle)->ahi_put8)
- ((ddi_acc_impl_t *)handle, addr, value);
-}
-
-void
-ddi_mem_putb(ddi_acc_handle_t handle, uint8_t *addr, uint8_t value)
-{
- (((ddi_acc_impl_t *)handle)->ahi_put8)
- ((ddi_acc_impl_t *)handle, addr, value);
-}
-
-void
-ddi_io_putb(ddi_acc_handle_t handle, uint8_t *addr, uint8_t value)
-{
- (((ddi_acc_impl_t *)handle)->ahi_put8)
- ((ddi_acc_impl_t *)handle, addr, value);
-}
-
-void
-ddi_put16(ddi_acc_handle_t handle, uint16_t *addr, uint16_t value)
-{
- (((ddi_acc_impl_t *)handle)->ahi_put16)
- ((ddi_acc_impl_t *)handle, addr, value);
-}
-
-void
-ddi_mem_putw(ddi_acc_handle_t handle, uint16_t *addr, uint16_t value)
-{
- (((ddi_acc_impl_t *)handle)->ahi_put16)
- ((ddi_acc_impl_t *)handle, addr, value);
-}
-
-void
-ddi_io_putw(ddi_acc_handle_t handle, uint16_t *addr, uint16_t value)
-{
- (((ddi_acc_impl_t *)handle)->ahi_put16)
- ((ddi_acc_impl_t *)handle, addr, value);
-}
-
-void
-ddi_putl(ddi_acc_handle_t handle, uint32_t *addr, uint32_t value)
-{
- (((ddi_acc_impl_t *)handle)->ahi_put32)
- ((ddi_acc_impl_t *)handle, addr, value);
-}
-
-void
-ddi_mem_putl(ddi_acc_handle_t handle, uint32_t *addr, uint32_t value)
-{
- (((ddi_acc_impl_t *)handle)->ahi_put32)
- ((ddi_acc_impl_t *)handle, addr, value);
-}
-
-void
-ddi_io_putl(ddi_acc_handle_t handle, uint32_t *addr, uint32_t value)
-{
- (((ddi_acc_impl_t *)handle)->ahi_put32)
- ((ddi_acc_impl_t *)handle, addr, value);
-}
-
-void
-ddi_putll(ddi_acc_handle_t handle, uint64_t *addr, uint64_t value)
-{
- (((ddi_acc_impl_t *)handle)->ahi_put64)
- ((ddi_acc_impl_t *)handle, addr, value);
-}
-
-void
-ddi_mem_putll(ddi_acc_handle_t handle, uint64_t *addr, uint64_t value)
-{
- (((ddi_acc_impl_t *)handle)->ahi_put64)
- ((ddi_acc_impl_t *)handle, addr, value);
-}
-
-/*ARGSUSED*/
-void
-ddi_rep_getb(ddi_acc_handle_t handle, uint8_t *host_addr, uint8_t *dev_addr,
- size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_rep_getw(ddi_acc_handle_t handle, uint16_t *host_addr, uint16_t *dev_addr,
- size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_rep_getl(ddi_acc_handle_t handle, uint32_t *host_addr, uint32_t *dev_addr,
- size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_rep_getll(ddi_acc_handle_t handle, uint64_t *host_addr, uint64_t *dev_addr,
- size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_rep_putb(ddi_acc_handle_t handle, uint8_t *host_addr, uint8_t *dev_addr,
- size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_rep_putw(ddi_acc_handle_t handle, uint16_t *host_addr, uint16_t *dev_addr,
- size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_rep_putl(ddi_acc_handle_t handle, uint32_t *host_addr, uint32_t *dev_addr,
- size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr, uint64_t *dev_addr,
- size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_mem_rep_getb(ddi_acc_handle_t handle, uint8_t *host_addr,
- uint8_t *dev_addr, size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_mem_rep_getw(ddi_acc_handle_t handle, uint16_t *host_addr,
- uint16_t *dev_addr, size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_mem_rep_getl(ddi_acc_handle_t handle, uint32_t *host_addr,
- uint32_t *dev_addr, size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_mem_rep_getll(ddi_acc_handle_t handle, uint64_t *host_addr,
- uint64_t *dev_addr, size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_mem_rep_putb(ddi_acc_handle_t handle, uint8_t *host_addr,
- uint8_t *dev_addr, size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_mem_rep_putw(ddi_acc_handle_t handle, uint16_t *host_addr,
- uint16_t *dev_addr, size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_mem_rep_putl(ddi_acc_handle_t handle, uint32_t *host_addr,
- uint32_t *dev_addr, size_t repcount, uint_t flags)
-{}
-
-/*ARGSUSED*/
-void
-ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
- uint64_t *dev_addr, size_t repcount, uint_t flags)
-{}
-
-#endif /* _LP64 */
-
#else /* lint */
#if defined(__amd64)
- ENTRY(ddi_getb)
- ALTENTRY(ddi_get8)
+ ENTRY(ddi_get8)
+ ALTENTRY(ddi_getb)
ALTENTRY(ddi_mem_getb)
ALTENTRY(ddi_mem_get8)
ALTENTRY(ddi_io_getb)
@@ -532,8 +290,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
ret
2:
jmp *ACC_GETB(%rdi)
- SET_SIZE(ddi_getb)
SET_SIZE(ddi_get8)
+ SET_SIZE(ddi_getb)
SET_SIZE(ddi_mem_getb)
SET_SIZE(ddi_mem_get8)
SET_SIZE(ddi_io_getb)
@@ -541,8 +299,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#elif defined(__i386)
- ENTRY(ddi_getb)
- ALTENTRY(ddi_get8)
+ ENTRY(ddi_get8)
+ ALTENTRY(ddi_getb)
ALTENTRY(ddi_mem_getb)
ALTENTRY(ddi_mem_get8)
ALTENTRY(ddi_io_getb)
@@ -563,8 +321,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
ret
2:
jmp *ACC_GETB(%eax)
- SET_SIZE(ddi_getb)
SET_SIZE(ddi_get8)
+ SET_SIZE(ddi_getb)
SET_SIZE(ddi_mem_getb)
SET_SIZE(ddi_mem_get8)
SET_SIZE(ddi_io_getb)
@@ -574,8 +332,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_getw)
- ALTENTRY(ddi_get16)
+ ENTRY(ddi_get16)
+ ALTENTRY(ddi_getw)
ALTENTRY(ddi_mem_getw)
ALTENTRY(ddi_mem_get16)
ALTENTRY(ddi_io_getw)
@@ -594,8 +352,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
ret
4:
jmp *ACC_GETW(%rdi)
- SET_SIZE(ddi_getw)
SET_SIZE(ddi_get16)
+ SET_SIZE(ddi_getw)
SET_SIZE(ddi_mem_getw)
SET_SIZE(ddi_mem_get16)
SET_SIZE(ddi_io_getw)
@@ -603,8 +361,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#elif defined(__i386)
- ENTRY(ddi_getw)
- ALTENTRY(ddi_get16)
+ ENTRY(ddi_get16)
+ ALTENTRY(ddi_getw)
ALTENTRY(ddi_mem_getw)
ALTENTRY(ddi_mem_get16)
ALTENTRY(ddi_io_getw)
@@ -625,8 +383,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
ret
4:
jmp *ACC_GETW(%eax)
- SET_SIZE(ddi_getw)
SET_SIZE(ddi_get16)
+ SET_SIZE(ddi_getw)
SET_SIZE(ddi_mem_getw)
SET_SIZE(ddi_mem_get16)
SET_SIZE(ddi_io_getw)
@@ -636,8 +394,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_getl)
- ALTENTRY(ddi_get32)
+ ENTRY(ddi_get32)
+ ALTENTRY(ddi_getl)
ALTENTRY(ddi_mem_getl)
ALTENTRY(ddi_mem_get32)
ALTENTRY(ddi_io_getl)
@@ -655,8 +413,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
ret
6:
jmp *ACC_GETL(%rdi)
- SET_SIZE(ddi_getl)
SET_SIZE(ddi_get32)
+ SET_SIZE(ddi_getl)
SET_SIZE(ddi_mem_getl)
SET_SIZE(ddi_mem_get32)
SET_SIZE(ddi_io_getl)
@@ -664,8 +422,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#elif defined(__i386)
- ENTRY(ddi_getl)
- ALTENTRY(ddi_get32)
+ ENTRY(ddi_get32)
+ ALTENTRY(ddi_getl)
ALTENTRY(ddi_mem_getl)
ALTENTRY(ddi_mem_get32)
ALTENTRY(ddi_io_getl)
@@ -685,8 +443,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
ret
6:
jmp *ACC_GETL(%eax)
- SET_SIZE(ddi_getl)
SET_SIZE(ddi_get32)
+ SET_SIZE(ddi_getl)
SET_SIZE(ddi_mem_getl)
SET_SIZE(ddi_mem_get32)
SET_SIZE(ddi_io_getl)
@@ -696,26 +454,26 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_getll)
- ALTENTRY(ddi_get64)
+ ENTRY(ddi_get64)
+ ALTENTRY(ddi_getll)
ALTENTRY(ddi_mem_getll)
ALTENTRY(ddi_mem_get64)
jmp *ACC_GETLL(%rdi)
- SET_SIZE(ddi_getll)
SET_SIZE(ddi_get64)
+ SET_SIZE(ddi_getll)
SET_SIZE(ddi_mem_getll)
SET_SIZE(ddi_mem_get64)
#elif defined(__i386)
- ENTRY(ddi_getll)
- ALTENTRY(ddi_get64)
+ ENTRY(ddi_get64)
+ ALTENTRY(ddi_getll)
ALTENTRY(ddi_mem_getll)
ALTENTRY(ddi_mem_get64)
movl 4(%esp), %eax
jmp *ACC_GETLL(%eax)
- SET_SIZE(ddi_getll)
SET_SIZE(ddi_get64)
+ SET_SIZE(ddi_getll)
SET_SIZE(ddi_mem_getll)
SET_SIZE(ddi_mem_get64)
@@ -723,8 +481,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_putb)
- ALTENTRY(ddi_put8)
+ ENTRY(ddi_put8)
+ ALTENTRY(ddi_putb)
ALTENTRY(ddi_mem_putb)
ALTENTRY(ddi_mem_put8)
ALTENTRY(ddi_io_putb)
@@ -743,8 +501,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
ret
8:
jmp *ACC_PUTB(%rdi)
- SET_SIZE(ddi_putb)
SET_SIZE(ddi_put8)
+ SET_SIZE(ddi_putb)
SET_SIZE(ddi_mem_putb)
SET_SIZE(ddi_mem_put8)
SET_SIZE(ddi_io_putb)
@@ -752,8 +510,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#elif defined(__i386)
- ENTRY(ddi_putb)
- ALTENTRY(ddi_put8)
+ ENTRY(ddi_put8)
+ ALTENTRY(ddi_putb)
ALTENTRY(ddi_mem_putb)
ALTENTRY(ddi_mem_put8)
ALTENTRY(ddi_io_putb)
@@ -775,8 +533,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
ret
8:
jmp *ACC_PUTB(%eax)
- SET_SIZE(ddi_putb)
SET_SIZE(ddi_put8)
+ SET_SIZE(ddi_putb)
SET_SIZE(ddi_mem_putb)
SET_SIZE(ddi_mem_put8)
SET_SIZE(ddi_io_putb)
@@ -786,8 +544,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_putw)
- ALTENTRY(ddi_put16)
+ ENTRY(ddi_put16)
+ ALTENTRY(ddi_putw)
ALTENTRY(ddi_mem_putw)
ALTENTRY(ddi_mem_put16)
ALTENTRY(ddi_io_putw)
@@ -806,8 +564,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
ret
9:
jmp *ACC_PUTW(%rdi)
- SET_SIZE(ddi_putw)
SET_SIZE(ddi_put16)
+ SET_SIZE(ddi_putw)
SET_SIZE(ddi_mem_putw)
SET_SIZE(ddi_mem_put16)
SET_SIZE(ddi_io_putw)
@@ -815,8 +573,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#elif defined(__i386)
- ENTRY(ddi_putw)
- ALTENTRY(ddi_put16)
+ ENTRY(ddi_put16)
+ ALTENTRY(ddi_putw)
ALTENTRY(ddi_mem_putw)
ALTENTRY(ddi_mem_put16)
ALTENTRY(ddi_io_putw)
@@ -838,8 +596,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
ret
9:
jmp *ACC_PUTW(%eax)
- SET_SIZE(ddi_putw)
SET_SIZE(ddi_put16)
+ SET_SIZE(ddi_putw)
SET_SIZE(ddi_mem_putw)
SET_SIZE(ddi_mem_put16)
SET_SIZE(ddi_io_putw)
@@ -849,8 +607,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_putl)
- ALTENTRY(ddi_put32)
+ ENTRY(ddi_put32)
+ ALTENTRY(ddi_putl)
ALTENTRY(ddi_mem_putl)
ALTENTRY(ddi_mem_put32)
ALTENTRY(ddi_io_putl)
@@ -869,8 +627,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
ret
9:
jmp *ACC_PUTL(%rdi)
- SET_SIZE(ddi_putl)
SET_SIZE(ddi_put32)
+ SET_SIZE(ddi_putl)
SET_SIZE(ddi_mem_putl)
SET_SIZE(ddi_mem_put32)
SET_SIZE(ddi_io_putl)
@@ -878,8 +636,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#elif defined(__i386)
- ENTRY(ddi_putl)
- ALTENTRY(ddi_put32)
+ ENTRY(ddi_put32)
+ ALTENTRY(ddi_putl)
ALTENTRY(ddi_mem_putl)
ALTENTRY(ddi_mem_put32)
ALTENTRY(ddi_io_putl)
@@ -901,8 +659,8 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
ret
9:
jmp *ACC_PUTL(%eax)
- SET_SIZE(ddi_putl)
SET_SIZE(ddi_put32)
+ SET_SIZE(ddi_putl)
SET_SIZE(ddi_mem_putl)
SET_SIZE(ddi_mem_put32)
SET_SIZE(ddi_io_putl)
@@ -912,26 +670,26 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_putll)
- ALTENTRY(ddi_put64)
+ ENTRY(ddi_put64)
+ ALTENTRY(ddi_putll)
ALTENTRY(ddi_mem_putll)
ALTENTRY(ddi_mem_put64)
jmp *ACC_PUTLL(%rdi)
- SET_SIZE(ddi_putll)
SET_SIZE(ddi_put64)
+ SET_SIZE(ddi_putll)
SET_SIZE(ddi_mem_putll)
SET_SIZE(ddi_mem_put64)
#elif defined(__i386)
- ENTRY(ddi_putll)
- ALTENTRY(ddi_put64)
+ ENTRY(ddi_put64)
+ ALTENTRY(ddi_putll)
ALTENTRY(ddi_mem_putll)
ALTENTRY(ddi_mem_put64)
movl 4(%esp), %eax
jmp *ACC_PUTLL(%eax)
- SET_SIZE(ddi_putll)
SET_SIZE(ddi_put64)
+ SET_SIZE(ddi_putll)
SET_SIZE(ddi_mem_putll)
SET_SIZE(ddi_mem_put64)
@@ -939,26 +697,26 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_rep_getb)
- ALTENTRY(ddi_rep_get8)
+ ENTRY(ddi_rep_get8)
+ ALTENTRY(ddi_rep_getb)
ALTENTRY(ddi_mem_rep_getb)
ALTENTRY(ddi_mem_rep_get8)
jmp *ACC_REP_GETB(%rdi)
- SET_SIZE(ddi_rep_getb)
SET_SIZE(ddi_rep_get8)
+ SET_SIZE(ddi_rep_getb)
SET_SIZE(ddi_mem_rep_getb)
SET_SIZE(ddi_mem_rep_get8)
#elif defined(__i386)
- ENTRY(ddi_rep_getb)
- ALTENTRY(ddi_rep_get8)
+ ENTRY(ddi_rep_get8)
+ ALTENTRY(ddi_rep_getb)
ALTENTRY(ddi_mem_rep_getb)
ALTENTRY(ddi_mem_rep_get8)
movl 4(%esp), %eax
jmp *ACC_REP_GETB(%eax)
- SET_SIZE(ddi_rep_getb)
SET_SIZE(ddi_rep_get8)
+ SET_SIZE(ddi_rep_getb)
SET_SIZE(ddi_mem_rep_getb)
SET_SIZE(ddi_mem_rep_get8)
@@ -966,26 +724,26 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_rep_getw)
- ALTENTRY(ddi_rep_get16)
+ ENTRY(ddi_rep_get16)
+ ALTENTRY(ddi_rep_getw)
ALTENTRY(ddi_mem_rep_getw)
ALTENTRY(ddi_mem_rep_get16)
jmp *ACC_REP_GETW(%rdi)
- SET_SIZE(ddi_rep_getw)
SET_SIZE(ddi_rep_get16)
+ SET_SIZE(ddi_rep_getw)
SET_SIZE(ddi_mem_rep_getw)
SET_SIZE(ddi_mem_rep_get16)
#elif defined(__i386)
- ENTRY(ddi_rep_getw)
- ALTENTRY(ddi_rep_get16)
+ ENTRY(ddi_rep_get16)
+ ALTENTRY(ddi_rep_getw)
ALTENTRY(ddi_mem_rep_getw)
ALTENTRY(ddi_mem_rep_get16)
movl 4(%esp), %eax
jmp *ACC_REP_GETW(%eax)
- SET_SIZE(ddi_rep_getw)
SET_SIZE(ddi_rep_get16)
+ SET_SIZE(ddi_rep_getw)
SET_SIZE(ddi_mem_rep_getw)
SET_SIZE(ddi_mem_rep_get16)
@@ -993,26 +751,26 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_rep_getl)
- ALTENTRY(ddi_rep_get32)
+ ENTRY(ddi_rep_get32)
+ ALTENTRY(ddi_rep_getl)
ALTENTRY(ddi_mem_rep_getl)
ALTENTRY(ddi_mem_rep_get32)
jmp *ACC_REP_GETL(%rdi)
- SET_SIZE(ddi_rep_getl)
SET_SIZE(ddi_rep_get32)
+ SET_SIZE(ddi_rep_getl)
SET_SIZE(ddi_mem_rep_getl)
SET_SIZE(ddi_mem_rep_get32)
#elif defined(__i386)
- ENTRY(ddi_rep_getl)
- ALTENTRY(ddi_rep_get32)
+ ENTRY(ddi_rep_get32)
+ ALTENTRY(ddi_rep_getl)
ALTENTRY(ddi_mem_rep_getl)
ALTENTRY(ddi_mem_rep_get32)
movl 4(%esp), %eax
jmp *ACC_REP_GETL(%eax)
- SET_SIZE(ddi_rep_getl)
SET_SIZE(ddi_rep_get32)
+ SET_SIZE(ddi_rep_getl)
SET_SIZE(ddi_mem_rep_getl)
SET_SIZE(ddi_mem_rep_get32)
@@ -1020,26 +778,26 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_rep_getll)
- ALTENTRY(ddi_rep_get64)
+ ENTRY(ddi_rep_get64)
+ ALTENTRY(ddi_rep_getll)
ALTENTRY(ddi_mem_rep_getll)
ALTENTRY(ddi_mem_rep_get64)
jmp *ACC_REP_GETLL(%rdi)
- SET_SIZE(ddi_rep_getll)
SET_SIZE(ddi_rep_get64)
+ SET_SIZE(ddi_rep_getll)
SET_SIZE(ddi_mem_rep_getll)
SET_SIZE(ddi_mem_rep_get64)
#elif defined(__i386)
- ENTRY(ddi_rep_getll)
- ALTENTRY(ddi_rep_get64)
+ ENTRY(ddi_rep_get64)
+ ALTENTRY(ddi_rep_getll)
ALTENTRY(ddi_mem_rep_getll)
ALTENTRY(ddi_mem_rep_get64)
movl 4(%esp), %eax
jmp *ACC_REP_GETLL(%eax)
- SET_SIZE(ddi_rep_getll)
SET_SIZE(ddi_rep_get64)
+ SET_SIZE(ddi_rep_getll)
SET_SIZE(ddi_mem_rep_getll)
SET_SIZE(ddi_mem_rep_get64)
@@ -1047,26 +805,26 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_rep_putb)
- ALTENTRY(ddi_rep_put8)
+ ENTRY(ddi_rep_put8)
+ ALTENTRY(ddi_rep_putb)
ALTENTRY(ddi_mem_rep_putb)
ALTENTRY(ddi_mem_rep_put8)
jmp *ACC_REP_PUTB(%rdi)
- SET_SIZE(ddi_rep_putb)
SET_SIZE(ddi_rep_put8)
+ SET_SIZE(ddi_rep_putb)
SET_SIZE(ddi_mem_rep_putb)
SET_SIZE(ddi_mem_rep_put8)
#elif defined(__i386)
- ENTRY(ddi_rep_putb)
- ALTENTRY(ddi_rep_put8)
+ ENTRY(ddi_rep_put8)
+ ALTENTRY(ddi_rep_putb)
ALTENTRY(ddi_mem_rep_putb)
ALTENTRY(ddi_mem_rep_put8)
movl 4(%esp), %eax
jmp *ACC_REP_PUTB(%eax)
- SET_SIZE(ddi_rep_putb)
SET_SIZE(ddi_rep_put8)
+ SET_SIZE(ddi_rep_putb)
SET_SIZE(ddi_mem_rep_putb)
SET_SIZE(ddi_mem_rep_put8)
@@ -1074,26 +832,26 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_rep_putw)
- ALTENTRY(ddi_rep_put16)
+ ENTRY(ddi_rep_put16)
+ ALTENTRY(ddi_rep_putw)
ALTENTRY(ddi_mem_rep_putw)
ALTENTRY(ddi_mem_rep_put16)
jmp *ACC_REP_PUTW(%rdi)
- SET_SIZE(ddi_rep_putw)
SET_SIZE(ddi_rep_put16)
+ SET_SIZE(ddi_rep_putw)
SET_SIZE(ddi_mem_rep_putw)
SET_SIZE(ddi_mem_rep_put16)
#elif defined(__i386)
- ENTRY(ddi_rep_putw)
- ALTENTRY(ddi_rep_put16)
+ ENTRY(ddi_rep_put16)
+ ALTENTRY(ddi_rep_putw)
ALTENTRY(ddi_mem_rep_putw)
ALTENTRY(ddi_mem_rep_put16)
movl 4(%esp), %eax
jmp *ACC_REP_PUTW(%eax)
- SET_SIZE(ddi_rep_putw)
SET_SIZE(ddi_rep_put16)
+ SET_SIZE(ddi_rep_putw)
SET_SIZE(ddi_mem_rep_putw)
SET_SIZE(ddi_mem_rep_put16)
@@ -1101,26 +859,26 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_rep_putl)
- ALTENTRY(ddi_rep_put32)
+ ENTRY(ddi_rep_put32)
+ ALTENTRY(ddi_rep_putl)
ALTENTRY(ddi_mem_rep_putl)
ALTENTRY(ddi_mem_rep_put32)
jmp *ACC_REP_PUTL(%rdi)
- SET_SIZE(ddi_rep_putl)
SET_SIZE(ddi_rep_put32)
+ SET_SIZE(ddi_rep_putl)
SET_SIZE(ddi_mem_rep_putl)
SET_SIZE(ddi_mem_rep_put32)
#elif defined(__i386)
- ENTRY(ddi_rep_putl)
- ALTENTRY(ddi_rep_put32)
+ ENTRY(ddi_rep_put32)
+ ALTENTRY(ddi_rep_putl)
ALTENTRY(ddi_mem_rep_putl)
ALTENTRY(ddi_mem_rep_put32)
movl 4(%esp), %eax
jmp *ACC_REP_PUTL(%eax)
- SET_SIZE(ddi_rep_putl)
SET_SIZE(ddi_rep_put32)
+ SET_SIZE(ddi_rep_putl)
SET_SIZE(ddi_mem_rep_putl)
SET_SIZE(ddi_mem_rep_put32)
@@ -1128,26 +886,26 @@ ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
#if defined(__amd64)
- ENTRY(ddi_rep_putll)
- ALTENTRY(ddi_rep_put64)
+ ENTRY(ddi_rep_put64)
+ ALTENTRY(ddi_rep_putll)
ALTENTRY(ddi_mem_rep_putll)
ALTENTRY(ddi_mem_rep_put64)
jmp *ACC_REP_PUTLL(%rdi)
- SET_SIZE(ddi_rep_putll)
SET_SIZE(ddi_rep_put64)
+ SET_SIZE(ddi_rep_putll)
SET_SIZE(ddi_mem_rep_putll)
SET_SIZE(ddi_mem_rep_put64)
#elif defined(__i386)
- ENTRY(ddi_rep_putll)
- ALTENTRY(ddi_rep_put64)
+ ENTRY(ddi_rep_put64)
+ ALTENTRY(ddi_rep_putll)
ALTENTRY(ddi_mem_rep_putll)
ALTENTRY(ddi_mem_rep_put64)
movl 4(%esp), %eax
jmp *ACC_REP_PUTLL(%eax)
- SET_SIZE(ddi_rep_putll)
SET_SIZE(ddi_rep_put64)
+ SET_SIZE(ddi_rep_putll)
SET_SIZE(ddi_mem_rep_putll)
SET_SIZE(ddi_mem_rep_put64)
diff --git a/usr/src/uts/intel/ia32/os/ddi_i86.c b/usr/src/uts/intel/ia32/os/ddi_i86.c
index e34f11e4e5..a65a6567c6 100644
--- a/usr/src/uts/intel/ia32/os/ddi_i86.c
+++ b/usr/src/uts/intel/ia32/os/ddi_i86.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -704,45 +704,27 @@ i_ddi_io_put64(ddi_acc_impl_t *hdlp, uint64_t *host_addr, uint64_t value)
/*NOTREACHED*/
}
-#ifdef _LP64
void
ddi_io_rep_get8(ddi_acc_handle_t handle,
uint8_t *host_addr, uint8_t *dev_addr, size_t repcount)
-#else /* _ILP32 */
-void
-ddi_io_rep_getb(ddi_acc_handle_t handle,
- uint8_t *host_addr, uint8_t *dev_addr, size_t repcount)
-#endif
{
(((ddi_acc_impl_t *)handle)->ahi_rep_get8)
((ddi_acc_impl_t *)handle, host_addr, dev_addr,
repcount, DDI_DEV_NO_AUTOINCR);
}
-#ifdef _LP64
void
ddi_io_rep_get16(ddi_acc_handle_t handle,
uint16_t *host_addr, uint16_t *dev_addr, size_t repcount)
-#else /* _ILP32 */
-void
-ddi_io_rep_getw(ddi_acc_handle_t handle,
- uint16_t *host_addr, uint16_t *dev_addr, size_t repcount)
-#endif
{
(((ddi_acc_impl_t *)handle)->ahi_rep_get16)
((ddi_acc_impl_t *)handle, host_addr, dev_addr,
repcount, DDI_DEV_NO_AUTOINCR);
}
-#ifdef _LP64
void
ddi_io_rep_get32(ddi_acc_handle_t handle,
uint32_t *host_addr, uint32_t *dev_addr, size_t repcount)
-#else /* _ILP32 */
-void
-ddi_io_rep_getl(ddi_acc_handle_t handle,
- uint32_t *host_addr, uint32_t *dev_addr, size_t repcount)
-#endif
{
(((ddi_acc_impl_t *)handle)->ahi_rep_get32)
((ddi_acc_impl_t *)handle, host_addr, dev_addr,
@@ -757,45 +739,27 @@ i_ddi_io_rep_get64(ddi_acc_impl_t *hdlp, uint64_t *host_addr,
cmn_err(CE_PANIC, "ddi_rep_get64 from i/o space");
}
-#ifdef _LP64
void
ddi_io_rep_put8(ddi_acc_handle_t handle,
uint8_t *host_addr, uint8_t *dev_addr, size_t repcount)
-#else /* _ILP32 */
-void
-ddi_io_rep_putb(ddi_acc_handle_t handle,
- uint8_t *host_addr, uint8_t *dev_addr, size_t repcount)
-#endif
{
(((ddi_acc_impl_t *)handle)->ahi_rep_put8)
((ddi_acc_impl_t *)handle, host_addr, dev_addr,
repcount, DDI_DEV_NO_AUTOINCR);
}
-#ifdef _LP64
void
ddi_io_rep_put16(ddi_acc_handle_t handle,
uint16_t *host_addr, uint16_t *dev_addr, size_t repcount)
-#else /* _ILP32 */
-void
-ddi_io_rep_putw(ddi_acc_handle_t handle,
- uint16_t *host_addr, uint16_t *dev_addr, size_t repcount)
-#endif
{
(((ddi_acc_impl_t *)handle)->ahi_rep_put16)
((ddi_acc_impl_t *)handle, host_addr, dev_addr,
repcount, DDI_DEV_NO_AUTOINCR);
}
-#ifdef _LP64
void
ddi_io_rep_put32(ddi_acc_handle_t handle,
uint32_t *host_addr, uint32_t *dev_addr, size_t repcount)
-#else /* _ILP32 */
-void
-ddi_io_rep_putl(ddi_acc_handle_t handle,
- uint32_t *host_addr, uint32_t *dev_addr, size_t repcount)
-#endif
{
(((ddi_acc_impl_t *)handle)->ahi_rep_put32)
((ddi_acc_impl_t *)handle, host_addr, dev_addr,
@@ -811,6 +775,70 @@ i_ddi_io_rep_put64(ddi_acc_impl_t *hdlp, uint64_t *host_addr,
}
/*
+ * We need to separate the old interfaces from the new ones and leave them
+ * in here for a while. Previous versions of the OS defined the new interfaces
+ * to the old interfaces. This way we can fix things up so that we can
+ * eventually remove these interfaces.
+ * e.g. A 3rd party module/driver using ddi_io_rep_get8 and built against S10
+ * or earlier will actually have a reference to ddi_io_rep_getb in the binary.
+ */
+#ifdef _ILP32
+void
+ddi_io_rep_getb(ddi_acc_handle_t handle,
+ uint8_t *host_addr, uint8_t *dev_addr, size_t repcount)
+{
+ (((ddi_acc_impl_t *)handle)->ahi_rep_get8)
+ ((ddi_acc_impl_t *)handle, host_addr, dev_addr,
+ repcount, DDI_DEV_NO_AUTOINCR);
+}
+
+void
+ddi_io_rep_getw(ddi_acc_handle_t handle,
+ uint16_t *host_addr, uint16_t *dev_addr, size_t repcount)
+{
+ (((ddi_acc_impl_t *)handle)->ahi_rep_get16)
+ ((ddi_acc_impl_t *)handle, host_addr, dev_addr,
+ repcount, DDI_DEV_NO_AUTOINCR);
+}
+
+void
+ddi_io_rep_getl(ddi_acc_handle_t handle,
+ uint32_t *host_addr, uint32_t *dev_addr, size_t repcount)
+{
+ (((ddi_acc_impl_t *)handle)->ahi_rep_get32)
+ ((ddi_acc_impl_t *)handle, host_addr, dev_addr,
+ repcount, DDI_DEV_NO_AUTOINCR);
+}
+
+void
+ddi_io_rep_putb(ddi_acc_handle_t handle,
+ uint8_t *host_addr, uint8_t *dev_addr, size_t repcount)
+{
+ (((ddi_acc_impl_t *)handle)->ahi_rep_put8)
+ ((ddi_acc_impl_t *)handle, host_addr, dev_addr,
+ repcount, DDI_DEV_NO_AUTOINCR);
+}
+
+void
+ddi_io_rep_putw(ddi_acc_handle_t handle,
+ uint16_t *host_addr, uint16_t *dev_addr, size_t repcount)
+{
+ (((ddi_acc_impl_t *)handle)->ahi_rep_put16)
+ ((ddi_acc_impl_t *)handle, host_addr, dev_addr,
+ repcount, DDI_DEV_NO_AUTOINCR);
+}
+
+void
+ddi_io_rep_putl(ddi_acc_handle_t handle,
+ uint32_t *host_addr, uint32_t *dev_addr, size_t repcount)
+{
+ (((ddi_acc_impl_t *)handle)->ahi_rep_put32)
+ ((ddi_acc_impl_t *)handle, host_addr, dev_addr,
+ repcount, DDI_DEV_NO_AUTOINCR);
+}
+#endif /* _ILP32 */
+
+/*
* These next two functions could be translated into assembler someday
*/
int
diff --git a/usr/src/uts/intel/io/vgatext/vgatext.c b/usr/src/uts/intel/io/vgatext/vgatext.c
index 0edff05b41..f5dd099a52 100644
--- a/usr/src/uts/intel/io/vgatext/vgatext.c
+++ b/usr/src/uts/intel/io/vgatext/vgatext.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
@@ -451,7 +451,7 @@ vgatext_attach(dev_info_t *devi, ddi_attach_cmd_t cmd)
goto fail;
softc->fb.mapped = B_TRUE;
- if (ddi_io_get8(softc->regs.handle,
+ if (ddi_get8(softc->regs.handle,
softc->regs.addr + VGA_MISC_R) & VGA_MISC_IOA_SEL)
softc->text_base = (caddr_t)softc->fb.addr + VGA_COLOR_BASE;
else
diff --git a/usr/src/uts/intel/os/master b/usr/src/uts/intel/os/master
index a9cf6e1ba4..b0f5001f76 100644
--- a/usr/src/uts/intel/os/master
+++ b/usr/src/uts/intel/os/master
@@ -1,14 +1,10 @@
version 1.0
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -23,6 +19,9 @@ version 1.0
#
# CDDL HEADER END
#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
#ident "%Z%%M% %I% %E% SMI"
#
# Device tree database
@@ -244,7 +243,6 @@ pci1011,2 pci1011,2 net pci dnet.bef "DEC 21040 Ethernet"
pci1011,9 pci1011,9 net pci dnet.bef "DEC 21140 Fast Ethernet"
pci1011,14 pci1011,14 net pci dnet.bef "DEC 21041 Ethernet"
pci1011,19 pci1011,19 net pci dnet.bef "DEC 21142/21143 Fast Ethernet"
-pci1014,2e pci1014,2e msd pci chs.bef "IBM PC ServeRaid"
pci1022,2000 pci1022,2000 net pci pcn.bef "AMD 79C970 PCnet Ethernet"
pci103c,104c pci103c,104c net pci pcn.bef "HP 'Tweety' PCnet Fast Ethernet"
pci10b7,9000 pci10b7,9000 net pci elxl.bef "3Com 3C900-TPO Etherlink XL"
diff --git a/usr/src/uts/intel/sys/archsystm.h b/usr/src/uts/intel/sys/archsystm.h
index 99a8d89cc5..76c33e8c05 100644
--- a/usr/src/uts/intel/sys/archsystm.h
+++ b/usr/src/uts/intel/sys/archsystm.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -81,15 +80,9 @@ extern void bind_hwcap(void);
extern uint8_t inb(int port);
extern uint16_t inw(int port);
extern uint32_t inl(int port);
-extern void repinsb(int port, uint8_t *addr, int count);
-extern void repinsw(int port, uint16_t *addr, int count);
-extern void repinsd(int port, uint32_t *addr, int count);
extern void outb(int port, uint8_t value);
extern void outw(int port, uint16_t value);
extern void outl(int port, uint32_t value);
-extern void repoutsb(int port, uint8_t *addr, int count);
-extern void repoutsw(int port, uint16_t *addr, int count);
-extern void repoutsd(int port, uint32_t *addr, int count);
extern void pc_reset(void) __NORETURN;
extern void reset(void) __NORETURN;
diff --git a/usr/src/uts/intel/sys/ddi_isa.h b/usr/src/uts/intel/sys/ddi_isa.h
index 67b4b23dcc..9ba67cf553 100644
--- a/usr/src/uts/intel/sys/ddi_isa.h
+++ b/usr/src/uts/intel/sys/ddi_isa.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,6 +31,9 @@
#include <sys/isa_defs.h>
#include <sys/dditypes.h>
#include <sys/ndifm.h>
+#ifdef _KERNEL
+#include <sys/ddi_obsolete.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -54,236 +56,6 @@ extern "C" {
#ifdef __STDC__
-#ifdef _LP64
-
-uint8_t
-ddi_mem_get8(ddi_acc_handle_t handle, uint8_t *host_addr);
-
-uint16_t
-ddi_mem_get16(ddi_acc_handle_t handle, uint16_t *host_addr);
-
-uint32_t
-ddi_mem_get32(ddi_acc_handle_t handle, uint32_t *host_addr);
-
-uint64_t
-ddi_mem_get64(ddi_acc_handle_t handle, uint64_t *host_addr);
-
-void
-ddi_mem_rep_get8(ddi_acc_handle_t handle, uint8_t *host_addr,
- uint8_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_rep_get16(ddi_acc_handle_t handle, uint16_t *host_addr,
- uint16_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_rep_get32(ddi_acc_handle_t handle, uint32_t *host_addr,
- uint32_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_rep_get64(ddi_acc_handle_t handle, uint64_t *host_addr,
- uint64_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_put8(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value);
-
-void
-ddi_mem_put16(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value);
-
-void
-ddi_mem_put32(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value);
-
-void
-ddi_mem_put64(ddi_acc_handle_t handle, uint64_t *dev_addr, uint64_t value);
-
-void
-ddi_mem_rep_put8(ddi_acc_handle_t handle, uint8_t *host_addr,
- uint8_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_rep_put16(ddi_acc_handle_t handle, uint16_t *host_addr,
- uint16_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_rep_put32(ddi_acc_handle_t handle, uint32_t *host_addr,
- uint32_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_rep_put64(ddi_acc_handle_t handle, uint64_t *host_addr,
- uint64_t *dev_addr, size_t repcount, uint_t flags);
-
-uint8_t
-ddi_io_get8(ddi_acc_handle_t handle, uint8_t *dev_addr);
-
-uint16_t
-ddi_io_get16(ddi_acc_handle_t handle, uint16_t *dev_addr);
-
-uint32_t
-ddi_io_get32(ddi_acc_handle_t handle, uint32_t *dev_addr);
-
-void
-ddi_io_rep_get8(ddi_acc_handle_t handle,
- uint8_t *host_addr, uint8_t *dev_addr, size_t repcount);
-
-void
-ddi_io_rep_get16(ddi_acc_handle_t handle,
- uint16_t *host_addr, uint16_t *dev_addr, size_t repcount);
-
-void
-ddi_io_rep_get32(ddi_acc_handle_t handle,
- uint32_t *host_addr, uint32_t *dev_addr, size_t repcount);
-
-void
-ddi_io_put8(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value);
-
-void
-ddi_io_put16(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value);
-
-void
-ddi_io_put32(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value);
-
-void
-ddi_io_rep_put8(ddi_acc_handle_t handle,
- uint8_t *host_addr, uint8_t *dev_addr, size_t repcount);
-
-void
-ddi_io_rep_put16(ddi_acc_handle_t handle,
- uint16_t *host_addr, uint16_t *dev_addr, size_t repcount);
-
-void
-ddi_io_rep_put32(ddi_acc_handle_t handle,
- uint32_t *host_addr, uint32_t *dev_addr, size_t repcount);
-
-#else /* _ILP32 */
-
-uint8_t
-ddi_mem_getb(ddi_acc_handle_t handle, uint8_t *host_addr);
-#define ddi_mem_get8 ddi_mem_getb
-
-uint16_t
-ddi_mem_getw(ddi_acc_handle_t handle, uint16_t *host_addr);
-#define ddi_mem_get16 ddi_mem_getw
-
-uint32_t
-ddi_mem_getl(ddi_acc_handle_t handle, uint32_t *host_addr);
-#define ddi_mem_get32 ddi_mem_getl
-
-uint64_t
-ddi_mem_getll(ddi_acc_handle_t handle, uint64_t *host_addr);
-#define ddi_mem_get64 ddi_mem_getll
-
-void
-ddi_mem_rep_getb(ddi_acc_handle_t handle, uint8_t *host_addr,
- uint8_t *dev_addr, size_t repcount, uint_t flags);
-#define ddi_mem_rep_get8 ddi_mem_rep_getb
-
-void
-ddi_mem_rep_getw(ddi_acc_handle_t handle, uint16_t *host_addr,
- uint16_t *dev_addr, size_t repcount, uint_t flags);
-#define ddi_mem_rep_get16 ddi_mem_rep_getw
-
-void
-ddi_mem_rep_getl(ddi_acc_handle_t handle, uint32_t *host_addr,
- uint32_t *dev_addr, size_t repcount, uint_t flags);
-#define ddi_mem_rep_get32 ddi_mem_rep_getl
-
-void
-ddi_mem_rep_getll(ddi_acc_handle_t handle, uint64_t *host_addr,
- uint64_t *dev_addr, size_t repcount, uint_t flags);
-#define ddi_mem_rep_get64 ddi_mem_rep_getll
-
-void
-ddi_mem_putb(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value);
-#define ddi_mem_put8 ddi_mem_putb
-
-void
-ddi_mem_putw(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value);
-#define ddi_mem_put16 ddi_mem_putw
-
-void
-ddi_mem_putl(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value);
-#define ddi_mem_put32 ddi_mem_putl
-
-void
-ddi_mem_putll(ddi_acc_handle_t handle, uint64_t *dev_addr, uint64_t value);
-#define ddi_mem_put64 ddi_mem_putll
-
-void
-ddi_mem_rep_putb(ddi_acc_handle_t handle, uint8_t *host_addr,
- uint8_t *dev_addr, size_t repcount, uint_t flags);
-#define ddi_mem_rep_put8 ddi_mem_rep_putb
-
-void
-ddi_mem_rep_putw(ddi_acc_handle_t handle, uint16_t *host_addr,
- uint16_t *dev_addr, size_t repcount, uint_t flags);
-#define ddi_mem_rep_put16 ddi_mem_rep_putw
-
-void
-ddi_mem_rep_putl(ddi_acc_handle_t handle, uint32_t *host_addr,
- uint32_t *dev_addr, size_t repcount, uint_t flags);
-#define ddi_mem_rep_put32 ddi_mem_rep_putl
-
-void
-ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
- uint64_t *dev_addr, size_t repcount, uint_t flags);
-#define ddi_mem_rep_put64 ddi_mem_rep_putll
-
-uint8_t
-ddi_io_getb(ddi_acc_handle_t handle, uint8_t *dev_addr);
-#define ddi_io_get8 ddi_io_getb
-
-uint16_t
-ddi_io_getw(ddi_acc_handle_t handle, uint16_t *dev_addr);
-#define ddi_io_get16 ddi_io_getw
-
-uint32_t
-ddi_io_getl(ddi_acc_handle_t handle, uint32_t *dev_addr);
-#define ddi_io_get32 ddi_io_getl
-
-void
-ddi_io_rep_getb(ddi_acc_handle_t handle,
- uint8_t *host_addr, uint8_t *dev_addr, size_t repcount);
-#define ddi_io_rep_get8 ddi_io_rep_getb
-
-void
-ddi_io_rep_getw(ddi_acc_handle_t handle,
- uint16_t *host_addr, uint16_t *dev_addr, size_t repcount);
-#define ddi_io_rep_get16 ddi_io_rep_getw
-
-void
-ddi_io_rep_getl(ddi_acc_handle_t handle,
- uint32_t *host_addr, uint32_t *dev_addr, size_t repcount);
-#define ddi_io_rep_get32 ddi_io_rep_getl
-
-void
-ddi_io_putb(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value);
-#define ddi_io_put8 ddi_io_putb
-
-void
-ddi_io_putw(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value);
-#define ddi_io_put16 ddi_io_putw
-
-void
-ddi_io_putl(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value);
-#define ddi_io_put32 ddi_io_putl
-
-void
-ddi_io_rep_putb(ddi_acc_handle_t handle,
- uint8_t *host_addr, uint8_t *dev_addr, size_t repcount);
-#define ddi_io_rep_put8 ddi_io_rep_putb
-
-void
-ddi_io_rep_putw(ddi_acc_handle_t handle,
- uint16_t *host_addr, uint16_t *dev_addr, size_t repcount);
-#define ddi_io_rep_put16 ddi_io_rep_putw
-
-void
-ddi_io_rep_putl(ddi_acc_handle_t handle,
- uint32_t *host_addr, uint32_t *dev_addr, size_t repcount);
-#define ddi_io_rep_put32 ddi_io_rep_putl
-
-#endif /* _LP64 */
-
/*
* ahi_acc_attr flags
*/
@@ -479,9 +251,6 @@ i_ddi_io_swap_get16(ddi_acc_impl_t *hdlp, uint16_t *addr);
uint32_t
i_ddi_io_swap_get32(ddi_acc_impl_t *hdlp, uint32_t *addr);
-uint64_t
-i_ddi_io_swap_get64(ddi_acc_impl_t *hdlp, uint64_t *addr);
-
/*
* Output functions to IO space
*/
@@ -503,9 +272,6 @@ i_ddi_io_swap_put16(ddi_acc_impl_t *hdlp, uint16_t *addr, uint16_t value);
void
i_ddi_io_swap_put32(ddi_acc_impl_t *hdlp, uint32_t *addr, uint32_t value);
-void
-i_ddi_io_swap_put64(ddi_acc_impl_t *hdlp, uint64_t *addr, uint64_t value);
-
/*
* Repeated input functions for IO space
*/
@@ -526,10 +292,6 @@ i_ddi_io_rep_get64(ddi_acc_impl_t *hdlp, uint64_t *host_addr,
uint64_t *dev_addr, size_t repcount, uint_t flags);
void
-i_ddi_io_swap_rep_get8(ddi_acc_impl_t *hdlp, uint8_t *host_addr,
- uint8_t *dev_addr, size_t repcount, uint_t flags);
-
-void
i_ddi_io_swap_rep_get16(ddi_acc_impl_t *hdlp, uint16_t *host_addr,
uint16_t *dev_addr, size_t repcount, uint_t flags);
@@ -537,10 +299,6 @@ void
i_ddi_io_swap_rep_get32(ddi_acc_impl_t *hdlp, uint32_t *host_addr,
uint32_t *dev_addr, size_t repcount, uint_t flags);
-void
-i_ddi_io_swap_rep_get64(ddi_acc_impl_t *hdlp, uint64_t *host_addr,
- uint64_t *dev_addr, size_t repcount, uint_t flags);
-
/*
* Repeated output functions for IO space
*/
@@ -567,44 +325,6 @@ void
i_ddi_io_swap_rep_put32(ddi_acc_impl_t *hdl, uint32_t *host_addr,
uint32_t *dev_addr, size_t repcount, uint_t flags);
-void
-i_ddi_io_swap_rep_put64(ddi_acc_impl_t *hdl, uint64_t *host_addr,
- uint64_t *dev_addr, size_t repcount, uint_t flags);
-
-int
-i_ddi_vaddr_get(ddi_acc_impl_t *hdlp, caddr_t host_addr,
- caddr_t dev_addr, size_t wordsz, size_t count, ulong_t dev_addrtype);
-
-int
-i_ddi_vaddr_put(ddi_acc_impl_t *hdlp, caddr_t host_addr,
- caddr_t dev_addr, size_t wordsz, size_t count, ulong_t dev_addrtype);
-
-int
-i_ddi_io_get(ddi_acc_impl_t *hdlp, caddr_t host_addr,
- caddr_t dev_addr, size_t wordsz, size_t count, ulong_t dev_addrtype);
-
-int
-i_ddi_io_put(ddi_acc_impl_t *hdlp, caddr_t host_addr,
- caddr_t dev_addr, size_t wordsz, size_t count, ulong_t dev_addrtype);
-
-uchar_t
-i_pci_getb(int b, int d, int f, int r);
-
-ushort_t
-i_pci_getw(int b, int d, int f, int r);
-
-ulong_t
-i_pci_getl(int b, int d, int f, int r);
-
-void
-i_pci_putb(int b, int d, int f, int r, uchar_t v);
-
-void
-i_pci_putw(int b, int d, int f, int r, ushort_t v);
-
-void
-i_pci_putl(int b, int d, int f, int r, ulong_t v);
-
/*
* Default fault-checking and notification functions
*/
diff --git a/usr/src/uts/sparc/Makefile.sparc b/usr/src/uts/sparc/Makefile.sparc
index 414ccc2c4c..31449ed768 100644
--- a/usr/src/uts/sparc/Makefile.sparc
+++ b/usr/src/uts/sparc/Makefile.sparc
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -242,7 +242,7 @@ DRV_KMODS += rge
#
# Machine Specific Driver Modules (/kernel/drv):
#
-DRV_KMODS += audio1575 audiovia823x audio810 audiocs audioens audiots dbri
+DRV_KMODS += audio1575 audiovia823x audio810 audiocs audioens audiots
DRV_KMODS += bge bpp eri esp fas hme
DRV_KMODS += openeepr options sd ses sgen st
DRV_KMODS += ssd socal
diff --git a/usr/src/uts/sparc/dbri/Makefile b/usr/src/uts/sparc/dbri/Makefile
deleted file mode 100644
index 9cf84c3d77..0000000000
--- a/usr/src/uts/sparc/dbri/Makefile
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-# uts/sparc/dbri/Makefile
-#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# This makefile drives the production of the sparc "dbri" driver module.
-#
-# sparc architecture dependent
-#
-
-#
-# Path to the base of the uts directory tree (usually /usr/src/uts).
-#
-UTSBASE = ../..
-
-#
-# Define the module and object file sets.
-#
-MODULE = dbri
-OBJECTS = $(DBRI_OBJS:%=$(OBJS_DIR)/%)
-LINTS = $(DBRI_OBJS:%.o=$(LINTS_DIR)/%.ln)
-ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
-
-#
-# Include common rules.
-#
-include $(UTSBASE)/sparc/Makefile.sparc
-
-#
-# Define targets
-#
-ALL_TARGET = $(BINARY)
-LINT_TARGET = $(MODULE).lint
-INSTALL_TARGET = $(BINARY) $(ROOTMODULE)
-
-#
-# lint pass one enforcement
-#
-CFLAGS += $(CCVERBOSE)
-
-#
-# Depends on misc/diaudio
-#
-LDFLAGS += -dy -Nmisc/diaudio
-
-#
-# Default build targets.
-#
-.KEEP_STATE:
-
-def: $(DEF_DEPS)
-
-all: $(ALL_DEPS)
-
-clean: $(CLEAN_DEPS)
-
-clobber: $(CLOBBER_DEPS)
-
-lint: $(LINT_DEPS)
-
-modlintlib: $(MODLINTLIB_DEPS)
-
-clean.lint: $(CLEAN_LINT_DEPS)
-
-install: $(INSTALL_DEPS)
-
-#
-# Include common targets.
-#
-include $(UTSBASE)/sparc/Makefile.targ
diff --git a/usr/src/uts/sparc/os/minor_perm b/usr/src/uts/sparc/os/minor_perm
index a60739e783..5be676b37d 100644
--- a/usr/src/uts/sparc/os/minor_perm
+++ b/usr/src/uts/sparc/os/minor_perm
@@ -78,26 +78,6 @@ su:[a-z] 0666 root sys
su:[a-z],cu 0600 uucp uucp
su:ssp 0600 root sys
su:sspctl 0600 root sys
-dbri:* 0600 root sys
-SUNW,DBRId:* 0600 root sys
-SUNW,DBRIe:* 0600 root sys
-SUNW,DBRIf:* 0600 root sys
-dbri:sound,audio 0600 root sys
-SUNW,DBRId:sound,audio 0600 root sys
-SUNW,DBRIe:sound,audio 0600 root sys
-SUNW,DBRIf:sound,audio 0600 root sys
-dbri:sound,audioctl 0600 root sys
-SUNW,DBRId:sound,audioctl 0600 root sys
-SUNW,DBRIe:sound,audioctl 0600 root sys
-SUNW,DBRIf:sound,audioctl 0600 root sys
-dbri:aux,audio 0600 root sys
-SUNW,DBRId:aux,audio 0600 root sys
-SUNW,DBRIe:aux,audio 0600 root sys
-SUNW,DBRIf:aux,audio 0600 root sys
-dbri:aux,audioctl 0600 root sys
-SUNW,DBRId:aux,audioctl 0600 root sys
-SUNW,DBRIe:aux,audioctl 0600 root sys
-SUNW,DBRIf:aux,audioctl 0600 root sys
SUNW,fdtwo:* 0666 root sys
sy:tty 0666 root tty
sysmsg:msglog 0600 root sys
diff --git a/usr/src/uts/sparc/sys/ddi_isa.h b/usr/src/uts/sparc/sys/ddi_isa.h
index 5d3b37dbac..f03d5c9200 100644
--- a/usr/src/uts/sparc/sys/ddi_isa.h
+++ b/usr/src/uts/sparc/sys/ddi_isa.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -52,108 +51,6 @@ extern "C" {
* DDI interfaces defined as functions
*/
-#ifdef __STDC__
-
-uint8_t
-ddi_mem_get8(ddi_acc_handle_t handle, uint8_t *host_addr);
-
-uint16_t
-ddi_mem_get16(ddi_acc_handle_t handle, uint16_t *host_addr);
-
-uint32_t
-ddi_mem_get32(ddi_acc_handle_t handle, uint32_t *host_addr);
-
-uint64_t
-ddi_mem_get64(ddi_acc_handle_t handle, uint64_t *host_addr);
-
-void
-ddi_mem_rep_get8(ddi_acc_handle_t handle, uint8_t *host_addr,
- uint8_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_rep_get16(ddi_acc_handle_t handle, uint16_t *host_addr,
- uint16_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_rep_get32(ddi_acc_handle_t handle, uint32_t *host_addr,
- uint32_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_rep_get64(ddi_acc_handle_t handle, uint64_t *host_addr,
- uint64_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_put8(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value);
-
-void
-ddi_mem_put16(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value);
-
-void
-ddi_mem_put32(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value);
-
-void
-ddi_mem_put64(ddi_acc_handle_t handle, uint64_t *dev_addr, uint64_t value);
-
-void
-ddi_mem_rep_put8(ddi_acc_handle_t handle, uint8_t *host_addr,
- uint8_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_rep_put16(ddi_acc_handle_t handle, uint16_t *host_addr,
- uint16_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_rep_put32(ddi_acc_handle_t handle, uint32_t *host_addr,
- uint32_t *dev_addr, size_t repcount, uint_t flags);
-
-void
-ddi_mem_rep_put64(ddi_acc_handle_t handle, uint64_t *host_addr,
- uint64_t *dev_addr, size_t repcount, uint_t flags);
-
-uint8_t
-ddi_io_get8(ddi_acc_handle_t handle, uint8_t *dev_addr);
-
-uint16_t
-ddi_io_get16(ddi_acc_handle_t handle, uint16_t *dev_addr);
-
-uint32_t
-ddi_io_get32(ddi_acc_handle_t handle, uint32_t *dev_addr);
-
-void
-ddi_io_rep_get8(ddi_acc_handle_t handle,
- uint8_t *host_addr, uint8_t *dev_addr, size_t repcount);
-
-void
-ddi_io_rep_get16(ddi_acc_handle_t handle,
- uint16_t *host_addr, uint16_t *dev_addr, size_t repcount);
-
-void
-ddi_io_rep_get32(ddi_acc_handle_t handle,
- uint32_t *host_addr, uint32_t *dev_addr, size_t repcount);
-
-void
-ddi_io_put8(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value);
-
-void
-ddi_io_put16(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value);
-
-void
-ddi_io_put32(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value);
-
-void
-ddi_io_rep_put8(ddi_acc_handle_t handle,
- uint8_t *host_addr, uint8_t *dev_addr, size_t repcount);
-
-void
-ddi_io_rep_put16(ddi_acc_handle_t handle,
- uint16_t *host_addr, uint16_t *dev_addr, size_t repcount);
-
-void
-ddi_io_rep_put32(ddi_acc_handle_t handle,
- uint32_t *host_addr, uint32_t *dev_addr, size_t repcount);
-
-#endif /* __STDC__ */
-
/*
* The implementation specific ddi access handle is the same for
* all sparc v7 platforms.
diff --git a/usr/src/uts/sun/Makefile.files b/usr/src/uts/sun/Makefile.files
index 0683dc193c..7905c8264d 100644
--- a/usr/src/uts/sun/Makefile.files
+++ b/usr/src/uts/sun/Makefile.files
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -54,10 +54,6 @@ BPP_OBJS += bpp.o
CGSIX_OBJS += cgsix.o
-DBRI_OBJS += dbri.o dbri_conf.o dbri_connect.o \
- dbri_driver.o dbri_isdn.o dbri_isr.o \
- dbri_mmcodec.o dbri_pipe.o dbri_subr.o
-
DMA_OBJS += dmaga.o
ESP_OBJS += esp.o
@@ -90,7 +86,7 @@ DADA_OBJS += dcd_hba.o dcd_transport.o \
dcd_control.o dcd_resource.o dcd_confsubr.o dcd_subr.o \
dcd_confdata.o
-ATA_OBJS += ata_common.o atapi.o ata_disk.o ghd.o ghd_dma.o ghd_scsi.o \
+ATA_OBJS += ata_common.o atapi.o ata_disk.o ghd.o ghd_scsi.o \
ghd_debug.o ghd_scsa.o ghd_gcmd.o ghd_queue.o ghd_timer.o \
ghd_waitq.o cmd.o acersb.o sil.o
diff --git a/usr/src/uts/sun/Makefile.rules b/usr/src/uts/sun/Makefile.rules
index d33f184d65..92ba7a77a7 100644
--- a/usr/src/uts/sun/Makefile.rules
+++ b/usr/src/uts/sun/Makefile.rules
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -42,10 +42,6 @@
#
# Section 1a: C object build rules
#
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun/io/audio/legacy/dbri/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/sun/io/audio/sada/drv/audiocs/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -108,9 +104,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/scsi/adapters/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun/io/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun/io/audio/legacy/dbri/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun/io/audio/sada/drv/audiocs/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
diff --git a/usr/src/uts/sun/io/bpp.c b/usr/src/uts/sun/io/bpp.c
index 52cdf0fc07..25dc5a4d0f 100644
--- a/usr/src/uts/sun/io/bpp.c
+++ b/usr/src/uts/sun/io/bpp.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -89,16 +89,28 @@ static int sbus_cycle = 0; /* sbus clock prop period in nsec */
static void *bpp_state_head; /* opaque handle top of state structs */
-static ddi_dma_lim_t bpp_limits = {
- 0x00000000, /* lower range limit */
- (ulong_t)0xffffffff, /* upper range limit */
+static ddi_dma_attr_t bpp_dma_attr = {
+ DMA_ATTR_V0, /* version */
+ 0x00000000ull, /* dlim_addr_lo */
+ 0xffffffffull, /* dlim_addr_hi */
((1<<24)-1), /* inclusive upper bound of */
/* bpp dma address counter */
/* lower 24 bits are a counter, */
/* upper 8 bits are registered */
- DEFAULT_BURSTSIZE, /* encoded burstsizes */
- (uint_t)1, /* minimum dma transfer */
- 0 /* dma speed - don't care */
+ 1, /* DMA address alignment */
+ DEFAULT_BURSTSIZE, /* encoded burstsizes */
+ 0x1, /* min effective DMA size */
+ 0x7fffffff, /* max DMA xfer size */
+ 0x00ffffff, /* segment boundary */
+ 1, /* s/g list length */
+ 1, /* granularity of device */
+ 0 /* DMA flags */
+};
+
+static ddi_device_acc_attr_t bpp_acc_attr = {
+ DDI_DEVICE_ATTR_V0,
+ DDI_STRUCTURE_BE_ACC,
+ DDI_STRICTORDER_ACC
};
#define KIOIP KSTAT_INTR_PTR(bpp_p->intrstats)
@@ -367,7 +379,6 @@ bpp_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
bpp_p->sbus_clock_cycle));
-
/*
* Map in any device registers. The zebra parallel section
* has only one register area.
@@ -375,10 +386,12 @@ bpp_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
/*
* Map the structure into kernel virtual space.
*/
- if (ddi_map_regs(dip, 0, (caddr_t *)&(bpp_p->bpp_regs_p),
- 0, sizeof (struct bpp_regs)) != DDI_SUCCESS) {
+ if (ddi_regs_map_setup(dip, 0, (caddr_t *)&(bpp_p->bpp_regs_p),
+ 0, sizeof (struct bpp_regs),
+ &bpp_acc_attr, &bpp_p->bpp_acc_handle) != DDI_SUCCESS) {
cmn_err(CE_NOTE,
- "bpp_attach unit %d: ddi_map_regs failed!", unit_no);
+ "bpp_attach unit %d: regs_map_setup failed!", unit_no);
+ cv_destroy(&bpp_p->wr_cv);
mutex_destroy(&bpp_p->bpp_mutex);
ddi_remove_intr(bpp_p->dip, 0, bpp_p->bpp_block_cookie);
ddi_soft_state_free(bpp_state_head, unit_no);
@@ -389,13 +402,27 @@ bpp_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
if (check_bpp_registers(unit_no)) { /* registers don't seem right */
cmn_err(CE_NOTE,
"bpp_attach unit %d: register check failed!", unit_no);
- ddi_unmap_regs(dip, 0, (caddr_t *)&bpp_p->bpp_regs_p,
- 0, sizeof (struct bpp_regs));
+ ddi_regs_map_free(&bpp_p->bpp_acc_handle);
+ cv_destroy(&bpp_p->wr_cv);
mutex_destroy(&bpp_p->bpp_mutex);
ddi_remove_intr(bpp_p->dip, 0, bpp_p->bpp_block_cookie);
ddi_soft_state_free(bpp_state_head, unit_no);
return (DDI_FAILURE);
}
+
+ if (ddi_dma_alloc_handle(dip, &bpp_dma_attr, DDI_DMA_DONTWAIT, NULL,
+ &bpp_p->bpp_dma_handle) != DDI_SUCCESS) {
+ cmn_err(CE_NOTE,
+ "bpp_attach unit %d: dma_alloc_handle failed!",
+ unit_no);
+ ddi_regs_map_free(&bpp_p->bpp_acc_handle);
+ cv_destroy(&bpp_p->wr_cv);
+ mutex_destroy(&bpp_p->bpp_mutex);
+ ddi_remove_intr(bpp_p->dip, 0, bpp_p->bpp_block_cookie);
+ ddi_soft_state_free(bpp_state_head, unit_no);
+ return (DDI_FAILURE);
+ }
+
/* The driver is now commited - all sanity checks done */
(void) sprintf(name, "bpp%d", unit_no);
@@ -404,8 +431,9 @@ bpp_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
ddi_remove_minor_node(dip, NULL);
cmn_err(CE_NOTE, "ddi_create_minor_node failed for unit %d",
unit_no);
- ddi_unmap_regs(dip, 0, (caddr_t *)&bpp_p->bpp_regs_p,
- 0, sizeof (struct bpp_regs));
+ ddi_dma_free_handle(&bpp_p->bpp_dma_handle);
+ ddi_regs_map_free(&bpp_p->bpp_acc_handle);
+ cv_destroy(&bpp_p->wr_cv);
mutex_destroy(&bpp_p->bpp_mutex);
ddi_remove_intr(bpp_p->dip, 0, bpp_p->bpp_block_cookie);
ddi_soft_state_free(bpp_state_head, unit_no);
@@ -691,12 +719,14 @@ bpp_detach(dev_info_t *dip, ddi_detach_cmd_t cmd)
/* Remove the minor node created in attach */
ddi_remove_minor_node(dip, NULL);
+ /* Free DMA handle */
+ ddi_dma_free_handle(&bpp_p->bpp_dma_handle);
+
/*
* Unmap register area from kernel memory.
*/
dip = bpp_p->dip;
- ddi_unmap_regs(dip, 0, (caddr_t *)&bpp_p->bpp_regs_p,
- 0, sizeof (struct bpp_regs));
+ ddi_regs_map_free(&bpp_p->bpp_acc_handle);
/*
* Remove interrupt registry
@@ -709,7 +739,8 @@ bpp_detach(dev_info_t *dip, ddi_detach_cmd_t cmd)
}
bpp_p->intrstats = NULL;
- /* Destroy the per-unit mutex. */
+ /* Destroy the per-unit cv and mutex. */
+ cv_destroy(&bpp_p->wr_cv);
mutex_destroy(&bpp_p->bpp_mutex);
/* Free the memory allocated for this unit's state struct */
@@ -1208,8 +1239,9 @@ bpp_strategy(register struct buf *bp)
size_t size; /* size of DVMA transfer */
register struct bpp_transfer_parms *bpp_transfer_parms_p;
register volatile struct bpp_regs *bpp_regs_p;
- int flags; /* flags to pass to ddi_dma_buf_setup */
+ int flags; /* flags to use for DMA mapping */
ddi_dma_cookie_t dma_cookie;
+ uint_t dma_cookie_cnt;
unit_no = BPP_UNIT(&(bp->b_edev));
@@ -1242,37 +1274,31 @@ bpp_strategy(register struct buf *bp)
flags = DDI_DMA_WRITE;
BPP_PRINT(5, (CE_CONT,
- "Before dma_buf_setup, b_addr = 0x%p, b_bcount = 0x%x\n",
+ "Before dma_buf_bind, b_addr = 0x%p, b_bcount = 0x%x\n",
(void *)bp->b_un.b_addr, bp->b_bcount));
/*
* Get dvma bus resource, sleeping if necessary.
*/
- if ((ddi_dma_buf_setup(bpp_p->dip, bp, flags, DDI_DMA_SLEEP,
- (caddr_t)0, &bpp_limits,
- &bpp_p->bpp_dma_handle)) != 0) {
+ if (ddi_dma_buf_bind_handle(bpp_p->bpp_dma_handle, bp,
+ flags | DDI_DMA_CONSISTENT, DDI_DMA_SLEEP, 0,
+ &dma_cookie, &dma_cookie_cnt) != DDI_DMA_MAPPED) {
cmn_err(CE_NOTE,
- "ERROR: bpp%d: ddi_dma_buf_setup failed mapping",
+ "ERROR: bpp%d: dma_buf_bind failed mapping",
unit_no);
+ bioerror(bp, ENOMEM);
+ bp->b_resid = bp->b_bcount;
+ biodone(bp);
+ return (0);
}
+ ASSERT(dma_cookie_cnt == 1);
BPP_PRINT(5, (CE_CONT,
- "After dma_buf_setup, b_addr = 0x%p, b_bcount = 0x%x\n",
+ "After dma_buf_bind, b_addr = 0x%p, b_bcount = 0x%x\n",
(void *)bp->b_un.b_addr, bp->b_bcount));
-
- /*
- * Convert the dma_handle into an actual virtual
- * DVMA address which can be put into the DMA engine.
- */
- if (ddi_dma_htoc(bpp_p->bpp_dma_handle, (off_t)0,
- &dma_cookie) != 0) {
- cmn_err(CE_NOTE,
- "ERROR: bpp%d: ddi_dma_htoc failed to fill in DMA cookie!",
- unit_no);
- }
start_address = dma_cookie.dmac_address;
BPP_PRINT(5, (CE_CONT,
- "After dma_htoc, start_address = 0x%x\n", start_address));
+ "start_address = 0x%x\n", start_address));
size = bp->b_bcount;
@@ -1734,7 +1760,7 @@ bpp_intr(caddr_t unit_no)
* Release the dvma bus resource.
*/
- (void) ddi_dma_free(bpp_p->bpp_dma_handle);
+ (void) ddi_dma_unbind_handle(bpp_p->bpp_dma_handle);
BPP_PRINT(5, (CE_CONT,
"bpp_intr, unit %d, Calling biodone.\n", unit_no));
@@ -1923,7 +1949,7 @@ bpp_transfer_timeout(void *unit_no_arg)
/*
* Release the dvma bus resource.
*/
- (void) ddi_dma_free(bpp_p->bpp_dma_handle);
+ (void) ddi_dma_unbind_handle(bpp_p->bpp_dma_handle);
BPP_PRINT(5, (CE_CONT,
"bpp_transfer_timeout, unit %d, Calling biodone.\n", unit_no));
diff --git a/usr/src/uts/sun/io/dada/adapters/ghd/ghd_dma.c b/usr/src/uts/sun/io/dada/adapters/ghd/ghd_dma.c
deleted file mode 100644
index f7d491cc82..0000000000
--- a/usr/src/uts/sun/io/dada/adapters/ghd/ghd_dma.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <sys/dada/adapters/ghd/ghd.h>
-
-/*
- * free dma handle and controller handle allocated in ghd_dmaget()
- */
-
-void
-ghd_dmafree(gcmd_t *gcmdp)
-{
- GDBG_DMA(("ghd_dmafree: gcmdp 0x%p\n", (void *)gcmdp));
-
- if (gcmdp->cmd_dma_handle != NULL) {
- (void) ddi_dma_free(gcmdp->cmd_dma_handle);
- GDBG_DMA(("ghd_dmafree: ddi_dma_free 0x%p\n", (void *)gcmdp));
- gcmdp->cmd_dma_handle = NULL;
- gcmdp->cmd_dmawin = NULL;
- gcmdp->cmd_totxfer = 0;
- }
-}
-
-
-int
-ghd_dmaget(
- dev_info_t *dip,
- gcmd_t *gcmdp,
- struct buf *bp,
- int dma_flags,
- int (*callback)(),
- caddr_t arg,
- ddi_dma_lim_t *sg_limitp,
- void (*sg_func)())
-{
-#if defined(__sparc)
- int sg_size = 1;
-#else
- int sg_size = sg_limitp->dlim_sgllen;
-#endif
- ulong_t bcount = bp->b_bcount;
- ulong_t xferred = gcmdp->cmd_totxfer;
- int status;
- off_t off;
- off_t len;
- int num_segs = 0;
- ddi_dma_cookie_t cookie;
- int single_seg = TRUE;
-
- GDBG_DMA(("ghd_dmaget: start: gcmdp 0x%p lim 0x%p h 0x%p w 0x%p\n",
- (void *)gcmdp, (void *)sg_limitp, (void *)gcmdp->cmd_dma_handle,
- (void *)gcmdp->cmd_dmawin));
-
- if (gcmdp->cmd_dma_handle == NULL)
- goto new_handle;
-
- if (gcmdp->cmd_dmawin == NULL)
- goto nextwin;
-
-nextseg:
- do {
- status = ddi_dma_nextseg(gcmdp->cmd_dmawin, gcmdp->cmd_dmaseg,
- &gcmdp->cmd_dmaseg);
- switch (status) {
- case DDI_SUCCESS:
- break;
-
- case DDI_DMA_DONE:
- if (num_segs == 0) {
- /* start the next window */
- goto nextwin;
- }
- gcmdp->cmd_totxfer = xferred;
- gcmdp->cmd_resid = bcount - gcmdp->cmd_totxfer;
- return (TRUE);
-
- default:
- return (FALSE);
- }
-
- (void) ddi_dma_segtocookie(gcmdp->cmd_dmaseg, &off, &len,
- &cookie);
-
- if (len < bcount) {
- /*
- * Can't do the transfer in a single segment,
- * so disable single-segment Scatter/Gather option.
- */
- single_seg = FALSE;
- }
-
- /* call the controller specific S/G function */
- (*sg_func)(gcmdp, &cookie, single_seg, num_segs);
-
- /* take care of the loop-bookkeeping */
- single_seg = FALSE;
- xferred += cookie.dmac_size;
- num_segs++;
- } while (xferred < bcount && num_segs < sg_size);
-
- gcmdp->cmd_totxfer = xferred;
- gcmdp->cmd_resid = bcount - gcmdp->cmd_totxfer;
- return (TRUE);
-
-
- /*
- * First time, need to establish the handle.
- */
-
-new_handle:
- gcmdp->cmd_dmawin = NULL;
-
-
- status = ddi_dma_buf_setup(dip, bp, dma_flags, callback, arg, sg_limitp,
- &gcmdp->cmd_dma_handle);
-
- GDBG_DMA(("ghd_dmaget: setup: gcmdp 0x%p status %d\n",
- (void *)gcmdp, status));
-
- switch (status) {
- case DDI_DMA_MAPOK:
- case DDI_DMA_PARTIAL_MAP:
- /* enable first call to ddi_dma_nextwin */
- gcmdp->cmd_resid = 0;
- gcmdp->cmd_dma_flags = dma_flags;
- break;
-
- case DDI_DMA_NORESOURCES:
- bp->b_error = 0;
- return (FALSE);
-
- case DDI_DMA_TOOBIG:
- bioerror(bp, EINVAL);
- return (FALSE);
-
- case DDI_DMA_NOMAPPING:
- default:
- bioerror(bp, EFAULT);
- return (FALSE);
- }
-
-
- /*
- * get the next window
- */
-
-nextwin:
- gcmdp->cmd_dmaseg = NULL;
-
- status = ddi_dma_nextwin(gcmdp->cmd_dma_handle, gcmdp->cmd_dmawin,
- &gcmdp->cmd_dmawin);
-
- GDBG_DMA(("ghd_dmaget: nextwin: gcmdp 0x%p status %d\n",
- (void *)gcmdp, status));
-
- switch (status) {
- case DDI_SUCCESS:
- break;
-
- case DDI_DMA_DONE:
- return (FALSE);
-
- default:
- return (FALSE);
- }
- goto nextseg;
-
-}
diff --git a/usr/src/uts/sun/io/dada/impl/dcd_resource.c b/usr/src/uts/sun/io/dada/impl/dcd_resource.c
index dbd31d3447..7a906a4040 100644
--- a/usr/src/uts/sun/io/dada/impl/dcd_resource.c
+++ b/usr/src/uts/sun/io/dada/impl/dcd_resource.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -38,6 +38,21 @@
*/
uintptr_t dcd_callback_id = 0L;
+/* For i_ddi_mem_alloc() in dcd_alloc_consistent_buf() */
+static ddi_dma_attr_t standard_dma_attr = {
+ DMA_ATTR_V0, /* version number */
+ 0x0, /* lowest usable address */
+ 0xFFFFFFFFull, /* high DMA address range */
+ 0xFFFFFFFFull, /* DMA counter register */
+ 1, /* DMA address alignment */
+ 1, /* DMA burstsizes */
+ 1, /* min effective DMA size */
+ 0xFFFFFFFFull, /* max DMA xfer size */
+ 0xFFFFFFFFull, /* segment boundary */
+ 1, /* s/g list length */
+ 512, /* granularity of device */
+ 0, /* DMA transfer flags */
+};
struct buf *
dcd_alloc_consistent_buf(struct dcd_address *ap,
@@ -48,6 +63,7 @@ dcd_alloc_consistent_buf(struct dcd_address *ap,
dev_info_t *pdip;
struct buf *bp;
int kmflag;
+ size_t rlen;
if (!in_bp) {
@@ -61,9 +77,8 @@ dcd_alloc_consistent_buf(struct dcd_address *ap,
bp->b_un.b_addr = 0;
if (datalen) {
pdip = (A_TO_TRAN(ap))->tran_hba_dip;
-
- if (ddi_iopb_alloc(pdip, (ddi_dma_lim_t *)0, datalen,
- &bp->b_un.b_addr)) {
+ if (i_ddi_mem_alloc(pdip, &standard_dma_attr, datalen, 0,
+ 0, NULL, &bp->b_un.b_addr, &rlen, NULL) != DDI_SUCCESS) {
if (!in_bp)
freerbuf(bp);
goto no_resource;
@@ -92,7 +107,7 @@ dcd_free_consistent_buf(struct buf *bp)
return;
if (bp->b_un.b_addr)
- ddi_iopb_free((caddr_t)bp->b_un.b_addr);
+ i_ddi_mem_free((caddr_t)bp->b_un.b_addr, 0);
freerbuf(bp);
if (dcd_callback_id != 0L) {
ddi_run_callback(&dcd_callback_id);
diff --git a/usr/src/uts/sun/sys/Makefile b/usr/src/uts/sun/sys/Makefile
index 1cfecbb3dc..ae60e407a2 100644
--- a/usr/src/uts/sun/sys/Makefile
+++ b/usr/src/uts/sun/sys/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -41,7 +41,7 @@ bw2reg.h bw2var.h \
cg3var.h \
cg6fbc.h cg6reg.h cg6tec.h \
cg6thc.h cg6var.h \
-cms.h cursor_impl.h dbriio.h \
+cms.h cursor_impl.h \
dkmpio.h dmaga.h \
eri.h eri_common.h eri_mac.h \
eri_msg.h eri_phy.h \
@@ -51,7 +51,6 @@ hme_phy.h i82586.h \
isdnio.h \
mace.h \
memfb.h memreg.h memvar.h \
-mmcodecreg.h \
obpdefs.h pixrect.h \
pr_impl_util.h pr_planegroups.h \
promif.h promimpl.h \
diff --git a/usr/src/uts/sun/sys/bpp_var.h b/usr/src/uts/sun/sys/bpp_var.h
index f465285cab..1dee083c9a 100644
--- a/usr/src/uts/sun/sys/bpp_var.h
+++ b/usr/src/uts/sun/sys/bpp_var.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,8 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 1990,1991,1997-1998,2002-2003 Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -96,6 +94,7 @@ struct bpp_unit /* Unit structure - one per unit */
/* for bpp_intr */
volatile struct bpp_regs *bpp_regs_p;
/* Device control regs. */
+ ddi_acc_handle_t bpp_acc_handle; /* registers access handle */
struct bpp_transfer_parms transfer_parms;
/* handshake and timing */
struct bpp_pins pins; /* control pins */
diff --git a/usr/src/uts/sun/sys/dada/adapters/ghd/ghd.h b/usr/src/uts/sun/sys/dada/adapters/ghd/ghd.h
index ee03f3b413..2fe39b17c5 100644
--- a/usr/src/uts/sun/sys/dada/adapters/ghd/ghd.h
+++ b/usr/src/uts/sun/sys/dada/adapters/ghd/ghd.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -197,7 +196,6 @@ typedef struct cmd_ctl {
/* ******************************************************************* */
#include "ghd_scsa.h"
-#include "ghd_dma.h"
/*
* GHD Entry Points
diff --git a/usr/src/uts/sun/sys/dada/adapters/ghd/ghd_dma.h b/usr/src/uts/sun/sys/dada/adapters/ghd/ghd_dma.h
deleted file mode 100644
index 6d708e634f..0000000000
--- a/usr/src/uts/sun/sys/dada/adapters/ghd/ghd_dma.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 1996, Sun Microsystems, Inc.
- * All Rights Reserved.
- */
-
-#ifndef _GHD_DMA_H
-#define _GHD_DMA_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#include <sys/ddi.h>
-#include <sys/sunddi.h>
-
-#include "ghd.h"
-
-void ghd_dmafree(gcmd_t *gcmdp);
-
-int ghd_dmaget(dev_info_t *dip, gcmd_t *gcmdp, struct buf *bp,
- int flags, int (*callback)(), caddr_t arg,
- ddi_dma_lim_t *sg_limitp, void (*sg_func)());
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GHD_DMA_H */
diff --git a/usr/src/uts/sun/sys/dada/adapters/ghd/ghd_scsa.h b/usr/src/uts/sun/sys/dada/adapters/ghd/ghd_scsa.h
index 6be0651eb7..c0d9630fda 100644
--- a/usr/src/uts/sun/sys/dada/adapters/ghd/ghd_scsa.h
+++ b/usr/src/uts/sun/sys/dada/adapters/ghd/ghd_scsa.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,10 +18,9 @@
*
* CDDL HEADER END
*/
-
/*
- * Copyright (c) 1997, Sun Microsystems, Inc.
- * All Rights Reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#ifndef _GHD_SCSA_H
@@ -45,12 +43,6 @@ extern "C" {
*/
#define HBA_SETGEOM(hd, sec) (((hd) << 16) | (sec))
-struct scsi_pkt *ghd_tran_init_pkt(ccc_t *cccp, struct scsi_address *ap,
- struct scsi_pkt *pktp, struct buf *bp, int cmdlen,
- int statuslen, int tgtlen, int flags,
- int (*callback)(), caddr_t arg, int ccblen,
- ddi_dma_lim_t *sg_limitp);
-
void ghd_tran_sync_pkt(struct scsi_address *ap,
struct scsi_pkt *pktp);
diff --git a/usr/src/uts/sun/sys/mmcodecreg.h b/usr/src/uts/sun/sys/mmcodecreg.h
deleted file mode 100644
index c006f31872..0000000000
--- a/usr/src/uts/sun/sys/mmcodecreg.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SYS_MMCODECREG_H
-#define _SYS_MMCODECREG_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * MMCODEC - Multi-Media Codec operates over the CHI bus and interfaces
- * with DBRI.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Data Mode timeslot structure
- */
-typedef union {
- struct {
- /* time slot 5 */
- unsigned char
- om1:1, /* analog output line 1 control */
- om0:1, /* output line 0 control */
- lo:6; /* left channel output attenuation */
-
- /* time slot 6 */
- unsigned char
- :1,
- sm:1, /* speaker mute */
- ro:6; /* right channel output attenuation */
-
- /* time slot 7 */
- unsigned char
- pio:2, /* parallel input/output bits */
- ovr:1, /* overrange */
- is:1, /* line/microphone input selection */
- lg:4; /* left channel input gain */
-
- /* time slot 8 */
- unsigned char
- ma:4, /* monitor attenutation */
- rg:4; /* right channel input gain */
- } r;
-
- ushort_t word16[2]; /* short-word access */
-
- uint_t word32; /* word access */
-} mmcodec_data_t;
-
-
-/*
- * Time Slot 5 data mode bit defines
- */
-#define MMCODEC_OM0_ENABLE 0x1 /* Output Line 0 On */
-#define MMCODEC_OM1_ENABLE 0x1 /* Output Line 1 On */
-#define MMCODEC_MIN_ATEN (0) /* Minimum attenuation */
-#define MMCODEC_MAX_ATEN (31) /* Maximum usable attenuation */
-#define MMCODEC_MAX_DEV_ATEN (63) /* Maximum device attenuation */
-
-/*
- * Time Slot 6 data mode bit defines
- */
-#define MMCODEC_SM 0x1 /* 1 is enabled, 0 is muted */
-
-/*
- * Time Slot 7 data mode bit defines
- */
-#define MMCODEC_OVR_CLR 0x0 /* Clear ovr condition (wt) */
-#define MMCODEC_OVR 0x1 /* Overrange occurred (rd) */
-#define MMCODEC_IS_LINE 0x0 /* Line level input select */
-#define MMCODEC_IS_MIC 0x1 /* Microphone input select */
-#define MMCODEC_MIN_GAIN (0)
-#define MMCODEC_MAX_GAIN (15)
-
-/*
- * Time Slot 8 data mode bit defines
- */
-#define MMCODEC_MA_MIN_ATEN (0)
-#define MMCODEC_MA_MAX_ATEN (15)
-
-/*
- * Control Mode timeslot structure
- */
-typedef union {
- struct {
- /* time slot 1 */
- unsigned char
- :3,
- mb:1,
- vs1:1, /* Vendor-Specific bit */
- dcb:1, /* Data control handshake bit */
- sre:1, /* Shadow register enable */
- vs0:1; /* Auto calibration bit */
-
- /* time slot 2 */
- unsigned char
- hpf:1, /* High Pass Filter in revE or higher */
- :1,
- dfr:3, /* Data conversion frequency */
- st:1, /* Stereo bit */
- df:2; /* Data format selection */
-
- /* time slot 3 */
- unsigned char
- :2,
- mck:2, /* Clock source select */
- bsel:2, /* Bit rate select */
- xclk:1, /* Transmit clock select */
- xen:1; /* Transmitter enable */
-
- /* time slot 4 */
- unsigned char
- :6,
- enl:1, /* Enable loopback testing */
- adl:1; /* Analog/Digital loopback */
-
- /* time slot 5 */
- unsigned char
- pio:2, /* Parallel input/output lines */
- :6;
-
- /* time slot 6 */
- unsigned char
- :8; /* reserved */
-
- /* time slot 7 */
- unsigned char
- manufacturer:4, /* Manufacturer identification */
- revision:4; /* Revision level of Codec */
-
- /* time slot 8 */
- unsigned char
- :8; /* reserved */
- } r;
-
- ushort_t word16[4]; /* short-word access */
-
- uint_t word32[2]; /* word access */
-} mmcodec_ctrl_t;
-
-
-/*
- * Time Slot 1 control mode bit defines
- */
-#define MMCODEC_DCB 0x1 /* Data control handshake */
-#define MMCODEC_SRE 0x1 /* Shadow register enable */
-#define MMCODEC_VS0 0x0
-#define MMCODEC_VS1 0x1
-
-
-/*
- * Time Slot 2 data frequency rate bit defines
- */
-#define MMCODEC_DFR_8000 0x0
-#define MMCODEC_DFR_5513 0x0
-#define MMCODEC_DFR_16000 0x1
-#define MMCODEC_DFR_11025 0x1
-#define MMCODEC_DFR_27429 0x2
-#define MMCODEC_DFR_18900 0x2
-#define MMCODEC_DFR_32000 0x3
-#define MMCODEC_DFR_22050 0x3
-#define MMCODEC_DFR_37800 0x4
-#define MMCODEC_DFR_44100 0x5
-#define MMCODEC_DFR_48000 0x6
-#define MMCODEC_DFR_33075 0x6
-#define MMCODEC_DFR_9600 0x7
-#define MMCODEC_DFR_6615 0x7
-
-#define MMCODEC_ST_MONO 0x0 /* Mono mode */
-#define MMCODEC_ST_STEREO 0x1 /* Stereo mode */
-
-#define MMCODEC_DF_16_BIT 0x0 /* Data format 16 bit linear */
-#define MMCODEC_DF_ULAW 0x1 /* Data format 8 bit u-law */
-#define MMCODEC_DF_ALAW 0x2 /* Data format 8 bit A-law */
-
-
-/*
- * Time Slot 3 master clock bit defines
- */
-#define MMCODEC_MCK_MSTR 0x0 /* SCLK is master clock */
-#define MMCODEC_MCK_XTAL1 0x1 /* Crystal 1 24.576 MHz */
-#define MMCODEC_MCK_XTAL2 0x2 /* Crystal 2 16.9344 MHz */
-#define MMCODEC_MCK_EXT 0x3 /* External clock source */
-
-#define MMCODEC_BSEL_64 0x0 /* 64 bits per frame */
-#define MMCODEC_BSEL_128 0x1 /* 128 bits per frame */
-#define MMCODEC_BSEL_256 0x2 /* 256 bits per frame */
-
-#define MMCODEC_XCLK 0x1 /* Xmit clock and frame sync */
-
-#define MMCODEC_XEN 0x0 /* enable serial data output */
-
-
-/*
- * Time Slot 4 loopback bit defines
- */
-#define MMCODEC_ENL 0x1 /* Enable loopback testing */
-#define MMCODEC_ADL_DIG 0x0 /* Digital loopback mode */
-#define MMCODEC_ADL_ANLG 0x1 /* Analog loopback mode */
-
-/*
- * General MMCODEC defines
- */
-#define MMCODEC_LEN 256 /* 256 bits/frame */
-
-/* XXX - This potentially belongs in something like dbri_sun_chi.h or ... */
-#define SCHI_SET_DATA_MODE DBRI_PIO_3
-#define SCHI_SET_CTRL_MODE (0 << 3)
-#define SCHI_SET_INT_PDN DBRI_PIO_2
-#define SCHI_CLR_INT_PDN (0 << 2)
-#define SCHI_SET_RESET (0 << 1)
-#define SCHI_CLR_RESET DBRI_PIO_1
-#define SCHI_SET_PDN DBRI_PIO_0
-#define SCHI_CLR_PDN (0)
-
-#define SCHI_ENA_MODE DBRI_PIO3_EN
-#define SCHI_ENA_INT_PDN DBRI_PIO2_EN
-#define SCHI_ENA_RESET DBRI_PIO1_EN
-#define SCHI_ENA_PDN DBRI_PIO0_EN
-#define SCHI_ENA_ALL (0xF0)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SYS_MMCODECREG_H */
diff --git a/usr/src/uts/sun4/io/efcode/fc_ddi.c b/usr/src/uts/sun4/io/efcode/fc_ddi.c
index 66aedabc4b..95c99a9c26 100644
--- a/usr/src/uts/sun4/io/efcode/fc_ddi.c
+++ b/usr/src/uts/sun4/io/efcode/fc_ddi.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 1999, 2002 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -39,26 +39,101 @@
/*
* We want to call the attachment point's dma ctl op, not his parent's
- * dma ctl op, so we have to code this ourselves. (the dma setup functions
- * already implement this functionality for us.)
+ * dma ctl op, so we have to code this ourselves.
*/
+
int
-fc_ddi_dma_htoc(dev_info_t *ap, ddi_dma_handle_t h, off_t o,
- ddi_dma_cookie_t *c)
+fc_ddi_dma_alloc_handle(dev_info_t *dip, ddi_dma_attr_t *attr,
+ int (*waitfp)(caddr_t), caddr_t arg, ddi_dma_handle_t *handlep)
{
- int (*fp)();
+ int (*funcp)(dev_info_t *, dev_info_t *, ddi_dma_attr_t *,
+ int (*)(caddr_t), caddr_t, ddi_dma_handle_t *);
- fp = DEVI(ap)->devi_ops->devo_bus_ops->bus_dma_ctl;
- return ((*fp) (ap, ap, h, DDI_DMA_HTOC, &o, 0, (caddr_t *)c, 0));
+ funcp = DEVI(dip)->devi_ops->devo_bus_ops->bus_dma_allochdl;
+ return ((*funcp)(dip, dip, attr, waitfp, arg, handlep));
}
int
-fc_ddi_dma_free(dev_info_t *ap, ddi_dma_handle_t h)
+fc_ddi_dma_buf_bind_handle(ddi_dma_handle_t handle, struct buf *bp,
+ uint_t flags, int (*waitfp)(caddr_t), caddr_t arg,
+ ddi_dma_cookie_t *cookiep, uint_t *ccountp)
{
- int (*fp)();
+ struct ddi_dma_req dmareq;
+ ddi_dma_impl_t *hp;
+ dev_info_t *dip;
+ int (*funcp)(dev_info_t *, dev_info_t *, ddi_dma_handle_t,
+ struct ddi_dma_req *, ddi_dma_cookie_t *, uint_t *);
+
+ hp = (ddi_dma_impl_t *)handle;
+ dip = hp->dmai_rdip;
+
+ dmareq.dmar_flags = flags;
+ dmareq.dmar_fp = waitfp;
+ dmareq.dmar_arg = arg;
+ dmareq.dmar_object.dmao_size = (uint_t)bp->b_bcount;
- fp = DEVI(ap)->devi_ops->devo_bus_ops->bus_dma_ctl;
- return ((*fp) (ap, ap, h, DDI_DMA_FREE, 0, 0, 0, 0));
+ if ((bp->b_flags & (B_PAGEIO|B_REMAPPED)) == B_PAGEIO) {
+ dmareq.dmar_object.dmao_type = DMA_OTYP_PAGES;
+ dmareq.dmar_object.dmao_obj.pp_obj.pp_pp = bp->b_pages;
+ dmareq.dmar_object.dmao_obj.pp_obj.pp_offset =
+ (uint_t)(((uintptr_t)bp->b_un.b_addr) & MMU_PAGEOFFSET);
+ } else {
+ dmareq.dmar_object.dmao_obj.virt_obj.v_addr = bp->b_un.b_addr;
+ if ((bp->b_flags & (B_SHADOW|B_REMAPPED)) == B_SHADOW) {
+ dmareq.dmar_object.dmao_obj.virt_obj.v_priv =
+ bp->b_shadow;
+ dmareq.dmar_object.dmao_type = DMA_OTYP_BUFVADDR;
+ } else {
+ dmareq.dmar_object.dmao_type =
+ (bp->b_flags & (B_PHYS | B_REMAPPED))?
+ DMA_OTYP_BUFVADDR : DMA_OTYP_VADDR;
+ dmareq.dmar_object.dmao_obj.virt_obj.v_priv = NULL;
+ }
+
+ /*
+ * If the buffer has no proc pointer, or the proc
+ * struct has the kernel address space, or the buffer has
+ * been marked B_REMAPPED (meaning that it is now
+ * mapped into the kernel's address space), then
+ * the address space is kas (kernel address space).
+ */
+ if (bp->b_proc == NULL || bp->b_proc->p_as == &kas ||
+ (bp->b_flags & B_REMAPPED) != 0) {
+ dmareq.dmar_object.dmao_obj.virt_obj.v_as = 0;
+ } else {
+ dmareq.dmar_object.dmao_obj.virt_obj.v_as =
+ bp->b_proc->p_as;
+ }
+ }
+
+ funcp = DEVI(dip)->devi_ops->devo_bus_ops->bus_dma_bindhdl;
+ return ((*funcp)(dip, dip, handle, &dmareq, cookiep, ccountp));
+}
+
+int
+fc_ddi_dma_unbind_handle(ddi_dma_handle_t handle)
+{
+ int (*funcp)(dev_info_t *, dev_info_t *, ddi_dma_handle_t);
+ ddi_dma_impl_t *hp;
+ dev_info_t *dip;
+
+ hp = (ddi_dma_impl_t *)handle;
+ dip = hp->dmai_rdip;
+ funcp = DEVI(dip)->devi_ops->devo_bus_ops->bus_dma_unbindhdl;
+ return ((*funcp)(dip, dip, handle));
+}
+
+void
+fc_ddi_dma_free_handle(ddi_dma_handle_t *handlep)
+{
+ int (*funcp)(dev_info_t *, dev_info_t *, ddi_dma_handle_t);
+ ddi_dma_impl_t *hp;
+ dev_info_t *dip;
+
+ hp = (ddi_dma_impl_t *)*handlep;
+ dip = hp->dmai_rdip;
+ funcp = DEVI(dip)->devi_ops->devo_bus_ops->bus_dma_freehdl;
+ (void) (*funcp)(dip, dip, *handlep);
}
int
diff --git a/usr/src/uts/sun4/io/efcode/fcpci.c b/usr/src/uts/sun4/io/efcode/fcpci.c
index 849643b4bf..ba5b2435e1 100644
--- a/usr/src/uts/sun4/io/efcode/fcpci.c
+++ b/usr/src/uts/sun4/io/efcode/fcpci.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -43,6 +43,7 @@
#include <sys/fcode.h>
#include <sys/promif.h>
#include <sys/promimpl.h>
+#include <sys/ddi_implfuncs.h>
#define PCI_NPT_bits (PCI_RELOCAT_B | PCI_PREFETCH_B | PCI_ALIAS_B)
#define PCICFG_CONF_INDIRECT_MAP 1
@@ -76,7 +77,6 @@ int pci_alloc_io_chunk(dev_info_t *, uint64_t, uint64_t *, uint64_t *);
static int fcpci_indirect_map(dev_info_t *);
int fcpci_unloadable;
-int no_advisory_dma;
#ifndef lint
static char _depends_on[] = "misc/fcodem misc/busra";
@@ -288,6 +288,8 @@ pfc_dma_map_in(dev_info_t *ap, fco_handle_t rp, fc_ci_t *cp)
struct fc_resource *ip;
ddi_dma_cookie_t c;
struct buf *bp;
+ ddi_dma_attr_t attr;
+ uint_t ccnt;
if (fc_cell2int(cp->nargs) != 3)
return (fc_syntax_error(cp, "nargs must be 3"));
@@ -317,48 +319,30 @@ pfc_dma_map_in(dev_info_t *ap, fco_handle_t rp, fc_ci_t *cp)
return (fc_priv_error(cp, "fc_physio_setup failed"));
}
- if (no_advisory_dma == 0) {
- /*
- * First try the advisory call to see if it's legal ..
- * for advisory dma, don't pass in a ptr to a dma handle.
- */
- FC_DEBUG0(9, CE_CONT, "pfc_dma_map_in: advisory dma_map_in\n");
- error = ddi_dma_buf_setup(ap, bp, flags, DDI_DMA_SLEEP,
- NULL, NULL, NULL);
-
- if (error) {
- FC_DEBUG3(9, CE_CONT, "pfc_dma_map_in: advisory "
- "dma-map-in failed error: %d virt: %p len %d\n",
- error, virt, len);
- return (fc_priv_error(cp, "advisory dma-map-in "
- "failed"));
- }
- }
-
FC_DEBUG1(9, CE_CONT, "pfc_dma_map_in: dma_map_in; bp = %p\n", bp);
- error = ddi_dma_buf_setup(ap, bp, flags, DDI_DMA_SLEEP,
- NULL, NULL, &h);
-
- if (error) {
+ error = fc_ddi_dma_alloc_handle(ap, &attr, DDI_DMA_SLEEP, NULL, &h);
+ if (error != DDI_SUCCESS) {
FC_DEBUG3(1, CE_CONT, "pfc_dma_map_in: real dma-map-in failed "
"error: %d virt: %p len %d\n", error, virt, len);
return (fc_priv_error(cp, "real dma-map-in failed"));
}
- /*
- * Now that the resource is mapped in, we need the dma cookie
- * so we can return it to the driver.
- */
-
- error = fc_ddi_dma_htoc(ap, h, 0, &c);
- if (error) {
- (void) fc_ddi_dma_free(ap, h);
- return (fc_priv_error(cp, "ddi_dma_htoc failed"));
+ error = fc_ddi_dma_buf_bind_handle(h, bp, flags, DDI_DMA_SLEEP, NULL,
+ &c, &ccnt);
+ if ((error != DDI_DMA_MAPPED) || (ccnt != 1)) {
+ fc_ddi_dma_free_handle(&h);
+ FC_DEBUG3(1, CE_CONT, "pfc_dma_map_in: real dma-map-in failed "
+ "error: %d virt: %p len %d\n", error, virt, len);
+ return (fc_priv_error(cp, "real dma-map-in failed"));
}
if (c.dmac_size < len) {
- (void) fc_ddi_dma_free(ap, h);
- return (fc_priv_error(cp, "ddi_dma_htoc size < len"));
+ error = fc_ddi_dma_unbind_handle(h);
+ if (error != DDI_SUCCESS) {
+ return (fc_priv_error(cp, "ddi_dma_unbind error"));
+ }
+ fc_ddi_dma_free_handle(&h);
+ return (fc_priv_error(cp, "ddi_dma_buf_bind size < len"));
}
FC_DEBUG1(9, CE_CONT, "pfc_dma_map_in: returning devaddr %x\n",
@@ -443,6 +427,7 @@ pfc_dma_map_out(dev_info_t *ap, fco_handle_t rp, fc_ci_t *cp)
size_t len;
uint32_t devaddr;
struct fc_resource *ip;
+ int e;
if (fc_cell2int(cp->nargs) != 3)
return (fc_syntax_error(cp, "nargs must be 3"));
@@ -472,10 +457,13 @@ pfc_dma_map_out(dev_info_t *ap, fco_handle_t rp, fc_ci_t *cp)
"known dma mapping"));
/*
- * ddi_dma_free does an implied sync ...
+ * ddi_dma_unbind_handle does an implied sync ...
*/
- if (fc_ddi_dma_free(ap, ip->fc_dma_handle))
- cmn_err(CE_CONT, "pfc_dma_map_out: ddi_dma_free failed!\n");
+ e = fc_ddi_dma_unbind_handle(ip->fc_dma_handle);
+ if (e != DDI_SUCCESS) {
+ cmn_err(CE_CONT, "pfc_dma_map_out: ddi_dma_unbind failed!\n");
+ }
+ fc_ddi_dma_free_handle(&ip->fc_dma_handle);
/*
* Tear down the physio mappings
@@ -510,6 +498,7 @@ static int
pfc_dma_cleanup(dev_info_t *ap, fco_handle_t rp, fc_ci_t *cp)
{
struct fc_resource *ip;
+ int e;
while ((ip = next_dma_resource(rp)) != NULL) {
@@ -519,9 +508,12 @@ pfc_dma_cleanup(dev_info_t *ap, fco_handle_t rp, fc_ci_t *cp)
/*
* Free the dma handle
*/
- if (fc_ddi_dma_free(ap, ip->fc_dma_handle))
+ e = fc_ddi_dma_unbind_handle(ip->fc_dma_handle);
+ if (e != DDI_SUCCESS) {
cmn_err(CE_CONT, "pfc_dma_cleanup: "
- "ddi_dma_free failed!\n");
+ "ddi_dma_unbind failed!\n");
+ }
+ fc_ddi_dma_free_handle(&ip->fc_dma_handle);
/*
* Tear down the userland mapping and free the buf header
diff --git a/usr/src/uts/sun4/os/dvma.c b/usr/src/uts/sun4/os/dvma.c
index 9c7078d77d..8069704886 100644
--- a/usr/src/uts/sun4/os/dvma.c
+++ b/usr/src/uts/sun4/os/dvma.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -121,6 +121,8 @@ dvma_kaddr_load(ddi_dma_handle_t h, caddr_t a, uint_t len, uint_t index,
register ddi_dma_impl_t *mp = (ddi_dma_impl_t *)h;
struct fast_dvma *nexus_private;
struct dvma_ops *nexus_funcptr;
+ ddi_dma_attr_t dma_attr;
+ uint_t ccnt;
if (mp->dmai_rflags & DMP_BYPASSNEXUS) {
nexus_private = (struct fast_dvma *)mp->dmai_nexus_private;
@@ -131,10 +133,23 @@ dvma_kaddr_load(ddi_dma_handle_t h, caddr_t a, uint_t len, uint_t index,
ddi_dma_lim_t *limp;
limp = (ddi_dma_lim_t *)mp->dmai_mapping;
- (void) ddi_dma_addr_setup(HD, NULL, a, len, DDI_DMA_RDWR,
- DDI_DMA_SLEEP, NULL, limp, &handle);
+ dma_attr.dma_attr_version = DMA_ATTR_V0;
+ dma_attr.dma_attr_addr_lo = limp->dlim_addr_lo;
+ dma_attr.dma_attr_addr_hi = limp->dlim_addr_hi;
+ dma_attr.dma_attr_count_max = limp->dlim_cntr_max;
+ dma_attr.dma_attr_align = 1;
+ dma_attr.dma_attr_burstsizes = limp->dlim_burstsizes;
+ dma_attr.dma_attr_minxfer = limp->dlim_minxfer;
+ dma_attr.dma_attr_maxxfer = 0xFFFFFFFFull;
+ dma_attr.dma_attr_seg = 0xFFFFFFFFull;
+ dma_attr.dma_attr_sgllen = 1;
+ dma_attr.dma_attr_granular = 1;
+ dma_attr.dma_attr_flags = 0;
+ (void) ddi_dma_alloc_handle(HD, &dma_attr, DDI_DMA_SLEEP, NULL,
+ &handle);
+ (void) ddi_dma_addr_bind_handle(handle, NULL, a, len,
+ DDI_DMA_RDWR, DDI_DMA_SLEEP, NULL, cp, &ccnt);
((ddi_dma_handle_t *)mp->dmai_minfo)[index] = handle;
- (void) ddi_dma_htoc(handle, 0, cp);
}
}
@@ -154,7 +169,8 @@ dvma_unload(ddi_dma_handle_t h, uint_t objindex, uint_t type)
ddi_dma_handle_t handle;
handle = ((ddi_dma_handle_t *)mp->dmai_minfo)[objindex];
- (void) ddi_dma_free(handle);
+ (void) ddi_dma_unbind_handle(handle);
+ (void) ddi_dma_free_handle(&handle);
}
}
diff --git a/usr/src/uts/sun4/sys/fcode.h b/usr/src/uts/sun4/sys/fcode.h
index 280bf6e94e..2e2887c142 100644
--- a/usr/src/uts/sun4/sys/fcode.h
+++ b/usr/src/uts/sun4/sys/fcode.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -634,8 +633,13 @@ extern int fc_priv_error(fc_ci_t *, char *);
* optimize these functions by not necessarily calling through the
* attachment point driver.
*/
-int fc_ddi_dma_htoc(dev_info_t *, ddi_dma_handle_t, off_t, ddi_dma_cookie_t *);
-int fc_ddi_dma_free(dev_info_t *ap, ddi_dma_handle_t h);
+int fc_ddi_dma_alloc_handle(dev_info_t *dip, ddi_dma_attr_t *attr,
+ int (*waitfp)(caddr_t), caddr_t arg, ddi_dma_handle_t *handlep);
+int fc_ddi_dma_buf_bind_handle(ddi_dma_handle_t handle, struct buf *bp,
+ uint_t flags, int (*waitfp)(caddr_t), caddr_t arg,
+ ddi_dma_cookie_t *cookiep, uint_t *ccountp);
+int fc_ddi_dma_unbind_handle(ddi_dma_handle_t handle);
+void fc_ddi_dma_free_handle(ddi_dma_handle_t *handlep);
int fc_ddi_dma_sync(ddi_dma_handle_t h, off_t o, size_t l, uint_t whom);
/*