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

Newegg Daily Deals

Reply
 
Thread Tools
Old 12-03-10, 02:11 PM   #1
johnb
johnb
 
Join Date: Aug 2004
Posts: 11
Default MSI fix for 2.6.36 kernels and 260.19.21 driver

This pertains to using the 260.19.21 nvidia driver with x86 or x86_64 2.6.36 kernel.org kernels.

If the nvidia kernel module is unloaded, then the next use of the nvidia driver with MSI interrupts fails. A system reboot is required at this point to get MSI interrupts working again (but PCI INTA interrupts will still function properly).

It seems that the nvidia module unload routine needs to call
pci_disable_device(dev) so that the dev->enable_cnt field is decremented.

Otherwise, on the next driver load the pci_enable_device() call will not setup the device flags since the dev->enable_cnt field is > 0, and the device current_flags PCI_D0 flag will not get set.

In 2.6.36 kernels, the MSI write_msi_msg_desc() routine will not write to the MSI pci device registers if the PCI_D0 is not set, and thus the nvidia MSI interrupts will not function.

A possible fix for the 260.19.21 nvidia driver is show below.
It seems to work fine for me.

Thank you.


Index: b/drivers/video/nvidia-glx/nv.c
================================================== =================
--- a/drivers/video/nvidia-glx/nv.c
+++ b/drivers/video/nvidia-glx/nv.c
@@ -1802,6 +1802,7 @@ static void __exit nvidia_exit_module(vo
}
release_mem_region(NV_PCI_RESOURCE_START(dev, NV_GPU_BAR_INDEX_REGS),
NV_PCI_RESOURCE_SIZE(dev, NV_GPU_BAR_INDEX_REGS));
+ pci_disable_device(dev);
}
}
johnb is offline   Reply With Quote
Old 12-04-10, 01:53 AM   #2
stecklum
Registered User
 
Join Date: Feb 2009
Posts: 56
Default Re: MSI fix for 2.6.36 kernels and 260.19.21 driver

Thanks for figuring that out. It is specific to the 2.6.36 kernel and the patch is also required for the 256.53 driver.
stecklum is offline   Reply With Quote
Old 12-04-10, 02:00 AM   #3
gradinaruvasile
Registered User
 
gradinaruvasile's Avatar
 
Join Date: May 2008
Posts: 199
Default Re: MSI fix for 2.6.36 kernels and 260.19.21 driver

Why does this work on distro-specific kernels without the patch? In my case, Debian 32-bit. I had no issues whatsoever in installing and running 260.19.21 on the 2.6.36 kernel (from the experimental repo).
gradinaruvasile is offline   Reply With Quote
Old 12-04-10, 04:54 AM   #4
Dragoran
Registered User
 
Join Date: May 2004
Posts: 711
Default Re: MSI fix for 2.6.36 kernels and 260.19.21 driver

Quote:
Originally Posted by gradinaruvasile View Post
Why does this work on distro-specific kernels without the patch? In my case, Debian 32-bit. I had no issues whatsoever in installing and running 260.19.21 on the 2.6.36 kernel (from the experimental repo).
The driver does not use MSI by default.
Dragoran is offline   Reply With Quote
Old 12-04-10, 06:01 AM   #5
dura91
Registered User
 
Join Date: Aug 2009
Location: Near Paris France
Posts: 40
Thumbs up Re: MSI fix for 2.6.36 kernels and 260.19.21 driver

Quote:
Originally Posted by johnb View Post
A possible fix for the 260.19.21 nvidia driver is show below.
It seems to work fine for me.

Thank you.
Tried your patch with 260.19.26 and 2.6.36.1. Seems to work perfectly here.
Thanks.
dura91 is offline   Reply With Quote
Old 01-06-11, 05:34 PM   #6
b0f00narch
Registered User
 
Join Date: Jan 2011
Posts: 2
Default Re: MSI fix for 2.6.36 kernels and 260.19.21 driver

to apply this fix I just have to
download kernel
extract it with tar
mkdir /drivers/video/nvidia-glx/
cd /drivers/video/nvidia-glx/
nano nv.c
Copy&Paste the code
make menuconfig
make
make modules_install
cp kernel & cp System map ---> /boot
and reboot ?
b0f00narch is offline   Reply With Quote
Old 01-07-11, 02:17 AM   #7
dae
Registered User
 
Join Date: Jul 2004
Location: Sweden
Posts: 40
Default Re: MSI fix for 2.6.36 kernels and 260.19.21 driver

Thank you! Patch works fine here.
dae is offline   Reply With Quote
Old 01-09-11, 09:43 AM   #8
dura91
Registered User
 
Join Date: Aug 2009
Location: Near Paris France
Posts: 40
Default Re: MSI fix for 2.6.36 kernels and 260.19.21 driver

Quote:
Originally Posted by b0f00narch View Post
to apply this fix I just have to
download kernel
extract it with tar
mkdir /drivers/video/nvidia-glx/
cd /drivers/video/nvidia-glx/
nano nv.c
Copy&Paste the code
make menuconfig
make
make modules_install
cp kernel & cp System map ---> /boot
and reboot ?
No, the patch must be applied on the nvidia module bundled with the nvidia driver
Basically:
Code:
./NVIDIA-Linux-*.run -x
cd ./NVIDIA-Linux-*
Apply patch on ./kernel/nv.c
Code:
./nvidia-installer
dura91 is offline   Reply With Quote

Old 01-09-11, 05:45 PM   #9
mlord
Linux kernel hacker
 
Join Date: Feb 2009
Location: Ottawa, Canada
Posts: 173
Default Re: MSI fix for 2.6.36 kernels and 260.19.21 driver

For those who don't understand kernel-speak, this bug only affects you when upgrading the Nvidia drivers and not rebooting afterwards.

So for most people, a simple reboot after driver (re-)install is sufficient, and patching your copy of the driver is not really necessary.

But it does need fixing by NVIDIA nonetheless.

Cheers
mlord is offline   Reply With Quote
Old 01-10-11, 11:15 AM   #10
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: MSI fix for 2.6.36 kernels and 260.19.21 driver

This problem should be addressed in future driver releases.
zander 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


All times are GMT -5. The time now is 02:25 PM.


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