Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 04-16-09, 09:37 AM   #1
pavlinux
Registered User
 
pavlinux's Avatar
 
Join Date: Feb 2006
Location: Moscow, Russia
Posts: 57
Thumbs up PATCH FOR 180.44 with kernel 2.6.30-rc2

Code:
--- nv.c        2009-03-24 17:19:10.000000000 +0300
+++ nv.c        2009-04-16 18:32:25.187243389 +0400
@@ -16,6 +16,7 @@
 #include "os-agp.h"
 #include "nv-vm.h"
 #include "nv-reg.h"
+#include <linux/version.h>

 #ifdef MODULE_ALIAS_CHARDEV_MAJOR
 MODULE_ALIAS_CHARDEV_MAJOR(NV_MAJOR_DEVICE_NUMBER);
@@ -593,10 +594,11 @@
      * Set the module owner to ensure that the reference
      * count reflects accesses to the proc files.
      */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
     proc_nvidia->owner = THIS_MODULE;
     proc_nvidia_cards->owner = THIS_MODULE;
     proc_nvidia_warnings->owner = THIS_MODULE;
-
+#endif
     for (j = 0; j < num_nv_devices; j++)
     {
         nvl = &nv_linux_devices[j];
@@ -615,8 +617,9 @@

         entry->data = nv;
         entry->read_proc = nv_kern_read_cardinfo;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
         entry->owner = THIS_MODULE;
-
+#endif
         if (nv_find_pci_capability(dev, PCI_CAP_ID_AGP))
         {
             /*
@@ -628,8 +631,9 @@
                 NV_PCI_DEV_PUT(dev);
                 goto failed;
             }
-
-            entry->owner = THIS_MODULE;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+            entry->owner = THIS_MODULE;
+#endif
             proc_nvidia_agp = entry;

             entry = create_proc_entry("status", flags, proc_nvidia_agp);
@@ -640,8 +644,9 @@

             entry->data = nv;
             entry->read_proc = nv_kern_read_status;
-            entry->owner = THIS_MODULE;
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+            entry->owner = THIS_MODULE;
+#endif
             entry = create_proc_entry("host-bridge", flags, proc_nvidia_agp);
             if (!entry) {
                 NV_PCI_DEV_PUT(dev);
@@ -650,7 +655,9 @@

             entry->data = NULL;
             entry->read_proc = nv_kern_read_agpinfo;
-            entry->owner = THIS_MODULE;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+            entry->owner = THIS_MODULE;
+#endif

             entry = create_proc_entry("card", flags, proc_nvidia_agp);
             if (!entry) {
@@ -660,7 +667,9 @@

             entry->data = nv;
             entry->read_proc = nv_kern_read_agpinfo;
-            entry->owner = THIS_MODULE;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+            entry->owner = THIS_MODULE;
+#endif
         }

         NV_PCI_DEV_PUT(dev);
@@ -671,14 +680,17 @@
         goto failed;

     entry->read_proc = nv_kern_read_version;
-    entry->owner = THIS_MODULE;
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+    entry->owner = THIS_MODULE;
+#endif
     entry = create_proc_entry("registry", flags, proc_nvidia);
     if (!entry)
         goto failed;

     entry->read_proc = nv_kern_read_registry;
-    entry->owner = THIS_MODULE;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+    entry->owner = THIS_MODULE;
+#endif

     return;

@@ -705,8 +717,10 @@

     entry->data = (void *)message;
     entry->read_proc = nv_kern_read_warning;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
     entry->owner = THIS_MODULE;
 #endif
+#endif
 }

 #ifdef CONFIG_PROC_FS
Or download http://pavlinux.ru/nv/nvidia-x86_64-...6.30-rc2.patch
pavlinux is offline   Reply With Quote
Old 04-16-09, 09:41 AM   #2
gonzo_s
Registered User
 
Join Date: Mar 2009
Posts: 58
Default Re: PATCH FOR `180.44 with kernel 2.6.30-rc2

Excuse me, can you post the exact command to patch it? I've never done it before. Seems that there is no how-to for that as well. Would be nice. Thanks in advance.

P.S. What does this patch do?
gonzo_s is offline   Reply With Quote
Old 04-16-09, 09:47 AM   #3
pavlinux
Registered User
 
pavlinux's Avatar
 
Join Date: Feb 2006
Location: Moscow, Russia
Posts: 57
Default Re: PATCH FOR `180.44 with kernel 2.6.30-rc2

Quote:
Originally Posted by gonzo_s View Post
P.S. What does this patch do?
To do work with 2.6.30+ kernel

In 2.6.30 struct proc_dir_entry do not contains member owner, while, that's all.


# sh NVIDIA-Linux-x86_64-180.44-pkg2.run --extract-only
# cd NVIDIA-Linux-x86_64-180.44-pkg2/usr/src/nv/
# wget http://pavlinux.ru/nv/nvidia-x86_64-...6.30-rc2.patch
# patch -p0 < nvidia-x86_64-180.44-2.6.30-rc2.patch
# cd ../../../
# ./nvidia-installer

pavlinux is offline   Reply With Quote
Old 04-16-09, 01:55 PM   #4
kernelOfTruth
Gentoo Linux addict
 
Join Date: Nov 2007
Location: Vienna, Austria; Germany; hello world :)
Posts: 202
Default Re: PATCH FOR 180.44 with kernel 2.6.30-rc2

thanks man
__________________
2.6.30-rc3-zen0+ w. compcache, reiser4 + ccreg40 (lzo-compression + checksumming)
gcc version 4.4.0-pre9999 built 20090425 (prerelease) rev. 146764 (Gentoo SVN)
gcc version 4.4.0 (Gentoo Hardened 4.4.0-r1, espf-0.2.1)
Ubuntu Jaunty/9.04 x86_64 Dell XPS M1330
kernelOfTruth is offline   Reply With Quote
Old 04-23-09, 08:53 PM   #5
psychok9
Registered User
 
Join Date: Dec 2008
Posts: 55
Default Re: PATCH FOR 180.44 with kernel 2.6.30-rc2

It works with 185.19+2.6.30-rc3? I can't install 185.19 nvidia drivers on my 2.6.30-rc3 kernel

The nvidia installer need gcc 4.2 compiler and I have the gcc 4.3.3.
Thank you!
psychok9 is offline   Reply With Quote
Old 04-23-09, 08:55 PM   #6
thefirstm
Registered User
 
Join Date: Feb 2009
Posts: 226
Default Re: PATCH FOR 180.44 with kernel 2.6.30-rc2

The patch here worked flawlessly for me installing 185.19 with kernel 2.6.30-rc3.
thefirstm is offline   Reply With Quote
Old 04-23-09, 09:17 PM   #7
psychok9
Registered User
 
Join Date: Dec 2008
Posts: 55
Default Re: PATCH FOR 180.44 with kernel 2.6.30-rc2

Great!
psychok9 is offline   Reply With Quote
Old 04-23-09, 09:30 PM   #8
psychok9
Registered User
 
Join Date: Dec 2008
Posts: 55
Default Re: PATCH FOR 180.44 with kernel 2.6.30-rc2

I don't know HOW, but it works!
Thank you very much!
psychok9 is offline   Reply With Quote

Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Random crashes, NVRM Xid messages Iesos NVIDIA Linux 90 10-04-12 03:27 AM
Corrupted display - 302.17 - Dell Precision T3500 (G98 [Quadro NVS 295]) gbailey NVIDIA Linux 1 06-27-12 10:24 AM
UEFI+Nvidia - NVRM: Your system is not currently configured to drive a VGA console... interzoneuk NVIDIA Linux 0 06-26-12 04:51 AM
xorg locks-up with newest nvidia drivers w/ vdpau. theroot NVIDIA Linux 1 06-24-12 11:04 AM
Crash when logout from X TGL NVIDIA Linux 10 09-13-02 08:22 PM

All times are GMT -5. The time now is 03:57 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.