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