1dca95b46SColeman Kane /* 2dca95b46SColeman Kane * Copyright (c) 2000 by Coleman Kane <cokane@FreeBSD.org> 3dca95b46SColeman Kane * All rights reserved. 4dca95b46SColeman Kane * 5dca95b46SColeman Kane * Redistribution and use in source and binary forms, with or without 6dca95b46SColeman Kane * modification, are permitted provided that the following conditions 7dca95b46SColeman Kane * are met: 8dca95b46SColeman Kane * 1. Redistributions of source code must retain the above copyright 9dca95b46SColeman Kane * notice, this list of conditions and the following disclaimer. 10dca95b46SColeman Kane * 2. Redistributions in binary form must reproduce the above copyright 11dca95b46SColeman Kane * notice, this list of conditions and the following disclaimer in the 12dca95b46SColeman Kane * documentation and/or other materials provided with the distribution. 13dca95b46SColeman Kane * 3. All advertising materials mentioning features or use of this software 14dca95b46SColeman Kane * must display the following acknowledgement: 15dca95b46SColeman Kane * This product includes software developed by Gardner Buchanan. 16dca95b46SColeman Kane * 4. The name of Gardner Buchanan may not be used to endorse or promote 17dca95b46SColeman Kane * products derived from this software without specific prior written 18dca95b46SColeman Kane * permission. 19dca95b46SColeman Kane * 20dca95b46SColeman Kane * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21dca95b46SColeman Kane * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22dca95b46SColeman Kane * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23dca95b46SColeman Kane * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24dca95b46SColeman Kane * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25dca95b46SColeman Kane * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26dca95b46SColeman Kane * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27dca95b46SColeman Kane * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28dca95b46SColeman Kane * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29dca95b46SColeman Kane * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30dca95b46SColeman Kane * 31dca95b46SColeman Kane * $FreeBSD$ 32dca95b46SColeman Kane */ 33dca95b46SColeman Kane 34dca95b46SColeman Kane 35322bfdc3SMarcel Moolenaar #include <machine/../linux/linux.h> 36322bfdc3SMarcel Moolenaar #include <machine/../linux/linux_proto.h> 37322bfdc3SMarcel Moolenaar #include <compat/linux/linux_ioctl.h> 38dca95b46SColeman Kane 39dca95b46SColeman Kane /* 40dca95b46SColeman Kane * This code was donated by Vladimir N. Silynaev to allow for defining 41dca95b46SColeman Kane * ioctls within modules 42dca95b46SColeman Kane */ 43dca95b46SColeman Kane #define LINUX_IOCTL_SET(n,low,high) \ 44dca95b46SColeman Kane static linux_ioctl_function_t linux_ioctl_##n; \ 45dca95b46SColeman Kane static struct linux_ioctl_handler n##_handler = {linux_ioctl_##n, low, high}; \ 46dca95b46SColeman Kane SYSINIT(n##register, SI_SUB_KLD, SI_ORDER_MIDDLE,\ 47dca95b46SColeman Kane linux_ioctl_register_handler, &n##_handler); \ 48dca95b46SColeman Kane SYSUNINIT(n##unregister, SI_SUB_KLD, SI_ORDER_MIDDLE,\ 49dca95b46SColeman Kane linux_ioctl_unregister_handler, &n##_handler); 507e23685dSColeman Kane 517e23685dSColeman Kane /* Prototype for ioctl wrapper */ 5248f6bffcSColeman Kane /*static int linux_ioctl_tdfx(struct proc* p, struct linux_ioctl_args* 5348f6bffcSColeman Kane * args);*/ 54dca95b46SColeman Kane 55dca95b46SColeman Kane /* Values for /dev/3dfx */ 56dca95b46SColeman Kane /* Query IOCTLs */ 57dca95b46SColeman Kane #define LINUX_IOCTL_TDFX_QUERY_BOARDS 0x3302 58dca95b46SColeman Kane #define LINUX_IOCTL_TDFX_QUERY_FETCH 0x3303 59dca95b46SColeman Kane #define LINUX_IOCTL_TDFX_QUERY_UPDATE 0x3304 60dca95b46SColeman Kane 61dca95b46SColeman Kane #define LINUX_IOCTL_TDFX_MIN 0x3300 62dca95b46SColeman Kane #define LINUX_IOCTL_TDFX_MAX 0x330f 63