View Single Post
Old 12-02-07, 02:34 PM   #29
Licaon
Registered User
 
Licaon's Avatar
 
Join Date: Nov 2004
Location: Between the keyboard and the chair.
Posts: 490
Default Re: A7N266-VM : Geforce 2 MX Onboard : Freeze at NVIDIA Logo

for kernel 2.6.23 ( tested on 2.6.23.9 ), one also has to apply the modifications from here: http://home.hiwaay.net/~craigg/linux/NV_patch.html

Code:
--- a/NVIDIA-Linux-x86-1.0-9755-pkg1/usr/src/nv/nv-linux.h
+++ b/NVIDIA-Linux-x86-1.0-9755-pkg1/usr/src/nv/nv-linux.h
@@ -524,12 +524,12 @@
     {                                                \
         free_pages(ptr, order);                      \
     }
-
+// only 5 args in kernel 2.6.23
 #define NV_KMEM_CACHE_CREATE(kmem_cache, name, type)            \
     {                                                           \
         kmem_cache = kmem_cache_create(name, sizeof(type),      \
-                        0, 0, NULL, NULL);                      \
-    } 
+                        0, 0, NULL);                            \
+    }
 
 #define NV_KMEM_CACHE_DESTROY(kmem_cache)                       \
     {                                                           \

--- a/NVIDIA-Linux-x86-1.0-9755-pkg1/usr/src/nv/nv.c
+++ b/NVIDIA-Linux-x86-1.0-9755-pkg1/usr/src/nv/nv.c
@@ -107,7 +107,7 @@
 
 static int nv_mmconfig_failure_detected = 0;
 
-static kmem_cache_t *nv_pte_t_cache = NULL;
+static struct kmem_cache *nv_pte_t_cache = NULL;	//	kernel 2.6.23
 
 // allow an easy way to convert all debug printfs related to events
 // back and forth between 'info' and 'errors'
@@ -1551,8 +1551,7 @@
         if (apm_nv_dev[i] != NULL) pm_unregister(apm_nv_dev[i]);
 #endif
 
-    if (unregister_chrdev(nv_major, "nvidia") < 0)
-        nv_printf(NV_DBG_ERRORS, "NVRM: unregister nv chrdev failed\n");
+    unregister_chrdev(nv_major, "nvidia") ; // kernel 2.6.23 -- this now returns void (don't ask why)
 
     for (i = 0; i < num_nv_devices; i++)
     {
@@ -1578,9 +1577,8 @@
 
     nv_printf(NV_DBG_INFO, "NVRM: nvidia_exit_module\n");
 
-    if (unregister_chrdev(nv_major, "nvidia") < 0)
-        nv_printf(NV_DBG_ERRORS, "NVRM: unregister nv chrdev failed\n");
-
+//		2.6.23 -- unregister_chrdev now returns void.  Don't ask why.
+    unregister_chrdev(nv_major, "nvidia") ;
     for (i = 0; i < num_nv_devices; i++)
     {
         struct pci_dev *dev;
apply by hand, remove those lines marked with - (minus) and add those marked by + (plus), search the lines before modified lines, since that patch applies to 97.55 and the line numbers do not match

yet the driver 87.76+first_patch+this_patch compiles fine on 2.6.23
Licaon is offline   Reply With Quote