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