xref: /freebsd/sys/dev/ips/ips_ioctl.h (revision 8a436e75543758d3b9e9c3daa028844af95576d0)
12aedd662SScott Long /*-
22aedd662SScott Long  * Copyright (c) 2002 Adaptec Inc.
32aedd662SScott Long  * All rights reserved.
42aedd662SScott Long  *
52aedd662SScott Long  * Written by: David Jeffery
62aedd662SScott Long  *
72aedd662SScott Long  * Redistribution and use in source and binary forms, with or without
82aedd662SScott Long  * modification, are permitted provided that the following conditions
92aedd662SScott Long  * are met:
102aedd662SScott Long  * 1. Redistributions of source code must retain the above copyright
112aedd662SScott Long  *    notice, this list of conditions and the following disclaimer.
122aedd662SScott Long  * 2. Redistributions in binary form must reproduce the above copyright
132aedd662SScott Long  *    notice, this list of conditions and the following disclaimer in the
142aedd662SScott Long  *    documentation and/or other materials provided with the distribution.
152aedd662SScott Long  *
162aedd662SScott Long  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
172aedd662SScott Long  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
182aedd662SScott Long  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
192aedd662SScott Long  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
202aedd662SScott Long  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
212aedd662SScott Long  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
222aedd662SScott Long  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
232aedd662SScott Long  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
242aedd662SScott Long  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
252aedd662SScott Long  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
262aedd662SScott Long  * SUCH DAMAGE.
272aedd662SScott Long  *
282aedd662SScott Long  * $FreeBSD$
292aedd662SScott Long  */
302aedd662SScott Long 
318a436e75SScott Long #ifndef _IPS_IOCTL_H
328a436e75SScott Long #define _IPS_IOCTL_H
332aedd662SScott Long 
342aedd662SScott Long #include <sys/ioccom.h>
352aedd662SScott Long 
362aedd662SScott Long #define IPS_USER_CMD _IOWR(0x81,0x21,ips_user_request)
372aedd662SScott Long 
382aedd662SScott Long #define IPS_IOCTL_READ	1
392aedd662SScott Long #define IPS_IOCTL_WRITE 2
402aedd662SScott Long 
412aedd662SScott Long #define IPS_REBUILD_STAT_SIZE 116
422aedd662SScott Long #define IPS_SUBSYS_PARAM_SIZE 128
432aedd662SScott Long #define IPS_RW_NVRAM_SIZE 128
442aedd662SScott Long 
452aedd662SScott Long #define IPS_IOCTL_BUFFER_SIZE 4096
462aedd662SScott Long 
478a436e75SScott Long typedef struct ips_user_request{
488a436e75SScott Long 	void *	command_buffer;
498a436e75SScott Long 	void *	data_buffer;
508a436e75SScott Long 	u_int32_t	status;
518a436e75SScott Long }ips_user_request;
528a436e75SScott Long 
538a436e75SScott Long #ifdef _KERNEL
542aedd662SScott Long 
552aedd662SScott Long typedef struct ips_ioctl{
562aedd662SScott Long 	ips_generic_cmd *	command_buffer;
572aedd662SScott Long 	void *			data_buffer;
582aedd662SScott Long 	ips_cmd_status_t	status;
592aedd662SScott Long 	int			datasize;
602aedd662SScott Long 	int			readwrite;
612aedd662SScott Long 	bus_dma_tag_t 		dmatag;
622aedd662SScott Long 	bus_dmamap_t  		dmamap;
632aedd662SScott Long }ips_ioctl_t;
642aedd662SScott Long 
658a436e75SScott Long #endif
668a436e75SScott Long #endif
672aedd662SScott Long 
68