1 --- NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c.orig 2004-10-27 18:24:52.617102752 +0200
2 +++ NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c 2004-10-27 18:26:34.998538408 +0200
5 nv_state_t *nv = NV_STATE_PTR(&nv_linux_devices[i]);
6 release_mem_region(nv->bar.regs.address, nv->bar.regs.size);
7 + pci_disable_device(nv_linux_devices[i].dev);
11 @@ -3517,6 +3518,28 @@
15 + // enable io, mem, and bus-mastering in pci config space
16 + if (pci_enable_device(dev) != 0)
18 + nv_printf(NV_DBG_ERRORS,
19 + "NVRM: pci_enable_device failed, aborting\n");
23 + // request ownership of our bars
24 + // keeps other drivers from banging our registers.
25 + // only do this for registers, as vesafb requests our framebuffer and will
26 + // keep us from working properly
27 + if (!request_mem_region(dev->resource[0].start,
28 + dev->resource[0].end - dev->resource[0].start + 1,
31 + nv_printf(NV_DBG_ERRORS,
32 + "NVRM: pci_request_regions failed, aborting\n");
33 + goto err_disable_dev;
35 + pci_set_master(dev);
37 /* initialize bus-dependent config state */
38 nvl = &nv_linux_devices[num_nv_devices];
39 nv = NV_STATE_PTR(nvl);
41 nv_printf(NV_DBG_ERRORS, "NVRM: Please check your BIOS settings. \n");
42 nv_printf(NV_DBG_ERRORS, "NVRM: [Plug & Play OS ] should be set to NO \n");
43 nv_printf(NV_DBG_ERRORS, "NVRM: [Assign IRQ to VGA] should be set to YES \n");
48 /* sanity check the IO apertures */
49 @@ -3570,39 +3593,9 @@
50 nv->bar.fb.address, nv->bar.fb.size);
53 - /* Clear out the data */
54 - os_mem_set(nvl, 0, sizeof(nv_linux_state_t));
59 - // request ownership of our bars
60 - // keeps other drivers from banging our registers.
61 - // only do this for registers, as vesafb requests our framebuffer and will
62 - // keep us from working properly
63 - if (!request_mem_region(nv->bar.regs.address, nv->bar.regs.size, "nvidia"))
65 - nv_printf(NV_DBG_ERRORS,
66 - "NVRM: pci_request_regions failed, aborting\n");
68 - /* Clear out the data */
69 - os_mem_set(nvl, 0, sizeof(nv_linux_state_t));
75 - // enable io, mem, and bus-mastering in pci config space
76 - if (pci_enable_device(dev) != 0)
78 - nv_printf(NV_DBG_ERRORS,
79 - "NVRM: pci_enable_device failed, aborting\n");
81 - pci_release_regions(dev);
82 - os_mem_set(nvl, 0, sizeof(nv_linux_state_t));
86 - pci_set_master(nvl->dev);
88 #if defined(NV_BUILD_NV_PAT_SUPPORT)
89 if (nvos_find_pci_express_capability(nvl->dev))
90 @@ -3619,13 +3612,7 @@
91 if (nv->bar.regs.map == NULL)
93 nv_printf(NV_DBG_ERRORS, "NVRM: failed to map registers!!\n");
95 - pci_release_regions(dev);
97 - /* Clear out the data */
98 - os_mem_set(nvl, 0, sizeof(nv_linux_state_t));
103 nv->flags |= NV_FLAG_MAP_REGS_EARLY;
105 @@ -3642,6 +3629,15 @@
111 + os_mem_set(nvl, 0, sizeof(nv_linux_state_t));
112 + release_mem_region(dev->resource[0].start,
113 + dev->resource[0].end - dev->resource[0].start + 1);
116 + pci_disable_device(dev);
120 int NV_API_CALL nv_no_incoherent_mappings