summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel
diff options
context:
space:
mode:
authorGarrett D'Amore <gdamore@opensolaris.org>2009-06-10 17:16:45 -0700
committerGarrett D'Amore <gdamore@opensolaris.org>2009-06-10 17:16:45 -0700
commit57f4a14abf7408570afb91750e10e4b57f721549 (patch)
treee6bb38fef0927e7c56d974a651b64b10739ebe5c /usr/src/uts/intel
parent0ad0f0b2adb964c7bd56bbf5a831721e1a67beaf (diff)
downloadillumos-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
Diffstat (limited to 'usr/src/uts/intel')
-rw-r--r--usr/src/uts/intel/Makefile.files3
-rw-r--r--usr/src/uts/intel/Makefile.intel.shared3
-rw-r--r--usr/src/uts/intel/io/logi.c730
-rw-r--r--usr/src/uts/intel/io/mscsi.c246
-rw-r--r--usr/src/uts/intel/io/mscsi.conf51
-rw-r--r--usr/src/uts/intel/io/msm.c677
-rw-r--r--usr/src/uts/intel/logi/Makefile94
-rw-r--r--usr/src/uts/intel/mscsi/Makefile96
-rw-r--r--usr/src/uts/intel/msm/Makefile97
-rw-r--r--usr/src/uts/intel/os/driver_classes4
-rw-r--r--usr/src/uts/intel/os/master4
-rw-r--r--usr/src/uts/intel/os/minor_perm2
-rw-r--r--usr/src/uts/intel/os/name_to_major3
-rw-r--r--usr/src/uts/intel/sys/Makefile10
-rw-r--r--usr/src/uts/intel/sys/dktp/mscsi.h74
15 files changed, 5 insertions, 2089 deletions
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)&reglist, &reglen) != 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)&reglist, &reglen) != 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 */