Deleted Added
full compact
tdfx_pci.c (104111) tdfx_pci.c (106578)
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 104111 2002-09-28 20:56:32Z phk $
31 * $FreeBSD: head/sys/dev/tdfx/tdfx_pci.c 106578 2002-11-07 21:19:47Z jhb $
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 */

--- 754 unchanged lines hidden (view full) ---

794 * can return -retval and the error should be properly handled.
795 */
796static int
797tdfx_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
798{
799 int retval = 0;
800 struct tdfx_pio_data *piod = (struct tdfx_pio_data*)data;
801#ifdef DEBUG
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 */

--- 754 unchanged lines hidden (view full) ---

794 * can return -retval and the error should be properly handled.
795 */
796static int
797tdfx_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
798{
799 int retval = 0;
800 struct tdfx_pio_data *piod = (struct tdfx_pio_data*)data;
801#ifdef DEBUG
802 printf("IOCTL'd by #%d, cmd: 0x%x, data: 0x%x\n", td->td_proc->p_pid, (u_int32_t)cmd,
803 (unsigned int)piod);
802 printf("IOCTL'd by #%d, cmd: 0x%x, data: %p\n", td->td_proc->p_pid, (u_int32_t)cmd,
803 piod);
804#endif
805 switch(_IOC_TYPE(cmd)) {
806 /* Return the real error if negative, or simply stick the valid return
807 * in td->td_retval */
808 case 0x33:
809 /* The '3'(0x33) type IOCTL is for querying the installed cards */
810 if((retval = tdfx_do_query(cmd, piod)) > 0) td->td_retval[0] = retval;
811 else return -retval;

--- 57 unchanged lines hidden ---
804#endif
805 switch(_IOC_TYPE(cmd)) {
806 /* Return the real error if negative, or simply stick the valid return
807 * in td->td_retval */
808 case 0x33:
809 /* The '3'(0x33) type IOCTL is for querying the installed cards */
810 if((retval = tdfx_do_query(cmd, piod)) > 0) td->td_retval[0] = retval;
811 else return -retval;

--- 57 unchanged lines hidden ---