xref: /illumos-gate/usr/src/uts/common/io/conf.c (revision 193974072f41a843678abf5f61979c748687e66b)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*19397407SSherry Moore  * Common Development and Distribution License (the "License").
6*19397407SSherry Moore  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
21*19397407SSherry Moore 
227c478bd9Sstevel@tonic-gate /*
23*19397407SSherry Moore  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24*19397407SSherry Moore  * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate 
287c478bd9Sstevel@tonic-gate #include <sys/types.h>
297c478bd9Sstevel@tonic-gate #include <sys/param.h>
307c478bd9Sstevel@tonic-gate #include <sys/systm.h>
317c478bd9Sstevel@tonic-gate #include <sys/signal.h>
327c478bd9Sstevel@tonic-gate #include <sys/buf.h>
337c478bd9Sstevel@tonic-gate #include <sys/conf.h>
347c478bd9Sstevel@tonic-gate #include <sys/user.h>
357c478bd9Sstevel@tonic-gate #include <sys/proc.h>
367c478bd9Sstevel@tonic-gate #include <sys/file.h>
377c478bd9Sstevel@tonic-gate #include <sys/vnode.h>
387c478bd9Sstevel@tonic-gate #include <sys/acct.h>
397c478bd9Sstevel@tonic-gate #include <sys/stream.h>
407c478bd9Sstevel@tonic-gate #include <sys/ddi.h>
417c478bd9Sstevel@tonic-gate #include <sys/sunddi.h>
427c478bd9Sstevel@tonic-gate 
437c478bd9Sstevel@tonic-gate /*
447c478bd9Sstevel@tonic-gate  * Might need to define no operation routines attach(), detach(),
457c478bd9Sstevel@tonic-gate  * reset(), probe(), identify() and get_dev_info().
467c478bd9Sstevel@tonic-gate  */
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate extern int nopropop();
497c478bd9Sstevel@tonic-gate 
507c478bd9Sstevel@tonic-gate struct cb_ops no_cb_ops = {
517c478bd9Sstevel@tonic-gate 	nodev,		/* open		*/
527c478bd9Sstevel@tonic-gate 	nodev,		/* close 	*/
537c478bd9Sstevel@tonic-gate 	nodev,		/* strategy	*/
547c478bd9Sstevel@tonic-gate 	nodev,		/* print	*/
557c478bd9Sstevel@tonic-gate 	nodev,		/* dump		*/
567c478bd9Sstevel@tonic-gate 	nodev,		/* read		*/
577c478bd9Sstevel@tonic-gate 	nodev,		/* write	*/
587c478bd9Sstevel@tonic-gate 	nodev,		/* ioctl	*/
597c478bd9Sstevel@tonic-gate 	nodev,		/* devmap	*/
607c478bd9Sstevel@tonic-gate 	nodev,		/* mmap		*/
617c478bd9Sstevel@tonic-gate 	nodev,		/* segmap	*/
627c478bd9Sstevel@tonic-gate 	nochpoll,	/* chpoll	*/
637c478bd9Sstevel@tonic-gate 	nopropop,	/* cb_prop_op	*/
647c478bd9Sstevel@tonic-gate 	0,		/* stream tab	*/
657c478bd9Sstevel@tonic-gate 	D_NEW | D_MP	/* char/blk driver compatibility flag */
667c478bd9Sstevel@tonic-gate };
677c478bd9Sstevel@tonic-gate 
687c478bd9Sstevel@tonic-gate struct dev_ops nodev_ops = {
697c478bd9Sstevel@tonic-gate 	DEVO_REV,		/* devo_rev	*/
707c478bd9Sstevel@tonic-gate 	0,			/* refcnt	*/
717c478bd9Sstevel@tonic-gate 	ddi_no_info,		/* info		*/
727c478bd9Sstevel@tonic-gate 	nulldev,		/* identify	*/
737c478bd9Sstevel@tonic-gate 	nulldev,		/* probe	*/
747c478bd9Sstevel@tonic-gate 	ddifail,		/* attach	*/
757c478bd9Sstevel@tonic-gate 	nodev,			/* detach	*/
767c478bd9Sstevel@tonic-gate 	nulldev,		/* reset	*/
777c478bd9Sstevel@tonic-gate 	&no_cb_ops,		/* character/block driver operations */
78*19397407SSherry Moore 	(struct bus_ops *)0,	/* bus operations for nexus drivers */
79*19397407SSherry Moore 	NULL,			/* power */
80*19397407SSherry Moore 	ddi_quiesce_not_needed,		/* quiesce */
817c478bd9Sstevel@tonic-gate };
827c478bd9Sstevel@tonic-gate 
837c478bd9Sstevel@tonic-gate struct dev_ops	**devopsp;
847c478bd9Sstevel@tonic-gate 
857c478bd9Sstevel@tonic-gate int	devcnt;
86