Package: nvidia-glx
Version: 304.88-4
Dear mainteners,
I build myself the latest kernel 3.10 for tests and it seems that there is
a bug concerning the nvidia driver installation.
In fact, with the latest kernel, it's impossible to build the nvidia
module, it fails. This bug concern all Nvidia driver (304.X, 313.X and
325.08) and Nvidia has not corrected this upstream bug.
See here :
https://devtalk.nvidia.com/default/topic/549532/linux/linux-3-10-incompatibility-in-function-lsquo-nv_i2c_del_adapter-rsquo-error-void-value-not-igno/
See here :
https://devtalk.nvidia.com/default/topic/549208/linux/patch-for-325-08-on-linux-3-10/
I attach the patch (it's not mine) for the latest Nvidia-driver 325.08 (i
don't try it with older version) IF the kernel 3.10 appears in Debian
Sid/Testing/Wheezy-backports before the next Nvidia driver release.
Cheers,
Max
diff -ur -X - NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c
NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c
--- NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c 2013-04-26
00:22:30.0 -0400
+++ NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c 2013-05-13
05:20:55.571981365 -0400
@@ -311,8 +311,6 @@
BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data)
{
struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data;
-int osstatus = 0;
-BOOL wasReleased = FALSE;
#if defined(KERNEL_2_4)
if (!NV_WEAK_SYMBOL_PRESENT(i2c_add_adapter))
@@ -324,15 +322,10 @@
if (!pI2cAdapter) return FALSE;
// attempt release with the OS
-osstatus = i2c_del_adapter(pI2cAdapter);
+i2c_del_adapter(pI2cAdapter);
+os_free_mem(pI2cAdapter);
-if (!osstatus)
-{
-os_free_mem(pI2cAdapter);
-wasReleased = TRUE;
-}
-
-return wasReleased;
+return TRUE;
}
#else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE))
diff -ur -X - NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-procfs.c
NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-procfs.c
--- NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-procfs.c
2013-04-26 00:22:30.0 -0400
+++ NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-procfs.c 2013-05-22
04:52:45.229495748 -0400
@@ -60,60 +60,41 @@
__entry; \
})
-#define NV_CREATE_PROC_FILE(name,parent,__read_proc, \
-__write_proc,__fops,__data)\
- ({ \
-struct proc_dir_entry *__entry;\
-int __mode = (S_IFREG | S_IRUGO); \
-if ((NvUPtr)(__write_proc) != 0) \
-__mode |= S_IWUSR; \
-__entry = NV_CREATE_PROC_ENTRY(name, __mode, parent); \
-if (__entry != NULL) \
-{ \
-if ((NvUPtr)(__read_proc) != 0)\
-__entry->read_proc = (__read_proc);\
-if ((NvUPtr)(__write_proc) != 0) \
-{ \
-__entry->write_proc = (__write_proc); \
-__entry->proc_fops = (__fops); \
-} \
-__entry->data = (__data); \
-} \
-__entry; \
-})
+#define NV_PROC_RW (S_IFREG|S_IRUGO|S_IWUSR)
+#define NV_PROC_RO (S_IFREG|S_IRUGO)
#define NV_CREATE_PROC_DIR(name,parent)\
({ \
struct proc_dir_entry *__entry;\
int __mode = (S_IFDIR | S_IRUGO | S_IXUGO);\
-__entry = NV_CREATE_PROC_ENTRY(name, __mode, parent); \
+__entry = proc_mkdir_mode(name, __mode, parent); \
__entry; \
})
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,9,255)
+static inline void *PDE_DATA(const struct inode *inode) {
+ return PDE(inode)->data;
+}
+#endif
+
#define NV_PROC_WRITE_BUFFER_SIZE (64 * RM_PAGE_SIZE)
static int
-nv_procfs_read_gpu_info(
-char *page,
-char **start,
-off_t off,
-intcount,
-int *eof,
-void *data
+nv_procfs_show_gpu_info(
+struct seq_file *m,
+void *v
)
{
-nv_state_t *nv = data;
+nv_state_t *nv = m->private;
nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
struct pci_dev *dev = nvl->dev;
char *type, *fmt, tmpstr[NV_DEVICE_NAME_LENGTH];
-int len = 0, status;
+int status;
NvU8 *uuid;
NvU32 vbios_rev1, vbios_rev2, vbios_rev3, vbios_rev4, vbios_rev5;