nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   PATCH FOR 180.44 with kernel 2.6.30-rc2 (http://www.nvnews.net/vbulletin/showthread.php?t=131597)

pavlinux 04-16-09 09:37 AM

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 (nana2)

gonzo_s 04-16-09 09:41 AM

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?

pavlinux 04-16-09 09:47 AM

Re: PATCH FOR `180.44 with kernel 2.6.30-rc2
 
Quote:

Originally Posted by gonzo_s (Post 1984479)
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

(nana2)

kernelOfTruth 04-16-09 01:55 PM

Re: PATCH FOR 180.44 with kernel 2.6.30-rc2
 
thanks man :)

psychok9 04-23-09 08:53 PM

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!

thefirstm 04-23-09 08:55 PM

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.

psychok9 04-23-09 09:17 PM

Re: PATCH FOR 180.44 with kernel 2.6.30-rc2
 
Great!

psychok9 04-23-09 09:30 PM

Re: PATCH FOR 180.44 with kernel 2.6.30-rc2
 
I don't know HOW, but it works!
Thank you very much!


All times are GMT -5. The time now is 10:46 AM.

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