1139749Simp/*- 274534Scokane * Copyright (c) 2000-2001 by Coleman Kane <cokane@FreeBSD.org> 361985Scokane * All rights reserved. 461985Scokane * 561985Scokane * Redistribution and use in source and binary forms, with or without 661985Scokane * modification, are permitted provided that the following conditions 761985Scokane * are met: 861985Scokane * 1. Redistributions of source code must retain the above copyright 961985Scokane * notice, this list of conditions and the following disclaimer. 1061985Scokane * 2. Redistributions in binary form must reproduce the above copyright 1161985Scokane * notice, this list of conditions and the following disclaimer in the 1261985Scokane * documentation and/or other materials provided with the distribution. 1361985Scokane * 3. All advertising materials mentioning features or use of this software 1461985Scokane * must display the following acknowledgement: 1561985Scokane * This product includes software developed by Gardner Buchanan. 1661985Scokane * 4. The name of Gardner Buchanan may not be used to endorse or promote 1761985Scokane * products derived from this software without specific prior written 1861985Scokane * permission. 1961985Scokane * 2061985Scokane * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 2161985Scokane * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2261985Scokane * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2361985Scokane * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2461985Scokane * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2561985Scokane * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2661985Scokane * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2761985Scokane * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2861985Scokane * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2961985Scokane * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3061985Scokane * 3161985Scokane * $FreeBSD: releng/10.2/sys/dev/tdfx/tdfx_linux.h 139749 2005-01-06 01:43:34Z imp $ 3261985Scokane */ 3361985Scokane 3461985Scokane 3564929Smarcel#include <machine/../linux/linux.h> 3664929Smarcel#include <machine/../linux/linux_proto.h> 3764929Smarcel#include <compat/linux/linux_ioctl.h> 3861985Scokane 3961985Scokane/* 4061985Scokane * This code was donated by Vladimir N. Silynaev to allow for defining 4161985Scokane * ioctls within modules 4261985Scokane */ 4361985Scokane#define LINUX_IOCTL_SET(n,low,high) \ 4461985Scokanestatic linux_ioctl_function_t linux_ioctl_##n; \ 4562028Scokanestatic struct linux_ioctl_handler n##_handler = {linux_ioctl_##n, low, high}; \ 4662028ScokaneSYSINIT(n##register, SI_SUB_KLD, SI_ORDER_MIDDLE,\ 4761985Scokanelinux_ioctl_register_handler, &n##_handler); \ 4862028ScokaneSYSUNINIT(n##unregister, SI_SUB_KLD, SI_ORDER_MIDDLE,\ 4961985Scokanelinux_ioctl_unregister_handler, &n##_handler); 5061985Scokane 5161985Scokane/* Values for /dev/3dfx */ 5261985Scokane/* Query IOCTLs */ 5361985Scokane#define LINUX_IOCTL_TDFX_QUERY_BOARDS 0x3302 5461985Scokane#define LINUX_IOCTL_TDFX_QUERY_FETCH 0x3303 5561985Scokane#define LINUX_IOCTL_TDFX_QUERY_UPDATE 0x3304 5661985Scokane 5761985Scokane#define LINUX_IOCTL_TDFX_MIN 0x3300 5861985Scokane#define LINUX_IOCTL_TDFX_MAX 0x330f 59