xref: /onnv-gate/usr/src/uts/common/io/conf.c (revision 7656:2621e50fdf4a)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7656SSherry.Moore@Sun.COM  * Common Development and Distribution License (the "License").
6*7656SSherry.Moore@Sun.COM  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
21*7656SSherry.Moore@Sun.COM 
220Sstevel@tonic-gate /*
23*7656SSherry.Moore@Sun.COM  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24*7656SSherry.Moore@Sun.COM  * Use is subject to license terms.
250Sstevel@tonic-gate  */
260Sstevel@tonic-gate 
270Sstevel@tonic-gate 
280Sstevel@tonic-gate #include <sys/types.h>
290Sstevel@tonic-gate #include <sys/param.h>
300Sstevel@tonic-gate #include <sys/systm.h>
310Sstevel@tonic-gate #include <sys/signal.h>
320Sstevel@tonic-gate #include <sys/buf.h>
330Sstevel@tonic-gate #include <sys/conf.h>
340Sstevel@tonic-gate #include <sys/user.h>
350Sstevel@tonic-gate #include <sys/proc.h>
360Sstevel@tonic-gate #include <sys/file.h>
370Sstevel@tonic-gate #include <sys/vnode.h>
380Sstevel@tonic-gate #include <sys/acct.h>
390Sstevel@tonic-gate #include <sys/stream.h>
400Sstevel@tonic-gate #include <sys/ddi.h>
410Sstevel@tonic-gate #include <sys/sunddi.h>
420Sstevel@tonic-gate 
430Sstevel@tonic-gate /*
440Sstevel@tonic-gate  * Might need to define no operation routines attach(), detach(),
450Sstevel@tonic-gate  * reset(), probe(), identify() and get_dev_info().
460Sstevel@tonic-gate  */
470Sstevel@tonic-gate 
480Sstevel@tonic-gate extern int nopropop();
490Sstevel@tonic-gate 
500Sstevel@tonic-gate struct cb_ops no_cb_ops = {
510Sstevel@tonic-gate 	nodev,		/* open		*/
520Sstevel@tonic-gate 	nodev,		/* close 	*/
530Sstevel@tonic-gate 	nodev,		/* strategy	*/
540Sstevel@tonic-gate 	nodev,		/* print	*/
550Sstevel@tonic-gate 	nodev,		/* dump		*/
560Sstevel@tonic-gate 	nodev,		/* read		*/
570Sstevel@tonic-gate 	nodev,		/* write	*/
580Sstevel@tonic-gate 	nodev,		/* ioctl	*/
590Sstevel@tonic-gate 	nodev,		/* devmap	*/
600Sstevel@tonic-gate 	nodev,		/* mmap		*/
610Sstevel@tonic-gate 	nodev,		/* segmap	*/
620Sstevel@tonic-gate 	nochpoll,	/* chpoll	*/
630Sstevel@tonic-gate 	nopropop,	/* cb_prop_op	*/
640Sstevel@tonic-gate 	0,		/* stream tab	*/
650Sstevel@tonic-gate 	D_NEW | D_MP	/* char/blk driver compatibility flag */
660Sstevel@tonic-gate };
670Sstevel@tonic-gate 
680Sstevel@tonic-gate struct dev_ops nodev_ops = {
690Sstevel@tonic-gate 	DEVO_REV,		/* devo_rev	*/
700Sstevel@tonic-gate 	0,			/* refcnt	*/
710Sstevel@tonic-gate 	ddi_no_info,		/* info		*/
720Sstevel@tonic-gate 	nulldev,		/* identify	*/
730Sstevel@tonic-gate 	nulldev,		/* probe	*/
740Sstevel@tonic-gate 	ddifail,		/* attach	*/
750Sstevel@tonic-gate 	nodev,			/* detach	*/
760Sstevel@tonic-gate 	nulldev,		/* reset	*/
770Sstevel@tonic-gate 	&no_cb_ops,		/* character/block driver operations */
78*7656SSherry.Moore@Sun.COM 	(struct bus_ops *)0,	/* bus operations for nexus drivers */
79*7656SSherry.Moore@Sun.COM 	NULL,			/* power */
80*7656SSherry.Moore@Sun.COM 	ddi_quiesce_not_needed,		/* quiesce */
810Sstevel@tonic-gate };
820Sstevel@tonic-gate 
830Sstevel@tonic-gate struct dev_ops	**devopsp;
840Sstevel@tonic-gate 
850Sstevel@tonic-gate int	devcnt;
86