cdvar.h revision 1.27.28.2 1 1.27.28.2 ad /* $NetBSD: cdvar.h,v 1.27.28.2 2007/07/21 19:51:49 ad Exp $ */
2 1.27.28.2 ad
3 1.27.28.2 ad /*
4 1.27.28.2 ad * Copyright (c) 1997 Manuel Bouyer. All rights reserved.
5 1.27.28.2 ad *
6 1.27.28.2 ad * Redistribution and use in source and binary forms, with or without
7 1.27.28.2 ad * modification, are permitted provided that the following conditions
8 1.27.28.2 ad * are met:
9 1.27.28.2 ad * 1. Redistributions of source code must retain the above copyright
10 1.27.28.2 ad * notice, this list of conditions and the following disclaimer.
11 1.27.28.2 ad * 2. Redistributions in binary form must reproduce the above copyright
12 1.27.28.2 ad * notice, this list of conditions and the following disclaimer in the
13 1.27.28.2 ad * documentation and/or other materials provided with the distribution.
14 1.27.28.2 ad * 3. All advertising materials mentioning features or use of this software
15 1.27.28.2 ad * must display the following acknowledgement:
16 1.27.28.2 ad * This product includes software developed by Manuel Bouyer.
17 1.27.28.2 ad * 4. The name of the author may not be used to endorse or promote products
18 1.27.28.2 ad * derived from this software without specific prior written permission.
19 1.27.28.2 ad *
20 1.27.28.2 ad * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 1.27.28.2 ad * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 1.27.28.2 ad * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 1.27.28.2 ad * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 1.27.28.2 ad * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 1.27.28.2 ad * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 1.27.28.2 ad * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 1.27.28.2 ad * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 1.27.28.2 ad * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 1.27.28.2 ad * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 1.27.28.2 ad */
31 1.27.28.2 ad
32 1.27.28.2 ad #define CDRETRIES 4
33 1.27.28.2 ad
34 1.27.28.2 ad struct cd_softc {
35 1.27.28.2 ad struct device sc_dev;
36 1.27.28.2 ad struct disk sc_dk;
37 1.27.28.2 ad kmutex_t sc_lock;
38 1.27.28.2 ad
39 1.27.28.2 ad int flags;
40 1.27.28.2 ad #define CDF_WLABEL 0x04 /* label is writable */
41 1.27.28.2 ad #define CDF_LABELLING 0x08 /* writing label */
42 1.27.28.2 ad #define CDF_ANCIENT 0x10 /* disk is ancient; for minphys */
43 1.27.28.2 ad
44 1.27.28.2 ad struct scsipi_periph *sc_periph;
45 1.27.28.2 ad
46 1.27.28.2 ad struct cd_parms {
47 1.27.28.2 ad u_int blksize;
48 1.27.28.2 ad u_long disksize; /* total number sectors */
49 1.27.28.2 ad u_long disksize512; /* total number sectors */
50 1.27.28.2 ad } params;
51 1.27.28.2 ad
52 1.27.28.2 ad struct bufq_state *buf_queue;
53 1.27.28.2 ad struct callout sc_callout;
54 1.27.28.2 ad
55 1.27.28.2 ad #if NRND > 0
56 1.27.28.2 ad rndsource_element_t rnd_source;
57 1.27.28.2 ad #endif
58 1.27.28.2 ad };
59