/*
* 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
* 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.
*/
/*
* generic mpxio leaf driver
*/
struct dstate {
int oflag;
};
static void *dstates;
#define INST_TO_MINOR(i) (i)
tcli_open, /* open */
tcli_close, /* close */
nodev, /* strategy */
nodev, /* print */
nodev, /* dump */
tcli_read, /* read */
tcli_write, /* write */
tcli_ioctl, /* ioctl */
nodev, /* devmap */
nodev, /* mmap */
nodev, /* segmap */
nochpoll, /* poll */
ddi_prop_op, /* prop_op */
NULL, /* streamtab */
CB_REV, /* cb_rev */
nodev, /* aread */
nodev /* awrite */
};
DEVO_REV, /* devo_rev */
0, /* refcnt */
tcli_info, /* getinfo */
nulldev, /* identify */
nulldev, /* probe */
tcli_attach, /* attach */
tcli_detach, /* detach */
nodev, /* reset */
&tcli_cb_ops, /* driver ops */
(struct bus_ops *)0, /* bus ops */
NULL, /* power */
ddi_quiesce_not_needed, /* quiesce */
};
"vhci client test driver",
};
};
int
_init(void)
{
int e;
if ((e = ddi_soft_state_init(&dstates,
sizeof (struct dstate), 0)) != 0) {
return (e);
}
if ((e = mod_install(&modlinkage)) != 0) {
}
return (e);
}
int
_fini(void)
{
int e;
if ((e = mod_remove(&modlinkage)) != 0) {
return (e);
}
return (e);
}
int
{
}
/*ARGSUSED*/
static int
{
int rval;
if (cmd != DDI_ATTACH)
return (DDI_SUCCESS);
return (DDI_FAILURE);
}
if (rval == DDI_FAILURE) {
return (DDI_FAILURE);
}
return (DDI_SUCCESS);
}
/*ARGSUSED*/
static int
{
int instance;
if (cmd != DDI_DETACH)
return (DDI_SUCCESS);
return (DDI_SUCCESS);
}
/* ARGSUSED */
static int
{
int instance;
if (infocmd != DDI_INFO_DEVT2INSTANCE)
return (DDI_FAILURE);
return (DDI_SUCCESS);
}
/*ARGSUSED*/
static int
{
return (EINVAL);
return (ENXIO);
return (0);
}
/*ARGSUSED*/
static int
{
return (EINVAL);
return (ENXIO);
return (0);
}
/*ARGSUSED*/
static int
int *rvalp)
{
int instance;
return (ENXIO);
return (0);
}
/*ARGSUSED*/
static int
{
return (0);
}
/*ARGSUSED*/
static int
{
return (0);
}