Home | History | Annotate | Line # | Download | only in i2o
i2odpt.h revision 1.4.2.1
      1  1.4.2.1  wrstuden /*	$NetBSD: i2odpt.h,v 1.4.2.1 2008/09/24 16:38:52 wrstuden Exp $	*/
      2      1.1        ad 
      3      1.1        ad /*-
      4      1.1        ad  * Copyright (c) 2001 The NetBSD Foundation, Inc.
      5      1.1        ad  * All rights reserved.
      6      1.1        ad  *
      7      1.1        ad  * This code is derived from software contributed to The NetBSD Foundation
      8      1.1        ad  * by Andrew Doran.
      9      1.1        ad  *
     10      1.1        ad  * Redistribution and use in source and binary forms, with or without
     11      1.1        ad  * modification, are permitted provided that the following conditions
     12      1.1        ad  * are met:
     13      1.1        ad  * 1. Redistributions of source code must retain the above copyright
     14      1.1        ad  *    notice, this list of conditions and the following disclaimer.
     15      1.1        ad  * 2. Redistributions in binary form must reproduce the above copyright
     16      1.1        ad  *    notice, this list of conditions and the following disclaimer in the
     17      1.1        ad  *    documentation and/or other materials provided with the distribution.
     18      1.1        ad  *
     19      1.1        ad  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20      1.1        ad  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21      1.1        ad  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22      1.1        ad  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23      1.1        ad  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24      1.1        ad  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25      1.1        ad  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26      1.1        ad  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27      1.1        ad  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28      1.1        ad  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29      1.1        ad  * POSSIBILITY OF SUCH DAMAGE.
     30      1.1        ad  */
     31      1.1        ad 
     32      1.1        ad /*
     33      1.1        ad  * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
     34      1.1        ad  * Copyright (c) 2000 Adaptec Corporation.
     35      1.1        ad  * All rights reserved.
     36      1.1        ad  *
     37      1.1        ad  * Redistribution and use in source form, with or without modification, are
     38      1.1        ad  * permitted provided that redistributions of source code must retain the
     39      1.1        ad  * above copyright notice, this list of conditions and the following disclaimer.
     40      1.1        ad  *
     41      1.1        ad  * This software is provided `as is' by Distributed Processing Technology and
     42      1.1        ad  * any express or implied warranties, including, but not limited to, the
     43      1.1        ad  * implied warranties of merchantability and fitness for a particular purpose,
     44      1.1        ad  * are disclaimed. In no event shall Distributed Processing Technology be
     45      1.1        ad  * liable for any direct, indirect, incidental, special, exemplary or
     46      1.1        ad  * consequential damages (including, but not limited to, procurement of
     47      1.1        ad  * substitute goods or services; loss of use, data, or profits; or business
     48      1.1        ad  * interruptions) however caused and on any theory of liability, whether in
     49      1.1        ad  * contract, strict liability, or tort (including negligence or otherwise)
     50      1.1        ad  * arising in any way out of the use of this driver software, even if advised
     51      1.1        ad  * of the possibility of such damage.
     52      1.1        ad  *
     53      1.1        ad  */
     54      1.1        ad 
     55      1.1        ad #ifndef _I2O_I2ODPT_H_
     56      1.1        ad #define	_I2O_I2ODPT_H_
     57      1.1        ad 
     58      1.1        ad /*
     59      1.1        ad  * ================= Messages =================
     60      1.1        ad  */
     61      1.1        ad 
     62      1.1        ad #define	I2O_DPT_SCSI_SCB_EXEC		I2O_SCSI_SCB_EXEC
     63      1.1        ad struct i2o_dpt_scsi_scb_exec {
     64      1.1        ad 	u_int32_t	msgflags;
     65      1.1        ad 	u_int32_t	msgictx;
     66      1.1        ad 	u_int32_t	msgtctx;
     67      1.1        ad 	u_int32_t	privfunc;
     68      1.1        ad 	u_int32_t	tid;		/* bit 16: interpret; bit 17: phys */
     69      1.1        ad 	u_int32_t	flags;
     70      1.1        ad 	u_int32_t	scbflags;
     71      1.1        ad 	u_int8_t	cdb[16];
     72      1.1        ad 	u_int32_t	bytecount;
     73  1.4.2.1  wrstuden } __packed;
     74      1.1        ad 
     75      1.1        ad #define	I2O_DPT_FLASH_REGION_SIZE	0x0100
     76      1.1        ad #define	I2O_DPT_FLASH_REGION_READ	0x0101
     77      1.1        ad #define	I2O_DPT_FLASH_REGION_WRITE	0x0102
     78      1.1        ad #define	I2O_DPT_FLASH_REGION_CRC	0x0103
     79      1.1        ad struct i2o_dpt_flash_region {
     80      1.1        ad 	u_int32_t	msgflags;
     81      1.1        ad 	u_int32_t	msgfunc;
     82      1.1        ad 	u_int32_t	msgictx;
     83      1.1        ad 	u_int32_t	msgtctx;
     84      1.1        ad 	u_int32_t	privfunc;
     85      1.1        ad 	u_int32_t	region;
     86      1.1        ad 	u_int32_t	regionoffset;
     87      1.1        ad 	u_int32_t	bytecount;
     88  1.4.2.1  wrstuden } __packed;
     89      1.1        ad 
     90      1.1        ad #define	DPT_FLASH_REGION_OP_FIRMWARE	0x00
     91      1.1        ad #define	DPT_FLASH_REGION_SOFTWARE	0x01
     92      1.1        ad #define	DPT_FLASH_REGION_OEM_NVRAM	0x02
     93      1.1        ad #define	DPT_FLASH_REGION_SERIAL		0x03
     94      1.1        ad #define	DPT_FLASH_REGION_BOOT_FIRMWARE	0x04
     95      1.1        ad 
     96      1.1        ad #define	I2O_DPT_DRIVER_PRINTF		0x0200
     97      1.1        ad struct i2o_dpt_driver_printf {
     98      1.1        ad 	u_int32_t	msgflags;
     99      1.1        ad 	u_int32_t	msgfunc;
    100      1.1        ad 	u_int32_t	msgictx;
    101      1.1        ad 	u_int32_t	msgtctx;
    102      1.1        ad 	u_int32_t	privfunc;
    103      1.1        ad 	u_int32_t	printbuffersize;
    104      1.1        ad 	u_int8_t	printbuffer[1];
    105  1.4.2.1  wrstuden } __packed;
    106      1.1        ad 
    107      1.1        ad #define	I2O_DPT_DIAG_ENABLE		0x0201
    108      1.1        ad struct i2o_dpt_diag_enable {
    109      1.1        ad 	u_int32_t	msgflags;
    110      1.1        ad 	u_int32_t	msgfunc;
    111      1.1        ad 	u_int32_t	msgictx;
    112      1.1        ad 	u_int32_t	msgtctx;
    113      1.1        ad 	u_int32_t	privfunc;
    114  1.4.2.1  wrstuden } __packed;
    115      1.1        ad 
    116      1.1        ad #define	I2O_DPT_DRIVER_GET		0x0300
    117      1.1        ad struct i2o_dpt_driver_get {
    118      1.1        ad 	u_int32_t	msgflags;
    119      1.1        ad 	u_int32_t	msgfunc;
    120      1.1        ad 	u_int32_t	msgictx;
    121      1.1        ad 	u_int32_t	msgtctx;
    122      1.1        ad 	u_int32_t	privfunc;
    123      1.1        ad 	u_int32_t	offset;
    124      1.1        ad 	u_int32_t	bytecount;
    125      1.1        ad 
    126      1.1        ad 	/* SGL follows. */
    127  1.4.2.1  wrstuden } __packed;
    128      1.1        ad 
    129      1.1        ad #define	I2O_DPT_DRIVER_SET		0x0301
    130      1.1        ad struct i2o_dpt_driver_set {
    131      1.1        ad 	u_int32_t	msgflags;
    132      1.1        ad 	u_int32_t	msgfunc;
    133      1.1        ad 	u_int32_t	msgictx;
    134      1.1        ad 	u_int32_t	msgtctx;
    135      1.1        ad 	u_int32_t	privfunc;
    136      1.1        ad 	u_int32_t	offset;
    137      1.1        ad 	u_int32_t	bytecount;
    138      1.1        ad 
    139      1.1        ad 	/* SGL follows. */
    140  1.4.2.1  wrstuden } __packed;
    141      1.1        ad 
    142      1.1        ad /*
    143      1.1        ad  * ================= Parameter groups =================
    144      1.1        ad  */
    145      1.2     perry 
    146      1.1        ad #define	I2O_DPT_PARAM_DEVICE_INFO	0x8000
    147      1.1        ad struct i2o_dpt_param_device_info {
    148      1.1        ad 	u_int8_t	devicetype;	/* as I2O_PARAM_SCSI_DEVICE_INFO */
    149      1.1        ad 	u_int8_t	flags;		/* as I2O_PARAM_SCSI_DEVICE_INFO */
    150      1.1        ad 	u_int16_t	bus;
    151      1.1        ad 	u_int32_t	identifier;
    152      1.1        ad 	u_int8_t	luninfo[8];
    153  1.4.2.1  wrstuden } __packed;
    154      1.1        ad 
    155      1.1        ad #define	I2O_DPT_PARAM_EXEC_IOP_BUFFERS	0x8000
    156      1.1        ad struct i2o_dpt_param_exec_iop_buffers {
    157      1.1        ad 	u_int32_t	serialoutputoff;
    158      1.1        ad 	u_int32_t	serialoutputsize;
    159      1.1        ad 	u_int32_t	serialheadersize;
    160      1.1        ad 	u_int32_t	serialflagssupported;
    161  1.4.2.1  wrstuden } __packed;
    162      1.1        ad 
    163      1.1        ad #endif	/* _I2O_I2ODPT_H_ */
    164