edvar.h revision 1.13 1 1.13 martin /* $NetBSD: edvar.h,v 1.13 2008/05/04 13:11:14 martin Exp $ */
2 1.1 jdolecek
3 1.1 jdolecek /*
4 1.1 jdolecek * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 1.13 martin * All rights reserved.
6 1.1 jdolecek *
7 1.1 jdolecek * This code is derived from software contributed to The NetBSD Foundation
8 1.1 jdolecek * by Jaromir Dolecek.
9 1.1 jdolecek *
10 1.1 jdolecek * Redistribution and use in source and binary forms, with or without
11 1.1 jdolecek * modification, are permitted provided that the following conditions
12 1.1 jdolecek * are met:
13 1.1 jdolecek * 1. Redistributions of source code must retain the above copyright
14 1.1 jdolecek * notice, this list of conditions and the following disclaimer.
15 1.1 jdolecek * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 jdolecek * notice, this list of conditions and the following disclaimer in the
17 1.1 jdolecek * documentation and/or other materials provided with the distribution.
18 1.1 jdolecek *
19 1.13 martin * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 1.13 martin * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 1.13 martin * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 1.13 martin * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 1.13 martin * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 1.13 martin * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 1.13 martin * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 1.13 martin * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 1.13 martin * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 1.13 martin * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 1.13 martin * POSSIBILITY OF SUCH DAMAGE.
30 1.1 jdolecek */
31 1.1 jdolecek
32 1.12 ad #include <sys/simplelock.h>
33 1.12 ad
34 1.2 jdolecek struct edc_mca_softc;
35 1.1 jdolecek
36 1.1 jdolecek struct ed_softc {
37 1.1 jdolecek struct device sc_dev;
38 1.1 jdolecek
39 1.1 jdolecek /* General disk infos */
40 1.1 jdolecek struct disk sc_dk;
41 1.10 yamt struct bufq_state *sc_q;
42 1.1 jdolecek struct simplelock sc_q_lock;
43 1.1 jdolecek
44 1.6 jdolecek struct edc_mca_softc *edc_softc; /* pointer to our controller */
45 1.1 jdolecek
46 1.9 perry int sc_flags;
47 1.3 jdolecek #define WDF_WLABEL 0x001 /* label is writable */
48 1.3 jdolecek #define WDF_LABELLING 0x002 /* writing label */
49 1.3 jdolecek #define WDF_LOADED 0x004 /* parameters loaded */
50 1.3 jdolecek #define WDF_KLABEL 0x008 /* retain label after 'full' close */
51 1.6 jdolecek #define EDF_INIT 0x100 /* disk initialized */
52 1.1 jdolecek
53 1.1 jdolecek /* actual drive parameters */
54 1.6 jdolecek int sc_capacity;
55 1.6 jdolecek int sc_devno;
56 1.9 perry u_int16_t sense_data[4]; /* sensed drive parameters */
57 1.1 jdolecek u_int16_t cyl;
58 1.1 jdolecek u_int8_t heads;
59 1.1 jdolecek u_int8_t sectors;
60 1.1 jdolecek u_int8_t spares; /* spares per cylinder */
61 1.6 jdolecek u_int32_t rba; /* # of RBAs */
62 1.1 jdolecek
63 1.1 jdolecek #if NRND > 0
64 1.1 jdolecek rndsource_element_t rnd_source;
65 1.1 jdolecek #endif
66 1.1 jdolecek };
67