Hi all, I'm afraid it's more complicated... I discovered this problem today as well when upgrading kernel to: 2.6.24-etchnhalf.1-686.
Building from nvidia-kernel-source 1.0.8776-4 didn't work. I also tried a later nvidia-kernel-source. Not the 173.14.09-5 one, unfortunately I don't remember the exact version. It started with 100-something. It was probably an old unstable package I downloaded many months ago. Interesting thing: the later version was built with no problem but the nvidia-drivers was too modern for my card (GeForce4 MX 440). When trying "modprobe nvidia" it said: use an older version (legacy) of the nvidia drivers. So it seems that the 1.0.8776-version is the most modern version I can use for my card. Therefore, I went through the code and changed the most critical lines to make it pass the compilation (I looked in the 173.14.09-package in unstable to get some clues about the kernel interface changes that caused these troubles). I didn't think so much about correctness but the changes seems to work (I run X now with 2.4.24 kernel and 1.0.8776 nvidia-kernel). I've attached a patch. Apply it before building and it should work. I don't know about 64-bit kernels though (amd64). Might be more complex. Apply patch like this: cd /usr/src/modules/nvidia-kernel/nv/ patch < patch-nv-1.0.8776_to_2.6.24.txt I might be missing something here though. I don't know really if the latest version 173.14.09-5 supports my old card. Then, this patching might be unnecessary. Maybe the old version (8776) needs be maintaing also in the future to support some old cards... /Thomas L
diff -Nur nv/nv.c nv-modified/nv.c --- nv/nv.c 2007-01-05 05:51:29.000000000 +0100 +++ nv-modified/nv.c 2009-01-23 18:59:38.000000000 +0100 @@ -99,7 +99,7 @@ int nv_use_cpa = 1; #endif -static kmem_cache_t *nv_pte_t_cache = NULL; +static void *nv_pte_t_cache = NULL; // allow an easy way to convert all debug printfs related to events // back and forth between 'info' and 'errors' @@ -1453,8 +1453,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"); for (i = 0; i < num_nv_devices; i++) { @@ -1478,8 +1477,7 @@ 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"); + unregister_chrdev(nv_major, "nvidia"); for (i = 0; i < num_nv_devices; i++) { @@ -1806,7 +1804,7 @@ } status = request_irq(nv->interrupt_line, nv_kern_isr, - SA_INTERRUPT | SA_SHIRQ, "nvidia", + IRQF_DISABLED | IRQF_SHARED, "nvidia", (void *) nvl); if (status != 0) { diff -Nur nv/nv-i2c.c nv-modified/nv-i2c.c --- nv/nv-i2c.c 2007-01-05 05:51:29.000000000 +0100 +++ nv-modified/nv-i2c.c 2009-01-23 13:44:42.000000000 +0100 @@ -23,7 +23,6 @@ static struct i2c_algorithm nv_i2c_algo = { .master_xfer = nv_i2c_algo_xfer, .smbus_xfer = NULL, - .algo_control = nv_i2c_algo_control, .functionality = nv_i2c_algo_functionality, }; diff -Nur nv/nv-linux.h nv-modified/nv-linux.h --- nv/nv-linux.h 2007-01-05 05:51:29.000000000 +0100 +++ nv-modified/nv-linux.h 2009-01-23 13:06:35.000000000 +0100 @@ -509,7 +509,7 @@ #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) \