Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 38431 Details for
Bug 62103
incorporate patch to make nvidia-kernel-61.11/61.06 more stable
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Terence's patch
nv_enable_pci.patch (text/plain), 3.55 KB, created by
Prakash Punnoor
on 2004-08-29 07:13:31 UTC
(
hide
)
Description:
Terence's patch
Filename:
MIME Type:
Creator:
Prakash Punnoor
Created:
2004-08-29 07:13:31 UTC
Size:
3.55 KB
patch
obsolete
>--- nv/nv.c 2004-08-23 13:58:15.000000000 -0500 >+++ nv.new/nv.c 2004-08-23 13:58:35.000000000 -0500 >@@ -1225,6 +1225,7 @@ > { > nv_state_t *nv = NV_STATE_PTR(&nv_linux_devices[i]); > release_mem_region(nv->bar.regs.address, nv->bar.regs.size); >+ pci_disable_device(nv_linux_devices[i].dev); > } > } > >@@ -3516,6 +3517,28 @@ > return -1; > } > >+ // enable io, mem, and bus-mastering in pci config space >+ if (pci_enable_device(dev) != 0) >+ { >+ nv_printf(NV_DBG_ERRORS, >+ "NVRM: pci_enable_device failed, aborting\n"); >+ return -1; >+ } >+ >+ // request ownership of our bars >+ // keeps other drivers from banging our registers. >+ // only do this for registers, as vesafb requests our framebuffer and will >+ // keep us from working properly >+ if (!request_mem_region(dev->resource[0].start, >+ dev->resource[0].end - dev->resource[0].start + 1, >+ "nvidia")) >+ { >+ nv_printf(NV_DBG_ERRORS, >+ "NVRM: pci_request_regions failed, aborting\n"); >+ goto err_disable_dev; >+ } >+ pci_set_master(dev); >+ > /* initialize bus-dependent config state */ > nvl = &nv_linux_devices[num_nv_devices]; > nv = NV_STATE_PTR(nvl); >@@ -3545,7 +3568,7 @@ > nv_printf(NV_DBG_ERRORS, "NVRM: Please check your BIOS settings. \n"); > nv_printf(NV_DBG_ERRORS, "NVRM: [Plug & Play OS ] should be set to NO \n"); > nv_printf(NV_DBG_ERRORS, "NVRM: [Assign IRQ to VGA] should be set to YES \n"); >- return -1; >+ goto err_zero_dev; > } > > /* sanity check the IO apertures */ >@@ -3569,39 +3592,9 @@ > nv->bar.fb.address, nv->bar.fb.size); > } > >- /* Clear out the data */ >- os_mem_set(nvl, 0, sizeof(nv_linux_state_t)); >- >- return -1; >- } >- >- // request ownership of our bars >- // keeps other drivers from banging our registers. >- // only do this for registers, as vesafb requests our framebuffer and will >- // keep us from working properly >- if (!request_mem_region(nv->bar.regs.address, nv->bar.regs.size, "nvidia")) >- { >- nv_printf(NV_DBG_ERRORS, >- "NVRM: pci_request_regions failed, aborting\n"); >- >- /* Clear out the data */ >- os_mem_set(nvl, 0, sizeof(nv_linux_state_t)); >- >- return -1; >+ goto err_zero_dev; > } > >- // enable io, mem, and bus-mastering in pci config space >- if (pci_enable_device(dev) != 0) >- { >- nv_printf(NV_DBG_ERRORS, >- "NVRM: pci_enable_device failed, aborting\n"); >- >- pci_release_regions(dev); >- os_mem_set(nvl, 0, sizeof(nv_linux_state_t)); >- >- return -1; >- } >- pci_set_master(nvl->dev); > > #if defined(NV_BUILD_NV_PAT_SUPPORT) > if (nvos_find_pci_express_capability(nvl->dev)) >@@ -3618,13 +3611,7 @@ > if (nv->bar.regs.map == NULL) > { > nv_printf(NV_DBG_ERRORS, "NVRM: failed to map registers!!\n"); >- >- pci_release_regions(dev); >- >- /* Clear out the data */ >- os_mem_set(nvl, 0, sizeof(nv_linux_state_t)); >- >- return -1; >+ goto err_zero_dev; > } > nv->flags |= NV_FLAG_MAP_REGS_EARLY; > #endif >@@ -3641,6 +3628,15 @@ > num_nv_devices++; > > return 0; >+ >+err_zero_dev: >+ os_mem_set(nvl, 0, sizeof(nv_linux_state_t)); >+ release_mem_region(dev->resource[0].start, >+ dev->resource[0].end - dev->resource[0].start + 1); >+ >+err_disable_dev: >+ pci_disable_device(dev); >+ return -1; > } > > int NV_API_CALL nv_no_incoherent_mappings
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 62103
: 38431