tdfx_pci.c (95092) | tdfx_pci.c (102003) |
---|---|
1/* 2 * Copyright (c) 2000-2001 by Coleman Kane <cokane@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * | 1/* 2 * Copyright (c) 2000-2001 by Coleman Kane <cokane@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * |
31 * $FreeBSD: head/sys/dev/tdfx/tdfx_pci.c 95092 2002-04-20 01:35:45Z marcel $ | 31 * $FreeBSD: head/sys/dev/tdfx/tdfx_pci.c 102003 2002-08-17 02:36:16Z rwatson $ |
32 */ 33 34/* 3dfx driver for FreeBSD 4.x - Finished 11 May 2000, 12:25AM ET 35 * 36 * Copyright (C) 2000-2001, by Coleman Kane <cokane@FreeBSD.org>, 37 * based upon the 3dfx driver written for linux, by Daryll Straus, Jon Taylor, 38 * and Jens Axboe, located at http://linux.3dfx.com. 39 */ --- 803 unchanged lines hidden (view full) --- 843 char d_pio[2*sizeof(short) + sizeof(int) + sizeof(void*)]; 844 845 struct file *fp; 846 847 if ((error = fget(td, args->fd, &fp)) != 0) 848 return (error); 849 /* We simply copy the data and send it right to ioctl */ 850 copyin((caddr_t)args->arg, &d_pio, sizeof(d_pio)); | 32 */ 33 34/* 3dfx driver for FreeBSD 4.x - Finished 11 May 2000, 12:25AM ET 35 * 36 * Copyright (C) 2000-2001, by Coleman Kane <cokane@FreeBSD.org>, 37 * based upon the 3dfx driver written for linux, by Daryll Straus, Jon Taylor, 38 * and Jens Axboe, located at http://linux.3dfx.com. 39 */ --- 803 unchanged lines hidden (view full) --- 843 char d_pio[2*sizeof(short) + sizeof(int) + sizeof(void*)]; 844 845 struct file *fp; 846 847 if ((error = fget(td, args->fd, &fp)) != 0) 848 return (error); 849 /* We simply copy the data and send it right to ioctl */ 850 copyin((caddr_t)args->arg, &d_pio, sizeof(d_pio)); |
851 error = fo_ioctl(fp, cmd, (caddr_t)&d_pio, td); | 851 error = fo_ioctl(fp, cmd, (caddr_t)&d_pio, td->td_ucred, td); |
852 fdrop(fp, td); 853 return error; 854} 855#endif /* TDFX_LINUX */ 856 857 858/* This is the device driver struct. This is sent to the driver subsystem to 859 * register the method structure and the info strcut space for this particular 860 * instance of the driver. 861 */ 862static driver_t tdfx_driver = { 863 "tdfx", 864 tdfx_methods, 865 sizeof(struct tdfx_softc), 866}; 867 868/* Tell Mr. Kernel about us! */ 869DRIVER_MODULE(tdfx, pci, tdfx_driver, tdfx_devclass, 0, 0); | 852 fdrop(fp, td); 853 return error; 854} 855#endif /* TDFX_LINUX */ 856 857 858/* This is the device driver struct. This is sent to the driver subsystem to 859 * register the method structure and the info strcut space for this particular 860 * instance of the driver. 861 */ 862static driver_t tdfx_driver = { 863 "tdfx", 864 tdfx_methods, 865 sizeof(struct tdfx_softc), 866}; 867 868/* Tell Mr. Kernel about us! */ 869DRIVER_MODULE(tdfx, pci, tdfx_driver, tdfx_devclass, 0, 0); |