Home | History | Annotate | Line # | Download | only in mca
      1  1.18  riastrad /*	$NetBSD: edvar.h,v 1.18 2015/04/14 20:32:36 riastradh 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.17     skrll #include <sys/mutex.h>
     33  1.18  riastrad #include <sys/rndsource.h>
     34  1.12        ad 
     35   1.2  jdolecek struct edc_mca_softc;
     36   1.1  jdolecek 
     37   1.1  jdolecek struct ed_softc {
     38  1.16       chs 	device_t sc_dev;
     39   1.1  jdolecek 
     40   1.1  jdolecek 	/* General disk infos */
     41   1.1  jdolecek 	struct disk sc_dk;
     42  1.10      yamt 	struct bufq_state *sc_q;
     43  1.17     skrll 	kmutex_t sc_q_lock;
     44   1.1  jdolecek 
     45   1.6  jdolecek 	struct edc_mca_softc *edc_softc;   /* pointer to our controller */
     46   1.1  jdolecek 
     47   1.9     perry 	int sc_flags;
     48   1.3  jdolecek #define WDF_WLABEL	0x001 /* label is writable */
     49   1.3  jdolecek #define WDF_LABELLING   0x002 /* writing label */
     50   1.3  jdolecek #define WDF_LOADED	0x004 /* parameters loaded */
     51   1.3  jdolecek #define WDF_KLABEL	0x008 /* retain label after 'full' close */
     52   1.6  jdolecek #define EDF_INIT	0x100 /* disk initialized */
     53   1.1  jdolecek 
     54   1.1  jdolecek 	/* actual drive parameters */
     55   1.6  jdolecek 	int sc_capacity;
     56   1.6  jdolecek 	int sc_devno;
     57   1.9     perry 	u_int16_t sense_data[4];	/* sensed drive parameters */
     58   1.1  jdolecek 	u_int16_t cyl;
     59   1.1  jdolecek 	u_int8_t heads;
     60   1.1  jdolecek 	u_int8_t sectors;
     61   1.1  jdolecek 	u_int8_t spares;	/* spares per cylinder */
     62   1.6  jdolecek 	u_int32_t rba;		/* # of RBAs */
     63   1.1  jdolecek 
     64  1.14       tls 	krndsource_t	rnd_source;
     65   1.1  jdolecek };
     66