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 312aedd662SScott Long 322aedd662SScott Long #include <sys/ioccom.h> 332aedd662SScott Long 342aedd662SScott Long #define IPS_USER_CMD _IOWR(0x81,0x21,ips_user_request) 352aedd662SScott Long 362aedd662SScott Long #define IPS_IOCTL_READ 1 372aedd662SScott Long #define IPS_IOCTL_WRITE 2 382aedd662SScott Long 392aedd662SScott Long #define IPS_REBUILD_STAT_SIZE 116 402aedd662SScott Long #define IPS_SUBSYS_PARAM_SIZE 128 412aedd662SScott Long #define IPS_RW_NVRAM_SIZE 128 422aedd662SScott Long 432aedd662SScott Long #define IPS_IOCTL_BUFFER_SIZE 4096 442aedd662SScott Long 452aedd662SScott Long 462aedd662SScott Long typedef struct ips_ioctl{ 472aedd662SScott Long ips_generic_cmd * command_buffer; 482aedd662SScott Long void * data_buffer; 492aedd662SScott Long ips_cmd_status_t status; 502aedd662SScott Long int datasize; 512aedd662SScott Long int readwrite; 522aedd662SScott Long bus_dma_tag_t dmatag; 532aedd662SScott Long bus_dmamap_t dmamap; 542aedd662SScott Long }ips_ioctl_t; 552aedd662SScott Long 562aedd662SScott Long typedef struct ips_user_request{ 572aedd662SScott Long void * command_buffer; 582aedd662SScott Long void * data_buffer; 592aedd662SScott Long u_int32_t status; 602aedd662SScott Long }ips_user_request; 612aedd662SScott Long 62