diff options
author | Garrett D'Amore <gdamore@opensolaris.org> | 2009-06-10 17:16:45 -0700 |
---|---|---|
committer | Garrett D'Amore <gdamore@opensolaris.org> | 2009-06-10 17:16:45 -0700 |
commit | 57f4a14abf7408570afb91750e10e4b57f721549 (patch) | |
tree | e6bb38fef0927e7c56d974a651b64b10739ebe5c | |
parent | 0ad0f0b2adb964c7bd56bbf5a831721e1a67beaf (diff) | |
download | illumos-gate-57f4a14abf7408570afb91750e10e4b57f721549.tar.gz |
PSARC 2009/334 EOF of legacy bus mice
PSARC 2009/341 remove mscsi
6848113 busmice (msm and logi) should be removed
6848112 remove mscsi
--HG--
rename : usr/src/uts/common/sys/vuidmice.h => usr/src/uts/common/io/vuidmice/vuidmice.h
31 files changed, 40 insertions, 2505 deletions
diff --git a/usr/src/cmd/devfsadm/misc_link.c b/usr/src/cmd/devfsadm/misc_link.c index 44756c3e98..77db8ed479 100644 --- a/usr/src/cmd/devfsadm/misc_link.c +++ b/usr/src/cmd/devfsadm/misc_link.c @@ -116,7 +116,7 @@ static devfsadm_create_t misc_cbt[] = { TYPE_EXACT | DRV_EXACT, ILEVEL_0, node_name }, { "pseudo", "ddi_pseudo", - "(^kdmouse$)|(^logi$)|(^rootprop$)|(^msm$)", + "(^kdmouse$)|(^rootprop$)", TYPE_EXACT | DRV_RE, ILEVEL_0, node_name }, { "pseudo", "ddi_pseudo", "tod", diff --git a/usr/src/pkgdefs/SUNWpsdcr/postinstall b/usr/src/pkgdefs/SUNWpsdcr/postinstall index c6ee17938e..71cd334cdb 100644 --- a/usr/src/pkgdefs/SUNWpsdcr/postinstall +++ b/usr/src/pkgdefs/SUNWpsdcr/postinstall @@ -18,9 +18,7 @@ # # CDDL HEADER END # -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # @@ -31,87 +29,6 @@ EXIT=0 ARCH="`uname -p`" NAMEMAJOR="$BASEDIR/etc/name_to_major" DRIVER_ALIASES="$BASEDIR/etc/driver_aliases" -# -# Routine to remove current entries for a device in /devices, -# /dev, and /etc/path_to_inst. -# -RmDevice() -{ - rm -f $1 - - linkslist=`find dev -type l -print` - for l in $linkslist - do - dorm=`ls -l $l | grep $1` - if [ "$dorm"X != "X" ] - then - rm -f $l - fi - done - - instname=`expr $1 : devices'\(.*'$m'.*\):.*` - cp $BASEDIR/etc/path_to_inst /tmp/p2i.$$ - cat /tmp/p2i.$$ | - sed '\?'$instname'?d' > /tmp/np2i.$$ - if [ -s /tmp/np2i.$$ ] - then - mv /tmp/np2i.$$ $BASEDIR/etc/path_to_inst - chmod 444 $BASEDIR/etc/path_to_inst - chown root $BASEDIR/etc/path_to_inst - chgrp sys $BASEDIR/etc/path_to_inst - fi - rm /tmp/p2i.$$ -} - -# -# Several mouse drivers on the Intel platform will have different -# device names with SunOS 5.6 than with previous releases. We want to -# remove the old names at this time so that the configuration reboot -# will cleanly create the new device names. -# -if [ "${ARCH}" = "i386" ] -then - - for m in logi msm kdmouse asy - do - cd ${BASEDIR} - devlist=`find devices -name $m"*" -print` - - for d in $devlist - do - prefix=`expr $d : '\(.*'$m'\).*'` - fulldev=`basename $d` - ioaddr=`expr $fulldev : $m'@\(.*\),.*'` - - # - # Chance to bail now if we don't appear to need - # to do the conversion. - # - if [ "$ioaddr" = "1" ] - then - continue - else - if [ "$ioaddr" != "" ] - then - RmDevice $d - fi - fi - done - done - - touch ${BASEDIR}/reconfigure - - DELCONF1="platform/i86pc/kernel/drv/logi.conf" - DELCONF2="platform/i86pc/kernel/drv/msm.conf" - - if [ -f $BASEDIR/$DELCONF1 ] ; then - rm $BASEDIR/$DELCONF1 - fi - - if [ -f $BASEDIR/$DELCONF2 ] ; then - rm $BASEDIR/$DELCONF2 - fi -fi # add_drv ecpp driver if not already installed modnum=`grep -c ecpp ${NAMEMAJOR}` diff --git a/usr/src/pkgdefs/SUNWpsdcr/prototype_i386 b/usr/src/pkgdefs/SUNWpsdcr/prototype_i386 index ddcd7a4caf..23d29af9e6 100644 --- a/usr/src/pkgdefs/SUNWpsdcr/prototype_i386 +++ b/usr/src/pkgdefs/SUNWpsdcr/prototype_i386 @@ -57,8 +57,6 @@ f none kernel/drv/fd 755 root sys f none kernel/drv/fd.conf 644 root sys f none kernel/drv/fdc.conf 644 root sys f none kernel/drv/fdc 755 root sys -f none kernel/drv/logi 755 root sys -f none kernel/drv/msm 755 root sys f none kernel/drv/ncrs 755 root sys f none kernel/drv/ncrs.conf 644 root sys d none kernel/misc 755 root sys @@ -77,7 +75,6 @@ f none kernel/drv/amd64/cmdk 755 root sys f none kernel/drv/amd64/ecpp 755 root sys f none kernel/drv/amd64/fd 755 root sys f none kernel/drv/amd64/fdc 755 root sys -f none kernel/drv/amd64/logi 755 root sys d none kernel/misc/amd64 755 root sys f none kernel/misc/amd64/dadk 755 root sys f none kernel/misc/amd64/gda 755 root sys diff --git a/usr/src/pkgdefs/SUNWpsdir/prototype_i386 b/usr/src/pkgdefs/SUNWpsdir/prototype_i386 index e8d6e7286e..8d8e6e8c8a 100644 --- a/usr/src/pkgdefs/SUNWpsdir/prototype_i386 +++ b/usr/src/pkgdefs/SUNWpsdir/prototype_i386 @@ -19,11 +19,9 @@ # CDDL HEADER END # # -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # This required package information file contains a list of package contents. # The 'pkgmk' command uses this file to identify the contents of a package # and their location on the development machine when building the package. @@ -53,8 +51,6 @@ d none kernel 755 root sys d none kernel/drv 755 root sys f none kernel/drv/ata 755 root sys e ataconf kernel/drv/ata.conf 644 root sys -f none kernel/drv/mscsi 755 root sys -f none kernel/drv/mscsi.conf 644 root sys d none kernel/drv/amd64 755 root sys f none kernel/drv/amd64/ata 755 root sys diff --git a/usr/src/pkgdefs/SUNWpsh/prototype_i386 b/usr/src/pkgdefs/SUNWpsh/prototype_i386 index db14530ace..541cd4eaca 100644 --- a/usr/src/pkgdefs/SUNWpsh/prototype_i386 +++ b/usr/src/pkgdefs/SUNWpsh/prototype_i386 @@ -18,11 +18,9 @@ # # CDDL HEADER END # -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# # This required package information file contains a list of package contents. # The 'pkgmk' command uses this file to identify the contents of a package # and their location on the development machine when building the package. @@ -58,7 +56,6 @@ f none usr/include/sys/dktp/dadk.h 644 root bin f none usr/include/sys/dktp/fctypes.h 644 root bin f none usr/include/sys/dktp/flowctrl.h 644 root bin f none usr/include/sys/dktp/gda.h 644 root bin -f none usr/include/sys/dktp/mscsi.h 644 root bin f none usr/include/sys/dktp/quetypes.h 644 root bin f none usr/include/sys/dktp/queue.h 644 root bin f none usr/include/sys/dktp/tgcom.h 644 root bin @@ -69,5 +66,3 @@ f none usr/include/sys/fdc.h 644 root bin f none usr/include/sys/fdmedia.h 644 root bin f none usr/include/sys/mii.h 644 root bin f none usr/include/sys/miipriv.h 644 root bin -f none usr/include/sys/mse.h 644 root bin -f none usr/include/sys/vuidmice.h 644 root bin diff --git a/usr/src/pkgdefs/common_files/i.kclasses_i386 b/usr/src/pkgdefs/common_files/i.kclasses_i386 index 2c179c26a7..613ab1497b 100644 --- a/usr/src/pkgdefs/common_files/i.kclasses_i386 +++ b/usr/src/pkgdefs/common_files/i.kclasses_i386 @@ -21,11 +21,9 @@ # # -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Copyright 2009 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 @@ -61,6 +59,7 @@ do -e '/^mcis[ ].*scsi/d' \ -e '/^mega[ ].*scsi/d' \ -e '/^mlx[ ].*dada/d' \ + -e '/^mscsi[ ].*scsi/d' \ -e '/^smartii[ ].*dada/d' \ -e '/^trantor[ ].*scsi/d' \ -e '/^corvette[ ].*scsi/d' \ @@ -79,10 +78,6 @@ do if [ $? != 0 ] ; then echo 'pci_pci pci' >> $dest fi - grep '^mscsi[ ].*scsi' $dest > /dev/null 2>&1 - if [ $? != 0 ] ; then - echo 'mscsi scsi' >> $dest - fi grep '^mpt[ ].*scsi' $dest > /dev/null 2>&1 if [ $? != 0 ] ; then echo 'mpt scsi' >> $dest diff --git a/usr/src/tools/scripts/bfu.sh b/usr/src/tools/scripts/bfu.sh index c355c792aa..0f195a95eb 100644 --- a/usr/src/tools/scripts/bfu.sh +++ b/usr/src/tools/scripts/bfu.sh @@ -7448,20 +7448,29 @@ mondo_loop() { rm -f $root/kernel/drv/amd64/cpqhpc # - # Remove 64-bit i2o_bs, i2o_msg, i2o_scsi, pci_to_i2o, mscsi, ncrs, - # msm, spwr, bscv, bscbus + # Remove 64-bit i2o_bs, i2o_msg, i2o_scsi, pci_to_i2o, ncrs, + # spwr, bscv, bscbus # rm -f $root/kernel/drv/amd64/i2o_bs rm -f $root/kernel/misc/amd64/i2o_msg rm -f $root/kernel/drv/amd64/i2o_scsi rm -f $root/kernel/drv/amd64/pci_to_i2o - rm -f $root/platform/i86pc/kernel/drv/amd64/mscsi rm -f $root/kernel/drv/amd64/ncrs - rm -f $root/platform/i86pc/kernel/drv/amd64/msm rm -f $root/kernel/drv/amd64/spwr rm -f $root/platform/i86pc/kernel/drv/amd64/bscv rm -f $root/platform/i86pc/kernel/drv/amd64/bscbus + # Remove obsolete bus mice drivers + rm -f $root/kernel/drv/msm + rm -f $root/platform/i86pc/kernel/drv/amd64/msm + rm -f $root/kernel/drv/logi + rm -f $root/kernel/drv/amd64/logi + + # Remove mscsi + rm -f $root/kernel/drv/mscsi + rm -f $root/kernel/drv/mscsi.conf + rm -f $root/platform/i86pc/kernel/drv/amd64/mscsi + # Remove obsolete pfil modules, binaries, and configuration files rm -f $root/kernel/drv/pfil rm -f $root/kernel/drv/pfil.conf diff --git a/usr/src/uts/common/io/scsi/impl/scsi_hba.c b/usr/src/uts/common/io/scsi/impl/scsi_hba.c index 2b6a7d18e5..4adcadb9d7 100644 --- a/usr/src/uts/common/io/scsi/impl/scsi_hba.c +++ b/usr/src/uts/common/io/scsi/impl/scsi_hba.c @@ -1424,7 +1424,6 @@ scsi_busctl_reportdev(dev_info_t *child) * The node may be either a: * o probe/barrier SID node * o a dynamic SID target node - * o a dynamic SID mscsi node * * driver.conf node: The situation for this nexus is different than most. * Typically a driver.conf node definition is used to either define a diff --git a/usr/src/uts/common/io/vuidmice/vuidm3p.c b/usr/src/uts/common/io/vuidmice/vuidm3p.c index 746abfcbc8..0b399bef72 100644 --- a/usr/src/uts/common/io/vuidmice/vuidm3p.c +++ b/usr/src/uts/common/io/vuidmice/vuidm3p.c @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * 3-Byte Mouse Protocol */ @@ -33,7 +31,7 @@ #include <sys/stream.h> #include <sys/strsun.h> #include <sys/vuid_event.h> -#include <sys/vuidmice.h> +#include "vuidmice.h" #define VUID_BUT(b) BUT((b*2)+1) diff --git a/usr/src/uts/common/io/vuidmice/vuidm4p.c b/usr/src/uts/common/io/vuidmice/vuidm4p.c index 9af020b4af..a9522d0824 100644 --- a/usr/src/uts/common/io/vuidmice/vuidm4p.c +++ b/usr/src/uts/common/io/vuidmice/vuidm4p.c @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * 4-Byte Mouse Protocol */ @@ -33,7 +31,7 @@ #include <sys/stream.h> #include <sys/strsun.h> #include <sys/vuid_event.h> -#include <sys/vuidmice.h> +#include "vuidmice.h" #ifdef VUIDM4P_DEBUG #define VBUF_SIZE 511 diff --git a/usr/src/uts/common/io/vuidmice/vuidm5p.c b/usr/src/uts/common/io/vuidmice/vuidm5p.c index f05a38c849..70a5cfe52c 100644 --- a/usr/src/uts/common/io/vuidmice/vuidm5p.c +++ b/usr/src/uts/common/io/vuidmice/vuidm5p.c @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * 5-Byte Mouse Protocol */ @@ -33,7 +31,7 @@ #include <sys/stream.h> #include <sys/strsun.h> #include <sys/vuid_event.h> -#include <sys/vuidmice.h> +#include "vuidmice.h" #define LOGI_NUMBUTTONS 3 /* Number of buttons */ diff --git a/usr/src/uts/common/io/vuidmice/vuidmice.c b/usr/src/uts/common/io/vuidmice/vuidmice.c index 50182b5343..7e15b6fc52 100644 --- a/usr/src/uts/common/io/vuidmice/vuidmice.c +++ b/usr/src/uts/common/io/vuidmice/vuidmice.c @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * VUIDMICE module: put mouse events into vuid format @@ -39,7 +37,7 @@ #include <sys/cmn_err.h> #include <sys/sad.h> #include <sys/vuid_event.h> -#include <sys/vuidmice.h> +#include "vuidmice.h" #include <sys/vuid_wheel.h> #include <sys/msio.h> diff --git a/usr/src/uts/common/sys/vuidmice.h b/usr/src/uts/common/io/vuidmice/vuidmice.h index 8030e18c3e..7e9ec31305 100644 --- a/usr/src/uts/common/sys/vuidmice.h +++ b/usr/src/uts/common/io/vuidmice/vuidmice.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,18 +19,12 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#ifndef _SYS_VUIDMICE_H -#define _SYS_VUIDMICE_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif +#ifndef _VUIDMICE_H +#define _VUIDMICE_H #if _KERNEL struct MouseStateInfo { @@ -115,8 +108,4 @@ typedef struct Mouse_iocstate { #endif /* _KERNEL */ -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_VUIDMICE_H */ +#endif /* _VUIDMICE_H */ diff --git a/usr/src/uts/common/io/vuidmice/vuidps2.c b/usr/src/uts/common/io/vuidmice/vuidps2.c index eb7787e93c..7a48fd27b8 100644 --- a/usr/src/uts/common/io/vuidmice/vuidps2.c +++ b/usr/src/uts/common/io/vuidmice/vuidps2.c @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * 2/3/5 Button PS/2 Mouse Protocol * @@ -34,7 +32,7 @@ #include <sys/param.h> #include <sys/stream.h> #include <sys/vuid_event.h> -#include <sys/vuidmice.h> +#include "vuidmice.h" #include <sys/vuid_wheel.h> #include <sys/mouse.h> #include <sys/strsun.h> diff --git a/usr/src/uts/common/sys/Makefile b/usr/src/uts/common/sys/Makefile index 75eab6b302..e4a58779d3 100644 --- a/usr/src/uts/common/sys/Makefile +++ b/usr/src/uts/common/sys/Makefile @@ -47,8 +47,6 @@ i386_HDRS= \ fdc.h \ fdmedia.h \ mouse.h \ - mse.h \ - vuidmice.h \ ucode.h sparc_HDRS= \ diff --git a/usr/src/uts/common/sys/mse.h b/usr/src/uts/common/sys/mse.h deleted file mode 100644 index 404bc36a6f..0000000000 --- a/usr/src/uts/common/sys/mse.h +++ /dev/null @@ -1,266 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */ -/* All Rights Reserved */ - -#ifndef _SYS_MSE_H -#define _SYS_MSE_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#define MAX_MSE_UNIT 15 - -/* Hardware interface ports */ -#define DATA_PORT BASE_IOA /* Read only */ -#define SIGNATURE_PORT BASE_IOA + 1 /* Read/write */ -#define INTERRUPT_PORT BASE_IOA + 2 /* Read only */ -#define CONTROL_PORT BASE_IOA + 2 /* Write only */ -#define CONFIGURATOR_PORT BASE_IOA + 3 /* Read/write */ - -/* Control port bits */ -#define INTR_DISABLE 0x10 -#define HIGH_NIBBLE 0x20 -#define LOW_NIBBLE 0x00 -#define X_COUNTER 0x00 -#define Y_COUNTER 0x40 -#define HC 0x80 - -/* Macros to make accessing the BUS mouse ports easier */ -#define data_port (inb(DATA_PORT) & 0xef) -#define control_port(x) (outb(CONTROL_PORT, (x))) - -/* - * This section describes the original mouse.h definitions - * It is included here for the sake of compatibility. - */ - - -/* Base I/O addresses for primary and secondary BUS mouse InPort */ -#define MOUSE1 0x23c -#define MOUSE2 0x238 - -/* Offsets of I/O registers from base */ -#define ADDRREG 0 /* Address register */ -#define DATAREG 1 /* Data register */ -#define IDENTREG 2 /* Identification register */ -#define TESTREG 3 /* Test register */ - -/* Address register definitions */ -#define REGSEL 7 /* Mask for register select bits */ -#define MSTATUS 0 /* Select mouse status register */ -#define DATA1 1 /* Select data register 1 */ -#define DATA2 2 /* Select data register 2 */ -#define DATA3 3 /* Select data register 3 */ -#define DATA4 4 /* Select data register 4 */ -#define ISTATUS 5 /* Select interface status register */ -#define ICNTRL 6 /* Select interface control register */ -#define MODE 7 /* Select mode register */ -#define TESTEN 0x40 /* Enable test register */ -#define RESET 0x80 /* Reset InPort chip */ - -/* Identification register definitions */ -#define SIGN 0xde /* InPort chip signature */ -#define VERS(x) (((x) >> 4) & 15) /* InPort chip version number */ -#define REV(x) ((x) & 15) /* InPort chip revision number */ - -/* Interface status/control register definitions */ -#define SW3 1 -#define SW2 2 -#define SW1 4 -#define XA 0x10 -#define XB 0x20 -#define YA 0x40 -#define YB 0x80 - -/* Mode register definitions */ -#define RATEMASK 7 -#define HZ0NOINTR 0 -#define HZ30 1 -#define HZ50 2 -#define HZ100 3 -#define HZ200 4 -#define HZ0INTR 6 -#define HZEXT 7 -#define DATAINT 8 -#define TIMERINT 0x10 -#define HOLD 0x20 -/* #define MODEMASK 0xc0 */ -#define QUADMODE 0 -#define SYNCHMODE 0x40 -#define ASYNMODE 0x80 -#define DIRMODE 0xc0 - -#define MSE_UNIT(dev) (getminor(dev) % 15) -#define MSE_MINOR(unit, vt) ((((vt) & 7) << 5) | (((vt) & 8) << 1) | (unit)) -#define DISP_UNIT(dev) (getminor(dev) / 15) - -#define MSE_CLONE MSE_MINOR(0, VTMAX) -#define MSE_MON MSE_MINOR(1, VTMAX) -#define MSE_CFG MSE_MINOR(2, VTMAX) - -#define SNDERR 0xfe -#define FAILED (-1) - -struct msecopy { - int state; -}; - -/* - * Mouse button number definitions. - */ - -#define MSE_3_BUTTON 3 /* mouse talks logitech MM data format */ -#define MSE_DEFAULT 4 /* no button definition needed */ - -#ifdef _KERNEL - -/* STREAMS mouse info structure */ -struct strmseinfo { - int msetimeid; - queue_t *rqp; - queue_t *wqp; - struct msecopy copystate; - char state; - uchar_t type; - struct mouseinfo mseinfo; - ddi_iblock_cookie_t iblock; - uchar_t button; - char x; - char y; - char old_buttons; - dev_t dev; - kmutex_t lock; -}; - -#endif - -#define BUS_MAJOR 0 -#define MCA_MAJOR 1 - -#define MBUS 1 -#define M320 2 -#define MSERIAL 3 - -/* Mouse configuration */ - -struct mse_cfg { - struct mousemap *mapping; /* Pointer to mapping table */ - unsigned count; /* # of entries in mapping table */ -}; - - -/* Mouse monitor daemon */ - -struct mse_mon { - int cmd; /* Command from driver to monitor */ - dev_t dev; /* Display station for mouse */ - dev_t mdev; /* Mouse Device */ - uchar_t Errno; /* Error status from action */ -}; - -#define MSE_MGR_OPEN 1 /* Command to open device */ -#define MSE_MGR_CLOSE 2 /* Command to close device */ -#define MSE_MGR_LCLOSE 4 /* Command to last close device */ -#define MGR_WAITING 8 - -/* Structure for mouse information pseudo-ioctl (from mse to display driver) */ - -#define MOUSE_INFO (('M'<<16)|('I'<<8)|99) - - -struct mcastat { - int mode; /* stream or prompt mode */ - int present; - int map_unit; -}; - -/* Per-unit bus mouse configuration info (in mse/space.c) */ - -struct mouseconfig { - unsigned io_addr; /* Base I/O address */ - unsigned ivect; /* Interrupt vector */ - int present; /* Set by detection routine */ - int map_unit; /* Index into mse_mapping[] */ -}; -typedef struct mouseconfig MOUSECNF; - -/* Display-to-mouse mapping table (sent by mouseadmin) */ - -struct mousemap { - dev_t disp_dev, /* Display device id */ - mse_dev; /* Serial mouse device id; */ - /* or makedev(0,unit #) for bus mouse */ - int type; /* type of mouse (MBUS, M320, etc) */ -}; - -typedef struct mousemap MOUSEMAP; - - -/* - * AT&T 320 mouse (8042 controller) I/O port addresses - */ -#define MSE_OUT 0x60 /* output buffer R/O */ -#define MSE_IDAT 0x60 /* input buffer data write W/O */ -#define MSE_STAT 0x64 /* 8042 controller status R/O */ -#define MSE_ICMD 0x64 /* input buffer command write W/O */ - -/* Mouse driver internal status structure kept for each virtual mouse */ -typedef struct { - struct proc *u_procp; - int mse_pid; - int rupted; - int isopen; - char old_buttons; -} MOUSE_STRUCT; - -/* Mouse driver internal status structure kept for each physical mouse */ -typedef struct { - MOUSEMAP map; /* Device assignment info */ - int n_vts; - MOUSE_STRUCT *ms; /* Mouse structs for this mouse */ - struct tty *ttyp; /* TTY struct of serial mouse */ - int old; /* Save old line discipline here */ - int state; /* Serial mse input parsing state */ - int x_ovr; /* 320 overflow state */ - int y_ovr; /* 320 overflow state */ - int status; /* Status of manager command */ -} MOUSE_UNIT; -/* bits in data port indicating button state */ -#define LEFT 0200 /* left button */ -#define MIDDLE 0100 /* middle button */ -#define RIGHT 0040 /* right button */ - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_MSE_H */ diff --git a/usr/src/uts/intel/Makefile.files b/usr/src/uts/intel/Makefile.files index a30fb16787..bed074ca36 100644 --- a/usr/src/uts/intel/Makefile.files +++ b/usr/src/uts/intel/Makefile.files @@ -146,9 +146,6 @@ GDA_OBJS += gda.o GHD_OBJS += ghd.o ghd_debug.o ghd_dma.o ghd_queue.o ghd_scsa.o \ ghd_scsi.o ghd_timer.o ghd_waitq.o ghd_gcmd.o I915_OBJS += i915_dma.o i915_drv.o i915_irq.o i915_mem.o -LOGI_OBJS += logi.o -MSMOUSE_OBJS += msm.o -MSCSI_OBJS += mscsi.o NSKERN_OBJS += nsc_asm.o PCICFG_OBJS += pcicfg.o PCI_E_PCINEXUS_OBJS += pcie_pci.o diff --git a/usr/src/uts/intel/Makefile.intel.shared b/usr/src/uts/intel/Makefile.intel.shared index dbd9de40bd..089da24aa4 100644 --- a/usr/src/uts/intel/Makefile.intel.shared +++ b/usr/src/uts/intel/Makefile.intel.shared @@ -263,15 +263,12 @@ DRV_KMODS += kmdb DRV_KMODS += llc1 DRV_KMODS += lofi DRV_KMODS += log -DRV_KMODS += logi DRV_KMODS += logindmux DRV_KMODS += mega_sas DRV_KMODS += mc-amd DRV_KMODS += mm DRV_KMODS += mouse8042 DRV_KMODS += mr_sas -DRV_KMODS_32 += mscsi -DRV_KMODS_32 += msm DRV_KMODS += nca DRV_KMODS += nsmb DRV_KMODS += nulldriver diff --git a/usr/src/uts/intel/io/logi.c b/usr/src/uts/intel/io/logi.c deleted file mode 100644 index b5c09bbf6c..0000000000 --- a/usr/src/uts/intel/io/logi.c +++ /dev/null @@ -1,730 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * 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. - * 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 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Logitech Mouse Module - Streams - */ - -#include "sys/param.h" -#include "sys/types.h" -#include "sys/kmem.h" -#include "sys/signal.h" -#include "sys/errno.h" -#include "sys/file.h" -#include "sys/termio.h" -#include "sys/stream.h" -#include "sys/stropts.h" -#include "sys/strtty.h" -#include "sys/debug.h" -#include "sys/ddi.h" -#include "sys/cred.h" -#include <sys/stat.h> -#include <sys/sunddi.h> -#include "sys/proc.h" -#include "sys/cmn_err.h" -#include "sys/mouse.h" -#include "sys/mse.h" - -#define PRF printf -struct mouseconfig mse_config = { - 0, 0 -}; - - -/* - * - * Local Static Data - * - */ -#define LOGI_MAXUNIT 1 -#define LOGIUNIT(dev) ((dev) & 0xf) - -#define M_OPEN 1 - -static dev_info_t *logiunits[LOGI_MAXUNIT]; - -static struct driver_minor_data { - char *name; - int minor; - int type; -} logi_minor_data[] = { - {"l", 0, S_IFCHR}, - {0} -}; -int logidevflag = 1; - - -/* - * static struct strmseinfo *logiptr = 0; - */ - -static unsigned BASE_IOA = 0x23C; /* Set to base I/O addr of bus mouse */ - -static uint_t logiintr(); - -static int logiopen(queue_t *q, dev_t *devp, int flag, int sflag, - cred_t *cred_p); -static int logiclose(queue_t *q, int flag, cred_t *cred_p); -static int logi_wput(queue_t *q, mblk_t *mp); -static int logiinfo(dev_info_t *dip, ddi_info_cmd_t infocmd, void *arg, - void **result); -static int logiprobe(dev_info_t *dev); -static int logiattach(dev_info_t *dev, ddi_attach_cmd_t cmd); -static int logidetach(dev_info_t *dev, ddi_detach_cmd_t cmd); -static int logiinit(dev_info_t *dip); - -struct module_info logiminfo = { 23, "logi", 0, INFPSZ, 256, 128}; - -static struct qinit logi_rinit = { - NULL, NULL, logiopen, logiclose, NULL, &logiminfo, NULL}; - -static struct qinit logi_winit = { - logi_wput, NULL, NULL, NULL, NULL, &logiminfo, NULL}; - -struct streamtab logi_info = { &logi_rinit, &logi_winit, NULL, NULL}; - -static int xmotion, /* current position and .. */ - ymotion, /* button status, used .. */ - oldbuttons = 1, - status; /* for DOS mode. */ - -extern int nulldev(), nodev(); -/* - * Local Function Declarations - */ - -struct cb_ops logi_cb_ops = { - nodev, /* open */ - nodev, /* close */ - nodev, /* strategy */ - nodev, /* print */ - nodev, /* dump */ - nodev, /* read */ - nodev, /* write */ - nodev, /* ioctl */ - nodev, /* devmap */ - nodev, /* mmap */ - nodev, /* segmap */ - nochpoll, /* poll */ - ddi_prop_op, /* cb_prop_op */ - (&logi_info), /* streamtab */ - D_NEW | D_MP | D_MTPERMOD /* Driver compatibility flag */ - -}; - - -struct dev_ops logi_ops = { - - DEVO_REV, /* devo_rev, */ - 0, /* refcnt */ - logiinfo, /* info */ - nulldev, /* identify */ - logiprobe, /* probe */ - logiattach, /* attach */ - logidetach, /* detach */ - nodev, /* reset */ - &logi_cb_ops, /* driver operations */ - (struct bus_ops *)0, /* bus operations */ - NULL, /* power */ - ddi_quiesce_not_supported, /* devo_quiesce */ -}; - -#ifndef BUILD_STATIC - -/* - * This is the loadable module wrapper. - */ -#include <sys/modctl.h> - -extern struct mod_ops mod_driverops; - -/* - * Module linkage information for the kernel. - */ - -static struct modldrv modldrv = { - &mod_driverops, /* Type of module. This one is a driver */ - "Logitech Mouse driver", - &logi_ops, /* driver ops */ -}; - -static struct modlinkage modlinkage = { - MODREV_1, - &modldrv, - NULL -}; - - - -/* - * This is the driver initialization routine. - */ -int -_init(void) -{ - int rv; - - rv = mod_install(&modlinkage); - return (rv); -} - - -#ifdef SUNDEV -int -_fini(void) -{ - return (EBUSY); -} -#else -int -_fini(void) -{ - return (mod_remove(&modlinkage)); -} -#endif - -int -_info(struct modinfo *modinfop) -{ - return (mod_info(&modlinkage, modinfop)); -} - -#endif /* !BUILD_STATIC */ - - -static int -logiprobe(dev_info_t *dip) -{ - int unit; - -#ifdef LOGI_DEBUG - if (logi_debug) { - PRF("logiprobe: entry\n"); - } -#endif - - unit = ddi_get_instance(dip); -#ifdef LOGI_DEBUG - if (logi_debug) - PRF("unit is %x\n", unit); -#endif - if (unit >= LOGI_MAXUNIT || logiunits[unit]) - return (DDI_PROBE_FAILURE); - - - return (logiinit(dip)); -} - -/*ARGSUSED*/ -static int -logiattach(dev_info_t *dip, ddi_attach_cmd_t cmd) -{ - int unit; - struct driver_minor_data *dmdp; - struct strmseinfo *logiptr = 0; - -#ifdef LOGI_DEBUG - if (logi_debug) { - PRF("logiattach entry\n"); - } -#endif - switch (cmd) { - case DDI_ATTACH: - unit = ddi_get_instance(dip); - - for (dmdp = logi_minor_data; dmdp->name != NULL; dmdp++) { - if (ddi_create_minor_node(dip, dmdp->name, dmdp->type, - dmdp->minor, DDI_PSEUDO, NULL) == DDI_FAILURE) { - - ddi_remove_minor_node(dip, NULL); - ddi_prop_remove_all(dip); -#ifdef LOGI_DEBUG - if (logi_debug) - PRF("logiattach: " - "ddi_create_minor_node failed\n"); -#endif - return (DDI_FAILURE); - } - } - logiunits[unit] = dip; - /* allocate and initialize state structure */ - logiptr = kmem_zalloc(sizeof (struct strmseinfo), KM_SLEEP); - logiptr->state = 0; /* not opened */ - ddi_set_driver_private(dip, logiptr); - - - if (ddi_add_intr(dip, (uint_t)0, &logiptr->iblock, - (ddi_idevice_cookie_t *)0, logiintr, - (caddr_t)logiptr) != DDI_SUCCESS) { - -#ifdef LOGI_DEBUG - if (logi_debug) - PRF("logiattach: ddi_add_intr failed\n"); -#endif - cmn_err(CE_WARN, "logi: cannot add intr\n"); - return (DDI_FAILURE); - } - - mutex_init(&logiptr->lock, NULL, MUTEX_DRIVER, - (void *)logiptr->iblock); - ddi_report_dev(dip); - return (DDI_SUCCESS); - default: - return (DDI_FAILURE); - } -} - -/* - * logidetach: - */ -/*ARGSUSED*/ -static int -logidetach(dev_info_t *dip, ddi_detach_cmd_t cmd) -{ - dev_info_t *ldevi; - struct strmseinfo *logiptr; - int instance; - - switch (cmd) { - - case DDI_DETACH: - - /* - * check if every instance can be unloaded before actually - * starting to unload this one; this prevents the needless - * detach/re-attach sequence - */ - for (instance = 0; instance < LOGI_MAXUNIT; instance++) { - if (((ldevi = logiunits[instance]) == NULL) || - (logiptr = ddi_get_driver_private(ldevi)) == NULL) - continue; - } - -/* - * Undo what we did in logiattach & logiprobe, freeing resources - * and removing things we installed. The system - * framework guarantees we are not active with this devinfo - * node in any other entry points at this time. - */ - instance = ddi_get_instance(dip); - if ((instance >= LOGI_MAXUNIT) || - (logiptr = ddi_get_driver_private(dip)) == NULL) - return (DDI_FAILURE); - - - logiunits[instance] = 0; - ddi_prop_remove_all(dip); - ddi_remove_minor_node(dip, NULL); - mutex_destroy(&logiptr->lock); - ddi_remove_intr(dip, 0, logiptr->iblock); - kmem_free(logiptr, sizeof (struct strmseinfo)); - return (DDI_SUCCESS); - - default: -#ifdef LOGI_DEBUG - if (logi_debug) { - PRF("logidetach: cmd = %d unknown\n", cmd); - } -#endif - return (DDI_FAILURE); - } -} - - -/* ARGSUSED */ -static int -logiinfo(dev_info_t *dip, ddi_info_cmd_t infocmd, void *arg, void **result) -{ - dev_t dev = (dev_t)arg; - int unit; - dev_info_t *devi; - -#ifdef LOGI_DEBUG - if (logi_debug) - PRF("logiinfo: call\n"); -#endif - if (((unit = LOGIUNIT(dev)) >= LOGI_MAXUNIT) || - (devi = logiunits[unit]) == NULL) - return (DDI_FAILURE); - - switch (infocmd) { - case DDI_INFO_DEVT2DEVINFO: - *result = (void *)devi; - break; - case DDI_INFO_DEVT2INSTANCE: - *result = (void *)(uintptr_t)unit; - break; - default: - return (DDI_FAILURE); - } - return (DDI_SUCCESS); -} - - -static int -logiinit(dev_info_t *dip) -{ - int i; - int ioaddr; - int len; - int old_probe; - -#ifdef LOGI_DEBUG - if (logi_debug) - PRF("logiinit: call BASE_IOA = %x\n", BASE_IOA); -#endif - old_probe = ddi_getprop(DDI_DEV_T_ANY, dip, 0, - "ignore-hardware-nodes", 0); - - if (old_probe) { - len = sizeof (int); - - /* - * check if ioaddr is set in .conf file, it should be. If it - * isn't then try the default i/o addr - */ - if (ddi_prop_op(DDI_DEV_T_ANY, dip, PROP_LEN_AND_VAL_BUF, - DDI_PROP_DONTPASS, "ioaddr", (caddr_t)&ioaddr, - &len) == DDI_PROP_SUCCESS) - BASE_IOA = ioaddr; - } else { - int reglen, nregs; - int i; - struct { - int bustype; - int base; - int size; - } *reglist; - - /* new probe */ - if (ddi_getlongprop(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS, - "reg", (caddr_t)®list, ®len) != DDI_PROP_SUCCESS) - return (DDI_PROBE_FAILURE); - nregs = reglen / sizeof (*reglist); - for (i = 0; i < nregs; i++) - if (reglist[i].bustype == 1) { - ioaddr = reglist[i].base; - BASE_IOA = ioaddr; - break; - } - kmem_free(reglist, reglen); - } -#ifdef LOGI_DEBUG - if (logi_debug) - PRF("logiinit: call BASE_IOA = %x\n", BASE_IOA); -#endif - mse_config.present = 0; - /* Check if the mouse board exists */ - outb(CONFIGURATOR_PORT, 0x91); - drv_usecwait(10); - outb(SIGNATURE_PORT, 0xC); - drv_usecwait(10); - i = inb(SIGNATURE_PORT); - drv_usecwait(10); - outb(SIGNATURE_PORT, 0x50); - drv_usecwait(10); - if (i == 0xC && ((inb(SIGNATURE_PORT)) == 0x50)) { - mse_config.present = 1; -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logiinit:Disable interrupts ioaddr %x\n", BASE_IOA); -#endif - control_port(INTR_DISABLE); /* Disable interrupts */ -#ifdef LOGI_DEBUG - if (logi_debug) - PRF("logiinit: succeeded\n"); -#endif - return (DDI_SUCCESS); - } else { -#ifdef LOGI_DEBUG - if (logi_debug) - PRF("logiinit: failed\n"); -#endif - return (DDI_PROBE_FAILURE); - } -} - -/*ARGSUSED2*/ -static int -logiopen(queue_t *q, dev_t *devp, int flag, int sflag, cred_t *cred_p) -{ - struct strmseinfo *logiptr; - int unit; - dev_info_t *dip; -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logiopen:entered\n"); -#endif - if (((unit = LOGIUNIT(*devp)) >= LOGI_MAXUNIT) || - (dip = logiunits[unit]) == NULL) - return (ENODEV); - - if (!mse_config.present) - return (EIO); - if ((logiptr = ddi_get_driver_private(dip)) == NULL) - return (EIO); - if (logiptr->state & M_OPEN) - return (EBUSY); - mutex_enter(&logiptr->lock); - if (q->q_ptr != NULL) { -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logiopen:already open\n"); -#endif - mutex_exit(&logiptr->lock); - return (EBUSY); /* already attached */ - } - - - q->q_ptr = (caddr_t)logiptr; - WR(q)->q_ptr = (caddr_t)logiptr; - logiptr->rqp = q; - logiptr->wqp = WR(q); - qprocson(q); -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logiopen:Enable interrupts ioaddr %x\n", BASE_IOA); -#endif - control_port(0); /* Enable interrupts */ - -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logiopen:leaving\n"); -#endif - oldbuttons = 0; - logiptr->state = M_OPEN; - mutex_exit(&logiptr->lock); - return (0); -} - - -/*ARGSUSED1*/ -static int -logiclose(queue_t *q, int flag, cred_t *cred_p) -{ - struct strmseinfo *logiptr; - - qprocsoff(q); -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logiclose:entered\n"); -#endif - logiptr = q->q_ptr; - - mutex_enter(&logiptr->lock); -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logiclose:Disable interrupts ioaddr %x\n", BASE_IOA); -#endif - control_port(INTR_DISABLE); /* Disable interrupts */ - q->q_ptr = NULL; - WR(q)->q_ptr = NULL; -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logiclose:leaving\n"); -#endif - logiptr->state = 0; /* Not opened */ - mutex_exit(&logiptr->lock); - return (0); -} - -static int -logi_wput(queue_t *q, mblk_t *mp) -{ - struct iocblk *iocbp; - struct strmseinfo *logiptr; - -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logi_wput:entered\n"); -#endif - logiptr = q->q_ptr; - if (logiptr == 0) { - freemsg(mp); -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logi_wput:logiptr == NULL\n"); -#endif - return (0); - } - iocbp = (struct iocblk *)mp->b_rptr; - switch (mp->b_datap->db_type) { - case M_FLUSH: -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logi_wput:M_FLUSH\n"); -#endif - if (*mp->b_rptr & FLUSHW) - flushq(q, FLUSHDATA); - qreply(q, mp); - break; - case M_IOCTL: -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logi_wput:M_IOCTL\n"); -#endif - mp->b_datap->db_type = M_IOCNAK; - iocbp->ioc_rval = 0; - iocbp->ioc_error = EINVAL; - qreply(q, mp); - break; - case M_IOCDATA: -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logi_wput:M_IOCDATA\n"); -#endif - mp->b_datap->db_type = M_IOCNAK; - iocbp->ioc_rval = 0; - iocbp->ioc_error = EINVAL; - qreply(q, mp); - break; - default: - freemsg(mp); - break; - } -#ifdef LOGI_DEBUG - if (logi_debug) - printf("logi_wput:leaving\n"); -#endif - return (0); -} - -static uint_t -logiintr(caddr_t arg) -{ - int stat = 0; - char x_hi, - x_lo, - y_hi, - y_lo, - buttons, - x, - y; - struct strmseinfo *qp = (struct strmseinfo *)arg; - mblk_t *bp; - - - mutex_enter(&qp->lock); - if (!(qp->state & M_OPEN)) { -#ifdef LOGI_DEBUG - if (logi_debug > 5) - printf("logiintr:Enable interrupts ioaddr %x\n", BASE_IOA); -#endif - control_port(INTR_DISABLE); /* disable interrupts */ - mutex_exit(&qp->lock); - return (DDI_INTR_UNCLAIMED); - } - -/* Get the mouse's status and put it into the appropriate virtual structure */ - control_port(INTR_DISABLE | HC | LOW_NIBBLE | X_COUNTER); - x_lo = data_port; - buttons = x_lo & (LEFT|MIDDLE|RIGHT); /* buttons in high nibble */ - - control_port(INTR_DISABLE | HC | HIGH_NIBBLE | X_COUNTER); - x_hi = data_port; - - control_port(INTR_DISABLE | HC | LOW_NIBBLE | Y_COUNTER); - y_lo = data_port; - - control_port(INTR_DISABLE | HC | HIGH_NIBBLE | Y_COUNTER); - y_hi = (data_port); - - - /* - * Piece the coordinate nibbles together. - */ - x = ((x_hi & 0x0f) << 4) | (x_lo & 0x0f); - y = ((y_hi & 0x0f) << 4) | (y_lo & 0x0f); - - /* figure button change values */ - if ((buttons & LEFT) != (oldbuttons & LEFT)) - stat |= BUT1CHNG; - if ((buttons & MIDDLE) != (oldbuttons & MIDDLE)) - stat |= BUT2CHNG; - if ((buttons & RIGHT) != (oldbuttons & RIGHT)) - stat |= BUT3CHNG; - - - /* now convert button status values */ - /* Note that the bit is 1 if the button is NOT pressed */ - if ((buttons & LEFT) == 0) - stat |= BUT1STAT; - if ((buttons & MIDDLE) == 0) - stat |= BUT2STAT; - if ((buttons & RIGHT) == 0) - stat |= BUT3STAT; - - - /* did movement occur? */ - if (x || y) - stat |= MOVEMENT; - - /* do we need to deal with PACKETDONE ? */ - - /* clear old button status, add in new status */ - status = (status & ~BUTSTATMASK) | stat; - xmotion += x; - ymotion += y; - - if (buttons != oldbuttons || x || y) { - char c; - - /* - * Emulate a Mouse Systems Corp. mouse. - * push buttons, x, y, x-delta, y-delta onto clist - */ - - c = (char)0x80; /* sync byte pattern = 1000 0LMR */ - if (buttons & LEFT) /* not pressed */ - c |= 0x04; - if (buttons & MIDDLE) - c |= 0x02; - if (buttons & RIGHT) - c |= 0x01; - - if ((bp = allocb(5, BPRI_MED)) == NULL) { - mutex_exit(&qp->lock); - return (DDI_INTR_UNCLAIMED); - } - *(bp->b_wptr)++ = c; /* sync */ - *(bp->b_wptr)++ = x; /* x coordinate */ - *(bp->b_wptr)++ = -y; /* y coordinate */ - *(bp->b_wptr)++ = 0; /* delta x */ - *(bp->b_wptr)++ = 0; /* delta y */ - putnext(qp->rqp, bp); - - } - - oldbuttons = buttons; - -/* Re-enable interrupts on the mouse and return */ -#ifdef LOGI_DEBUG - if (logi_debug > 5) - printf("logiintr:Enable interrupts ioaddr %x\n", BASE_IOA); -#endif - control_port(0); - mutex_exit(&qp->lock); - return (DDI_INTR_UNCLAIMED); -} diff --git a/usr/src/uts/intel/io/mscsi.c b/usr/src/uts/intel/io/mscsi.c deleted file mode 100644 index b727af8bb2..0000000000 --- a/usr/src/uts/intel/io/mscsi.c +++ /dev/null @@ -1,246 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * 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. - * 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 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * HBA to MSCSI BUS nexus driver - */ - -/* - * Many newer hba drivers must support multiple scsi-busses. This - * simple, generic nexus driver can be used to create separate instances - * for each scsi-bus, using the following procedure: - * - * 1) hba-parent (mscsi bus driver child attaches to hba driver parent) - * ------------- - * - * a) Set the class of the parent hba driver to "mscsi" (note that - * PSARC approval of the mscsi class must precede this usage). - * b) Set the class of the mscsi bus driver to "scsi" - * c) Place entries in mscsi.conf for each scsi-bus - * - * name="mscsi" class="mscsi" reg=N,0,0 mscsi-bus=N - * - * where N is the required scsi-bus number. - * - * 4) Place special mscsi_hba_* routines in the parent hba driver - * to properly initialize these mscsi_bus nodes to passthru - * SCSA requests. The following properties control the operation - * of the mscsi bus nexus driver. - * - * MSCSI_BUSPROP When set on devinfo node, indicates which - * scsi bus is attaching to an hba-parent. - * - * MSCSI_CALLPROP When set on parent devinfo node, indicates the - * hba-parent requests callbacks through parent - * dev_ops entries to perform initialization, etc. - */ - -#include <sys/types.h> -#include <sys/cmn_err.h> -#include <sys/conf.h> -#include <sys/errno.h> -#include <sys/ddi.h> -#include <sys/sunddi.h> -#include <sys/ddi_impldefs.h> -#include <sys/debug.h> -#include <sys/modctl.h> - -#include <sys/scsi/scsi.h> -#include <sys/dktp/mscsi.h> - -char _depends_on[] = "misc/scsi"; - -int mscsi_forceload = 0; - -static int mscsi_probe(dev_info_t *); -static int mscsi_attach(dev_info_t *devi, ddi_attach_cmd_t cmd); -static int mscsi_detach(dev_info_t *devi, ddi_detach_cmd_t cmd); -static int mscsi_reset(dev_info_t *devi, ddi_reset_cmd_t cmd); -static int mscsi_info(dev_info_t *dip, ddi_info_cmd_t infocmd, - void *arg, void **result); -static int mscsi_quiesce(dev_info_t *devi); - -struct dev_ops mscsi_ops = { - DEVO_REV, /* devo_rev */ - 0, /* refcnt */ - mscsi_info, /* info */ - nulldev, /* identify */ - mscsi_probe, /* probe */ - mscsi_attach, /* attach */ - mscsi_detach, /* detach */ - mscsi_reset, /* reset */ - (struct cb_ops *)0, /* driver operations */ - NULL, /* bus operations */ - NULL, /* power operations */ - mscsi_quiesce, /* quiesce */ -}; - -/* - * Module linkage information for the kernel. - */ - -static struct modldrv modldrv = { - &mod_driverops, /* Type of module */ - "scsi mscsi_bus nexus driver", - &mscsi_ops, /* driver ops */ -}; - -static struct modlinkage modlinkage = { - MODREV_1, - (void *)&modldrv, - NULL -}; - -int -_init(void) -{ - int status; - - if ((status = scsi_hba_init(&modlinkage)) != 0) - return (status); - - if ((status = mod_install(&modlinkage)) != 0) { - scsi_hba_fini(&modlinkage); - return (status); - } - return (status); -} - -int -_fini(void) -{ - int status; - - if ((status = mod_remove(&modlinkage)) == 0) - scsi_hba_fini(&modlinkage); - - return (status); -} - -int -_info(struct modinfo *modinfop) -{ - return (mod_info(&modlinkage, modinfop)); -} - -/*ARGSUSED*/ -static int -mscsi_info(dev_info_t *dip, ddi_info_cmd_t infocmd, void *arg, void **result) -{ - return (DDI_FAILURE); -} - -static int -mscsi_callback(register dev_info_t *devi) -{ - int mscsi_call; - int proplen; - - /* - * Check if MSCSI_CALLPROP property is set on parent. - * And if so prepare to call parent ops entries. - */ - proplen = sizeof (mscsi_call); - if (ddi_getlongprop_buf(DDI_DEV_T_ANY, devi, - DDI_PROP_DONTPASS, MSCSI_CALLPROP, (caddr_t)&mscsi_call, - &proplen) != DDI_PROP_SUCCESS) - return (DDI_FAILURE); - - return (DDI_SUCCESS); -} - -/*ARGSUSED*/ -static int -mscsi_probe(register dev_info_t *devi) -{ - /* check for forced probe failure */ - if (mscsi_forceload < 0) - return (DDI_PROBE_FAILURE); - - return (DDI_PROBE_SUCCESS); -} - -/*ARGSUSED*/ -static int -mscsi_attach(dev_info_t *devi, ddi_attach_cmd_t cmd) -{ - dev_info_t *pdevi = ddi_get_parent(devi); - - /* - * Callback parent dev_ops if parent requests it. - */ - if (mscsi_callback(pdevi) == DDI_SUCCESS) - return ((DEVI(pdevi)->devi_ops->devo_attach)(devi, cmd)); - - (void) ddi_prop_update_string(DDI_DEV_T_NONE, devi, - "mbus_type", MSCSI_NAME); - ddi_report_dev(devi); - return (DDI_SUCCESS); -} - -/*ARGSUSED*/ -static int -mscsi_detach(dev_info_t *devi, ddi_detach_cmd_t cmd) -{ - dev_info_t *pdevi = ddi_get_parent(devi); - - if (mscsi_callback(pdevi) == DDI_SUCCESS) - return ((DEVI(pdevi)->devi_ops->devo_detach)(devi, cmd)); - - return (DDI_SUCCESS); -} - -/*ARGSUSED*/ -static int -mscsi_reset(dev_info_t *devi, ddi_reset_cmd_t cmd) -{ - dev_info_t *pdevi = ddi_get_parent(devi); - - if (mscsi_callback(pdevi) == DDI_SUCCESS) - return ((DEVI(pdevi)->devi_ops->devo_reset)(devi, cmd)); - - return (DDI_SUCCESS); -} - -/* - * quiesce(9E) entry point. - * - * This function is called when the system is single-threaded at high - * PIL with preemption disabled. Therefore, this function must not be - * blocked. - * - * This function returns DDI_SUCCESS on success, or DDI_FAILURE on failure. - * DDI_FAILURE indicates an error condition and should almost never happen. - */ -static int -mscsi_quiesce(dev_info_t *devi) -{ - dev_info_t *pdevi = ddi_get_parent(devi); - - if (mscsi_callback(pdevi) == DDI_SUCCESS) - return ((DEVI(pdevi)->devi_ops->devo_quiesce)(devi)); - - return (DDI_SUCCESS); -} diff --git a/usr/src/uts/intel/io/mscsi.conf b/usr/src/uts/intel/io/mscsi.conf deleted file mode 100644 index 90f721857e..0000000000 --- a/usr/src/uts/intel/io/mscsi.conf +++ /dev/null @@ -1,51 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# 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. -# -# -#pragma ident "%Z%%M% %I% %E% SMI" - -# -# mscsi (multiple scsi-bus) bus nexus driver -# -# Each entry represents a possible scsi bus. Several hba drivers may -# utilize these instances to create children representing each scsi-bus -# on a card. Add more nodes as needed, but don't remove. - -# -# Note: when class "mscsi" is psarc-approved, -# the generic class entries below can be uncommented, and the -# driver-specific entries can be removed. -# - -#name="mscsi" class="mscsi" reg=0,0,0 mscsi-bus=0; -#name="mscsi" class="mscsi" reg=1,0,0 mscsi-bus=1; -#name="mscsi" class="mscsi" reg=2,0,0 mscsi-bus=2; -#name="mscsi" class="mscsi" reg=3,0,0 mscsi-bus=3; -#name="mscsi" class="mscsi" reg=4,0,0 mscsi-bus=4; -#name="mscsi" class="mscsi" reg=5,0,0 mscsi-bus=5; -#name="mscsi" class="mscsi" reg=6,0,0 mscsi-bus=6; -#name="mscsi" class="mscsi" reg=7,0,0 mscsi-bus=7; -#name="mscsi" class="mscsi" reg=8,0,0 mscsi-bus=8; -#name="mscsi" class="mscsi" reg=9,0,0 mscsi-bus=9; diff --git a/usr/src/uts/intel/io/msm.c b/usr/src/uts/intel/io/msm.c deleted file mode 100644 index d7f2d2b5c9..0000000000 --- a/usr/src/uts/intel/io/msm.c +++ /dev/null @@ -1,677 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * 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. - * 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 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Microsoft Bus Mouse Module - Streams - */ - -#include "sys/param.h" -#include "sys/types.h" -#include "sys/kmem.h" -#include "sys/signal.h" -#include "sys/errno.h" -#include "sys/file.h" -#include "sys/termio.h" -#include "sys/stream.h" -#include "sys/stropts.h" -#include "sys/strtty.h" -#include "sys/debug.h" -#include "sys/ddi.h" -#include "sys/cred.h" -#include <sys/stat.h> -#include <sys/modctl.h> -#include <sys/sunddi.h> -#include "sys/proc.h" -#include "sys/cmn_err.h" -#include "sys/mouse.h" -#include "sys/mse.h" - -#define PRF printf - - -/* - * - * Local Static Data - * - */ -#define MSM_MAXUNIT 1 -#define MSMUNIT(dev) ((dev) & 0xf) - -static dev_info_t *msmunits[MSM_MAXUNIT]; - -static struct driver_minor_data { - char *name; - int minor; - int type; -} msm_minor_data[] = { - {"l", 0, S_IFCHR}, - {0} -}; -int msmdevflag = 0; -int msm_debug = 0; - - -/* - * static struct strmseinfo *msmptr = 0; - */ - -static char mousepresent; -static char mouseinuse; -static char mousemode; -static char mousestatus; -static int xmotion, ymotion; -int mouse_base = 0x23c; - - -static uint_t msmintr(caddr_t arg); -static int msmopen(queue_t *q, dev_t *devp, int flag, int sflag, - struct cred *cred_p); -static int msmclose(queue_t *q, int flag, cred_t *cred_p); -static int msm_wput(queue_t *q, mblk_t *mp); - -static int msminit(dev_info_t *dip); -static int msminfo(dev_info_t *dip, ddi_info_cmd_t infocmd, void *arg, - void **result); -static int msmprobe(dev_info_t *dev); -static int msmattach(dev_info_t *dev, ddi_attach_cmd_t cmd); -static int msmdetach(dev_info_t *dev, ddi_detach_cmd_t cmd); - -struct module_info msmminfo = { 23, "msm", 0, INFPSZ, 256, 128}; - -static struct qinit msm_rinit = { - NULL, NULL, msmopen, msmclose, NULL, &msmminfo, NULL}; - -static struct qinit msm_winit = { - msm_wput, NULL, NULL, NULL, NULL, &msmminfo, NULL}; - -struct streamtab msm_info = { &msm_rinit, &msm_winit, NULL, NULL}; - -char msmclosing = 0; -static int xmotion, /* current position and .. */ - ymotion; /* button status, used .. */ - -/* - * Local Function Declarations - */ - -struct cb_ops msm_cb_ops = { - nodev, /* open */ - nodev, /* close */ - nodev, /* strategy */ - nodev, /* print */ - nodev, /* dump */ - nodev, /* read */ - nodev, /* write */ - nodev, /* ioctl */ - nodev, /* devmap */ - nodev, /* mmap */ - nodev, /* segmap */ - nochpoll, /* poll */ - ddi_prop_op, /* cb_prop_op */ - (&msm_info), /* streamtab */ - D_NEW | D_MP | D_MTPERMOD /* Driver compatibility flag */ - -}; - - -struct dev_ops msm_ops = { - - DEVO_REV, /* devo_rev, */ - 0, /* refcnt */ - msminfo, /* info */ - nulldev, /* identify */ - msmprobe, /* probe */ - msmattach, /* attach */ - msmdetach, /* detach */ - nodev, /* reset */ - &msm_cb_ops, /* driver operations */ - (struct bus_ops *)0, /* bus operations */ - NULL, /* power */ - ddi_quiesce_not_supported, /* devo_quiesce */ -}; - -/* - * Module linkage information for the kernel. - */ - -static struct modldrv modldrv = { - &mod_driverops, /* Type of module. This one is a driver */ - "Microsoft Mouse driver", - &msm_ops, /* driver ops */ -}; - -static struct modlinkage modlinkage = { - MODREV_1, - &modldrv, - NULL -}; - - - -/* - * This is the driver initialization routine. - */ -int -_init(void) -{ - int rv; - - rv = mod_install(&modlinkage); - return (rv); -} - - -#ifdef SUNDEV -int -_fini(void) -{ - return (EBUSY); -} -#else -int -_fini(void) -{ - return (mod_remove(&modlinkage)); -} - - -extern struct modctl *mod_getctl(); -extern char *kobj_getmodname(); - -#endif - -int -_info(struct modinfo *modinfop) -{ - return (mod_info(&modlinkage, modinfop)); -} - - -static int -msmprobe(dev_info_t *dip) -{ - int unit; - -#ifdef MSM_DEBUG - if (msm_debug) { - PRF("msmprobe: entry\n"); - } -#endif - - unit = ddi_get_instance(dip); -#ifdef MSM_DEBUG - if (msm_debug) - PRF("unit is %x\n", unit); -#endif - if (unit >= MSM_MAXUNIT || msmunits[unit]) - return (DDI_PROBE_FAILURE); - - return (msminit(dip)); - -} - -/*ARGSUSED*/ -static int -msmattach(dev_info_t *dip, ddi_attach_cmd_t cmd) -{ - int unit; - struct driver_minor_data *dmdp; - struct strmseinfo *msmptr = 0; - -#ifdef MSM_DEBUG - if (msm_debug) { - PRF("msmattach entry\n"); - } -#endif - - if (cmd != DDI_ATTACH) - return (DDI_FAILURE); - - unit = ddi_get_instance(dip); - - for (dmdp = msm_minor_data; dmdp->name != NULL; dmdp++) { - if (ddi_create_minor_node(dip, dmdp->name, dmdp->type, - dmdp->minor, DDI_PSEUDO, NULL) == DDI_FAILURE) { - - ddi_remove_minor_node(dip, NULL); - ddi_prop_remove_all(dip); -#ifdef MSM_DEBUG - if (msm_debug) - PRF("msmattach:" - " ddi_create_minor_node failed\n"); -#endif - return (DDI_FAILURE); - } - } - msmunits[unit] = dip; - - /* allocate and initialize state structure */ - msmptr = kmem_zalloc(sizeof (struct strmseinfo), KM_SLEEP); - msmptr->state = 0; /* not opened */ - ddi_set_driver_private(dip, msmptr); - - if (ddi_add_intr(dip, (uint_t)0, &msmptr->iblock, - (ddi_idevice_cookie_t *)0, msmintr, (caddr_t)msmptr) - != DDI_SUCCESS) { -#ifdef MSM_DEBUG - if (msm_debug) - PRF("msmattach: ddi_add_intr failed\n"); -#endif - cmn_err(CE_WARN, "msm: cannot add intr\n"); - return (DDI_FAILURE); - } - mutex_init(&msmptr->lock, NULL, MUTEX_DRIVER, (void *)msmptr->iblock); - ddi_report_dev(dip); - return (DDI_SUCCESS); -} - -/* - * msmdetach: - */ -/*ARGSUSED*/ -static int -msmdetach(dev_info_t *dip, ddi_detach_cmd_t cmd) -{ - dev_info_t *ldevi; - struct strmseinfo *msmptr; - int instance; - - switch (cmd) { - - case DDI_DETACH: - - /* - * check if every instance can be unloaded before actually - * starting to unload this one; this prevents the needless - * detach/re-attach sequence - */ - for (instance = 0; instance < MSM_MAXUNIT; instance++) { - if (((ldevi = msmunits[instance]) == NULL) || - !(msmptr = ddi_get_driver_private(ldevi))) { - continue; - } - } - -/* - * Undo what we did in msmattach & msmprobe, freeing resources - * and removing things we installed. The system - * framework guarantees we are not active with this devinfo - * node in any other entry points at this time. - */ - instance = ddi_get_instance(dip); - if ((instance >= MSM_MAXUNIT) || - !(msmptr = ddi_get_driver_private(dip))) - return (DDI_FAILURE); - - msmunits[instance] = 0; - ddi_prop_remove_all(dip); - ddi_remove_minor_node(dip, NULL); - mutex_destroy(&msmptr->lock); - ddi_remove_intr(dip, 0, msmptr->iblock); - kmem_free(msmptr, sizeof (struct strmseinfo)); - return (DDI_SUCCESS); - - default: -#ifdef MSM_DEBUG - if (msm_debug) { - PRF("msmdetach: cmd = %d unknown\n", cmd); - } -#endif - return (DDI_FAILURE); - } -} - - -/* ARGSUSED */ -static int -msminfo(dev_info_t *dip, ddi_info_cmd_t infocmd, void *arg, void **result) -{ - dev_t dev = (dev_t)arg; - int unit; - dev_info_t *devi; - -#ifdef MSM_DEBUG - if (msm_debug) - PRF("msminfo: call\n"); -#endif - if ((unit = MSMUNIT(dev)) >= MSM_MAXUNIT || - (devi = msmunits[unit]) == NULL) - return (DDI_FAILURE); - - switch (infocmd) { - case DDI_INFO_DEVT2DEVINFO: - *result = (void *)devi; - break; - case DDI_INFO_DEVT2INSTANCE: - *result = (void *)(uintptr_t)unit; - break; - default: - return (DDI_FAILURE); - } - return (DDI_SUCCESS); -} - - -static int -msminit(dev_info_t *dip) -{ - unsigned char id1, - id2; - int ioaddr; - int old_probe; - - -#ifdef MSM_DEBUG - if (msm_debug) - PRF("msminit: call mouse_base = %x\n", mouse_base); -#endif - old_probe = ddi_getprop(DDI_DEV_T_ANY, dip, 0, - "ignore-hardware-nodes", 0); - - if (old_probe) { - int len = sizeof (int); - - /* - * Check if ioaddr is set in .conf file, it should be. If it - * isn't then try the default i/o addr - */ - if (ddi_prop_op(DDI_DEV_T_ANY, dip, PROP_LEN_AND_VAL_BUF, - DDI_PROP_DONTPASS, "ioaddr", (caddr_t)&ioaddr, - &len) == DDI_PROP_SUCCESS) { - mouse_base = ioaddr; - } - } else { - int reglen, nregs; - int i; - struct { - int bustype; - int base; - int size; - } *reglist; - - /* new probe */ - if (ddi_getlongprop(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS, - "reg", (caddr_t)®list, ®len) != DDI_PROP_SUCCESS) - return (DDI_PROBE_FAILURE); - nregs = reglen / sizeof (*reglist); - for (i = 0; i < nregs; i++) - if (reglist[i].bustype == 1) { - ioaddr = reglist[i].base; - mouse_base = ioaddr; - break; - } - kmem_free(reglist, reglen); - } - - /* - * Try reading the InPort identification register. It should - * alternate between a signature and a version number. - */ - id1 = inb(mouse_base + IDENTREG); - id2 = inb(mouse_base + IDENTREG); - if (id1 != id2 && (id1 == SIGN || id2 == SIGN)) - mousepresent = 1; - else - return (DDI_PROBE_FAILURE); - - /* Reset the mouse to make sure it does not interrupt */ - outb(mouse_base + ADDRREG, RESET | MODE); - -#ifdef MSM_DEBUG - if (msm_debug) - PRF("msminit: succeeded\n"); -#endif - return (DDI_SUCCESS); -} - -/*ARGSUSED2*/ -static int -msmopen(queue_t *q, dev_t *devp, int flag, int sflag, - struct cred *cred_p) -{ - struct strmseinfo *msmptr; - dev_info_t *dip; - int unit; -#ifdef MSM_DEBUG - if (msm_debug) - printf("msmopen:entered\n"); -#endif - if (((unit = MSMUNIT(*devp)) >= MSM_MAXUNIT) || - (dip = msmunits[unit]) == NULL) - return (DDI_FAILURE); - - if (mousepresent == 0) { - return (EIO); - } - if (mouseinuse) { - return (EBUSY); - } - - if (!(msmptr = ddi_get_driver_private(dip))) - - if (q->q_ptr != NULL) { -#ifdef MSM_DEBUG - if (msm_debug) - printf("msmopen:already open\n"); -#endif - return (0); /* already attached */ - } - - mutex_enter(&msmptr->lock); - - q->q_ptr = (caddr_t)msmptr; - WR(q)->q_ptr = (caddr_t)msmptr; - msmptr->rqp = q; - msmptr->wqp = WR(q); - qprocson(q); - -#ifdef MSM_DEBUG - if (msm_debug) - printf("msmopen:leaving\n"); -#endif - mouseinuse = 1; - xmotion = ymotion = 0; - mousestatus = 0; - - /* Set appropriate modes for mouse and enable interrupts */ - mousemode = HZ30 | DATAINT | QUADMODE; - outb(mouse_base + ADDRREG, MODE); - outb(mouse_base + DATAREG, mousemode); - mutex_exit(&msmptr->lock); - return (0); -} - - -/*ARGSUSED1*/ -static int -msmclose(queue_t *q, int flag, cred_t *cred_p) -{ - struct strmseinfo *msmptr; - - qprocsoff(q); -#ifdef MSM_DEBUG - if (msm_debug) - printf("msmclose:entered\n"); -#endif - msmptr = q->q_ptr; - mutex_enter(&msmptr->lock); - q->q_ptr = (caddr_t)NULL; - WR(q)->q_ptr = (caddr_t)NULL; - msmptr->rqp = NULL; - msmptr->wqp = NULL; - /* - * Use to reset the mouse to make sure it does not interrupt - * Now just turn off interrupts, as ATI VGA Wonder XL24 - * appeared to get in a mode where it thought an interrupt was - * delivered, and wouldn't deliver any more after this was done. - */ - mousemode = 0; - outb(mouse_base + ADDRREG, MODE); - outb(mouse_base + DATAREG, mousemode); - mouseinuse = 0; - -#ifdef MSM_DEBUG - if (msm_debug) - printf("msmclose:leaving\n"); -#endif - mutex_exit(&msmptr->lock); - return (0); -} - -static int -msm_wput(queue_t *q, mblk_t *mp) -{ - struct iocblk *iocbp; - struct strmseinfo *msmptr; - -#ifdef MSM_DEBUG - if (msm_debug) - printf("msm_wput:entered\n"); -#endif - msmptr = q->q_ptr; - if (msmptr == 0) { - freemsg(mp); -#ifdef MSM_DEBUG - if (msm_debug) - printf("msm_wput:msmptr == NULL\n"); -#endif - return (0); - } - iocbp = (struct iocblk *)mp->b_rptr; - switch (mp->b_datap->db_type) { - case M_FLUSH: -#ifdef MSM_DEBUG - if (msm_debug) - printf("msm_wput:M_FLUSH\n"); -#endif - if (*mp->b_rptr & FLUSHW) - flushq(q, FLUSHDATA); - qreply(q, mp); - break; - case M_IOCTL: -#ifdef MSM_DEBUG - if (msm_debug) - printf("msm_wput:M_IOCTL\n"); -#endif - mp->b_datap->db_type = M_IOCNAK; - iocbp->ioc_rval = 0; - iocbp->ioc_error = EINVAL; - qreply(q, mp); - break; - case M_IOCDATA: -#ifdef MSM_DEBUG - if (msm_debug) - printf("msm_wput:M_IOCDATA\n"); -#endif - mp->b_datap->db_type = M_IOCNAK; - iocbp->ioc_rval = 0; - iocbp->ioc_error = EINVAL; - qreply(q, mp); - break; - default: - freemsg(mp); - break; - } -#ifdef MSM_DEBUG - if (msm_debug) - printf("msm_wput:leaving\n"); -#endif - return (0); -} - -static uint_t -msmintr(caddr_t arg) -{ - char status, - x, - y; - - struct strmseinfo *qp = (struct strmseinfo *)arg; - mblk_t *bp; - -#ifdef MSM_DEBUG - if (msm_debug > 5) - PRF("msmintr:\n"); -#endif - - if (!qp || (qp->rqp == NULL)) { - return (DDI_INTR_UNCLAIMED); - } - mutex_enter(&qp->lock); - if (!mouseinuse) { - mutex_exit(&qp->lock); - return (DDI_INTR_UNCLAIMED); - } - /* Select mode register and turn on the HOLD data bit */ - outb(mouse_base + ADDRREG, MODE); - outb(mouse_base + DATAREG, mousemode + HOLD); - - /* Select and read the status register */ - outb(mouse_base + ADDRREG, MSTATUS); - status = inb(mouse_base + DATAREG); - - /* if mouse moved, save the motion */ - if (status & MOVEMENT) { - outb(mouse_base + ADDRREG, DATA1); - x = inb(mouse_base + DATAREG); - xmotion += x; - outb(mouse_base + ADDRREG, DATA2); - y = inb(mouse_base + DATAREG); - ymotion += y; - } else - x = y = 0; - mousestatus = status | (mousestatus & ~BUTSTATMASK); - - /* Select mode register and turn off the HOLD data bit */ - outb(mouse_base + ADDRREG, MODE); - outb(mouse_base + DATAREG, mousemode); - - if (status & (MOVEMENT | BUTCHNGMASK)) { - char c; - - c = (char)0x80; /* MSC sync value */ - - if ((status & BUT1STAT) == 0) /* button NOT pressed */ - c |= 0x04; /* left button up */ - if ((status & BUT2STAT) == 0) /* button NOT pressed */ - c |= 0x02; /* middle button up */ - if ((status & BUT3STAT) == 0) /* button NOT pressed */ - c |= 0x01; /* right button up */ - - if ((bp = allocb(5, BPRI_MED)) == NULL) { - mutex_exit(&qp->lock); - return (DDI_INTR_UNCLAIMED); - } - *(bp->b_wptr)++ = c; /* sync */ - *(bp->b_wptr)++ = x; /* x coordinate */ - *(bp->b_wptr)++ = -y; /* y coordinate */ - *(bp->b_wptr)++ = 0; /* delta x */ - *(bp->b_wptr)++ = 0; /* delta y */ - putnext(qp->rqp, bp); - - } - mutex_exit(&qp->lock); - return (DDI_INTR_UNCLAIMED); -} diff --git a/usr/src/uts/intel/logi/Makefile b/usr/src/uts/intel/logi/Makefile deleted file mode 100644 index e50b94600f..0000000000 --- a/usr/src/uts/intel/logi/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# 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 -# -# -# uts/intel/logi/Makefile -# -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# -# This makefile drives the production of the logi driver -# kernel module. -# -# intel architecture dependent -# - -# -# Path to the base of the uts directory tree (usually /usr/src/uts). -# -UTSBASE = ../.. - -# -# Define the module and object file sets. -# -MODULE = logi -OBJECTS = $(LOGI_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(LOGI_OBJS:%.o=$(LINTS_DIR)/%.ln) -ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) - -# -# Include common rules. -# -include $(UTSBASE)/intel/Makefile.intel - -# -# Define targets -# -ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint -INSTALL_TARGET = $(BINARY) $(ROOTMODULE) - -# -# Overrides. -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN - - -# -# 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)/intel/Makefile.targ diff --git a/usr/src/uts/intel/mscsi/Makefile b/usr/src/uts/intel/mscsi/Makefile deleted file mode 100644 index 312ae3a621..0000000000 --- a/usr/src/uts/intel/mscsi/Makefile +++ /dev/null @@ -1,96 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# 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 -# -# -# uts/intel/mscsi/Makefile -# -# Copyright 2007 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 mscsi -# bus nexus driver kernel module. -# -# intel architecture dependent -# - -# -# Path to the base of the uts directory tree (usually /usr/src/uts). -# -UTSBASE = ../.. - -# -# Define the module and object file sets. -# -MODULE = mscsi -OBJECTS = $(MSCSI_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(MSCSI_OBJS:%.o=$(LINTS_DIR)/%.ln) -ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) -CONF_SRCDIR = $(UTSBASE)/intel/io - -# -# Include common rules. -# -include $(UTSBASE)/intel/Makefile.intel - -# -# Define targets -# -ALL_TARGET = $(BINARY) $(CONFMOD) -LINT_TARGET = $(MODULE).lint -INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) - -# -# Overrides -# -DEF_BUILDS = $(DEF_BUILDS32) -ALL_BUILDS = $(ALL_BUILDS32) - -# -# Override defaults to build a unique, local modstubs.o. -# -CFLAGS += -DSUNDDI - -# -# 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)/intel/Makefile.targ diff --git a/usr/src/uts/intel/msm/Makefile b/usr/src/uts/intel/msm/Makefile deleted file mode 100644 index b02a39c5cb..0000000000 --- a/usr/src/uts/intel/msm/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# 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 -# -# -# uts/intel/msmouse/Makefile -# -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# -# This makefile drives the production of the msmouse driver -# kernel module. -# -# intel architecture dependent -# - -# -# Path to the base of the uts directory tree (usually /usr/src/uts). -# -UTSBASE = ../.. - -# -# Define the module and object file sets. -# -MODULE = msm -OBJECTS = $(MSMOUSE_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(MSMOUSE_OBJS:%.o=$(LINTS_DIR)/%.ln) -ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) - -# -# Include common rules. -# -include $(UTSBASE)/intel/Makefile.intel - -# -# Define targets -# -ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint -INSTALL_TARGET = $(BINARY) $(ROOTMODULE) - -# -# Overrides. -# -DEF_BUILDS = $(DEF_BUILDS32) -ALL_BUILDS = $(ALL_BUILDS32) - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN - -# -# 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)/intel/Makefile.targ diff --git a/usr/src/uts/intel/os/driver_classes b/usr/src/uts/intel/os/driver_classes index cf66ff7abc..fa6d0ebe4c 100644 --- a/usr/src/uts/intel/os/driver_classes +++ b/usr/src/uts/intel/os/driver_classes @@ -1,5 +1,5 @@ # -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # CDDL HEADER START @@ -21,10 +21,8 @@ # # CDDL HEADER END # -#ident "%Z%%M% %I% %E% SMI" ata scsi -mscsi scsi isa sysbus eisa sysbus pci pci diff --git a/usr/src/uts/intel/os/master b/usr/src/uts/intel/os/master index 1496fd8988..4bc86e511c 100644 --- a/usr/src/uts/intel/os/master +++ b/usr/src/uts/intel/os/master @@ -185,8 +185,8 @@ AST8250 none mem eisa none "AST Premmia GX Extended Memory Configuration" CPQ4411|CPQ4410|SNIAAC1 ncrs msd eisa ncrs.bef "Compaq 32-Bit Fast-SCSI-2 Controller" CPQ4020 csa msd eisa none "Compaq SMART Array Controller" ICU01F0 mwss oth all mwss.bef "Windows Sound System Compatible" -ICU0210 logi ptr all logi.bef "Logitech bus mouse" -ICU0211 msm ptr all msm.bef "Microsoft bus mouse" +ICU0210 logi ptr all none "Logitech bus mouse" +ICU0211 msm ptr all none "Microsoft bus mouse" ICU0580 tmc msd all none "Future Domain TMC-850 SCSI controller" ICU05F0 usc msd all none "Ultrastor ULTRA14F SCSI Controller" SUN0005 display vid all none "Sub-VGA Display Adapter" diff --git a/usr/src/uts/intel/os/minor_perm b/usr/src/uts/intel/os/minor_perm index 04886a5b1b..e763bbd33c 100644 --- a/usr/src/uts/intel/os/minor_perm +++ b/usr/src/uts/intel/os/minor_perm @@ -51,13 +51,11 @@ lofi:* 0600 root sys lofi:ctl 0644 root sys log:conslog 0666 root sys log:log 0640 root sys -logi:l 0666 root sys mm:allkmem 0600 root sys mm:kmem 0640 root sys mm:mem 0640 root sys mm:null 0666 root sys mm:zero 0666 root sys -msm:l 0666 root sys openeepr:openprom 0640 root sys profile:profile 0644 root sys ptc:* 0666 root sys diff --git a/usr/src/uts/intel/os/name_to_major b/usr/src/uts/intel/os/name_to_major index 4061949d7d..fe4850d74c 100644 --- a/usr/src/uts/intel/os/name_to_major +++ b/usr/src/uts/intel/os/name_to_major @@ -51,8 +51,6 @@ tl 105 asy 106 fdc 111 ata 112 -logi 114 -msm 115 mouse8042 116 isa 120 eisa 121 @@ -63,7 +61,6 @@ DUMMY_DISK 126 DUMMY_NET 127 tnf 128 st 129 -mscsi 130 pm 131 poll 135 keysock 136 diff --git a/usr/src/uts/intel/sys/Makefile b/usr/src/uts/intel/sys/Makefile index 651efc227e..67247eeb77 100644 --- a/usr/src/uts/intel/sys/Makefile +++ b/usr/src/uts/intel/sys/Makefile @@ -97,24 +97,18 @@ HDRS = \ CLOSEDHDRS = \ memtest.h -SUBHDRS = \ - dktp/mscsi.h - ROOTDIR= $(ROOT)/usr/include/sys SCSIDIR= $(ROOTDIR)/scsi SCSIDIRS= $(SCSIDIR) $(SCSIDIR)/conf $(SCSIDIR)/generic \ $(SCSIDIR)/impl $(SCSIDIR)/targets -DKTPDIR= $(ROOTDIR)/dktp -DKTPDIRS= $(DKTPDIR) ROOTFSDIR= $(ROOTDIR)/fs ROOTDIRS= $(ROOTDIR) $(ROOTFSDIR) -ROOTHDRS= $(HDRS:%=$(ROOTDIR)/%) $(SUBHDRS:%=$(ROOTDIR)/%) +ROOTHDRS= $(HDRS:%=$(ROOTDIR)/%) $(CLOSED_BUILD)ROOTHDRS += $(CLOSEDHDRS:%=$(ROOTDIR)/%) CHECKHDRS= \ - $(HDRS:%.h=%.check) \ - $(SUBHDRS:%.h=%.check) + $(HDRS:%.h=%.check) $(CLOSED_BUILD)CHECKHDRS += $(CLOSEDHDRS:%.h=$(CLOSED)/uts/intel/sys/%.check) diff --git a/usr/src/uts/intel/sys/dktp/mscsi.h b/usr/src/uts/intel/sys/dktp/mscsi.h deleted file mode 100644 index bef218c09d..0000000000 --- a/usr/src/uts/intel/sys/dktp/mscsi.h +++ /dev/null @@ -1,74 +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_DKTP_MSCSI_H -#define _SYS_DKTP_MSCSI_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * mscsi_bus header file. Driver private interface - * between a multiple scsi bus hba scsa nexus driver - * and the mscsi-bus nexus driver, which provides - * per-bus support. - */ - -/* - * mbus_ops: mbus nexus drivers only. - * - * This structure provides a wrapper for the generic bus_ops - * structure, allowing mscsi drivers to transparently remap - * bus_ops functions as needed. - * - * Only nexus drivers should use this structure. - * - * m_ops - Replacement struct bus_ops - * m_dops - Saved struct dev_ops - * m_bops - Saved struct bus_ops - * m_private - Any other saved private data - */ - -struct mbus_ops { - struct bus_ops m_ops; /* private struct bus_ops */ - struct dev_ops *m_dops; /* saved struct dev_ops* */ - struct bus_ops *m_bops; /* saved struct bus_ops* */ - void *m_private; /* saved private data */ -}; - -#define MSCSI_FEATURE /* mscsi feature define */ -#define MSCSI_NAME "mscsi" /* nodename of mscsi driver */ -#define MSCSI_BUSPROP "mscsi-bus" /* propertyname of mscsi-bus no. */ -#define MSCSI_CALLPROP "mscsi-call" /* propertyname of callback request */ - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_DKTP_MSCSI_H */ |