Deleted Added
full compact
tdfx_pci.c (119418) tdfx_pci.c (119690)
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

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

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
32#include <sys/cdefs.h>
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

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

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
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/dev/tdfx/tdfx_pci.c 119418 2003-08-24 17:55:58Z obrien $");
33__FBSDID("$FreeBSD: head/sys/dev/tdfx/tdfx_pci.c 119690 2003-09-02 17:30:40Z jhb $");
34
35/* 3dfx driver for FreeBSD 4.x - Finished 11 May 2000, 12:25AM ET
36 *
37 * Copyright (C) 2000-2001, by Coleman Kane <cokane@FreeBSD.org>,
38 * based upon the 3dfx driver written for linux, by Daryll Straus, Jon Taylor,
39 * and Jens Axboe, located at http://linux.3dfx.com.
40 */
41

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

153 * up memory writes. The last thing is to register the character device
154 * interface to the card, so we can open it from /dev/3dfxN, where N is a
155 * small, whole number.
156 */
157 struct tdfx_softc *tdfx_info;
158 u_long val;
159 /* rid value tells bus_alloc_resource where to find the addresses of ports or
160 * of memory ranges in the PCI config space*/
34
35/* 3dfx driver for FreeBSD 4.x - Finished 11 May 2000, 12:25AM ET
36 *
37 * Copyright (C) 2000-2001, by Coleman Kane <cokane@FreeBSD.org>,
38 * based upon the 3dfx driver written for linux, by Daryll Straus, Jon Taylor,
39 * and Jens Axboe, located at http://linux.3dfx.com.
40 */
41

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

153 * up memory writes. The last thing is to register the character device
154 * interface to the card, so we can open it from /dev/3dfxN, where N is a
155 * small, whole number.
156 */
157 struct tdfx_softc *tdfx_info;
158 u_long val;
159 /* rid value tells bus_alloc_resource where to find the addresses of ports or
160 * of memory ranges in the PCI config space*/
161 int rid = PCIR_MAPS;
161 int rid = PCIR_BAR(0);
162
163 /* Increment the card counter (for the ioctl code) */
164 tdfx_count++;
165
166 /* Enable MemMap on Voodoo */
167 val = pci_read_config(dev, PCIR_COMMAND, 2);
168 val |= (PCIM_CMD_MEMEN);
169 pci_write_config(dev, PCIR_COMMAND, val, 2);

--- 696 unchanged lines hidden ---
162
163 /* Increment the card counter (for the ioctl code) */
164 tdfx_count++;
165
166 /* Enable MemMap on Voodoo */
167 val = pci_read_config(dev, PCIR_COMMAND, 2);
168 val |= (PCIM_CMD_MEMEN);
169 pci_write_config(dev, PCIR_COMMAND, val, 2);

--- 696 unchanged lines hidden ---