MPT Fusion drivers and linux kernel 3.x
I am building a new system that will include an LSI 3801E SAS host bus adapter. I've used this adapter in previous linux systems without issue; it uses LSI's MPT Fusion drivers. I'd like to use a flavor of linux with a 3.x kernel and have run into some issues.
I've installed Mageia 2, which uses kernel 3.4 (3.4.34-desktop-1.mga2). The HBA is immediately recognized by the OS: Code:
user@localhost $ lspci Code:
user@localhost $ sudo ./sasflash -listall Code:
user@localhost $ sudo modinfo mptbase The driver package uses DKMS to compile and install the modules. This worked beautifully on my kernel 2.6 system. Unfortunately, I can't get them to compile on my new system: Code:
user@localhost $ sudo rpm -ivh mptlinux-4.28.00.00-1dkms.noarch.rpm Code:
DKMS make.log for mptlinux-4.28.00.00 for kernel 3.4.34-desktop-1.mga2 (x86_64) |
Why not use the driver included in Linux kernel?
|
Quote:
It just seems very odd (and frankly, stupid) that the version included in the kernel is so far behind the most recent version (3.04.20 vs. 4.28.00). LSI provides packages and the source code for the drivers on their site, but they only offer precompiled binaries for RHEL and SLES. And as I noted above, I am able to get the drivers to compile and load successfully via DKMS on a 2.6.x kernel. I'm assuming the reason I can't get them to compile now is because I'm using a 3.4.x kernel, but I'm only guessing. I'd be happy if I could at least verify that this is indeed the reason it won't compile, and it would be even better if someone is able to determine exactly why it isn't compiling from the make.log file. Ideally, of course, this would all lead to a solution that would get it to compile. |
Looking at kernel (3.8.2) source ... the code in kernel is provided by LSI, 2012.
|
Quote:
Also, not to press the issue, but do you think my suspicions regarding the compilation issue are correct? Does the make.log file lead you to believe that the reason it won't compile is because I'm using a 3.x kernel? |
Well, after decades of using Linux I can tell following. Hardware manufacturers provide their drivers source until it is incorporated into the kernel (if they are willing to provide open source drivers that is). Latest LSI has in their website is from 2011. To me it tells their code was approved by Linux kernel maintainers and they stopped offering a separate driver package. No wonder the old code won't build with 3.x, because there is no need, the new code is already in kernel source tree.
Disclaimer: The above is strictly from generic experience, I haven't looked at the code. Hint: You can download the latest kernel source from kernel.org and try it out, regardless what distro you are using. |
The mptdriver in the kernel source tree is still the 3.x version.
As of 2013-May-20, drivers/message/fusion/mptbase.h shows: #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.20" The 4.28 drivers are at least as old as Aug 2011 (http://www.lsi.com/products/storagec...SISAS1064.aspx) but they're ahead of whats in the kernel tree. There were 3 issues with the driver. pci_remove_bus_device - this method has been renamed. https://lkml.org/lkml/2012/2/25/82 __devexit_p references - apparently these can simply be removed http://communities.vmware.com/thread/432897 lock_kernel/unlock_kernel - this is critical to get right and I dont know if the patch is correct but it looks correct and it does compile :). http://stackoverflow.com/questions/5...-device-driver This patch was written for a friend who wants to use this controller (I dont have the hardware), so no warranty, use at own risk, and post here if it compiles/works for you. https://gist.github.com/donpdonp/5722900 $ patch < gist.patch patching file mptbase.c patching file mptctl.c patching file mptfc.c patching file mptsas.c patching file mptspi.c |
Quote:
Code:
user@localhost LinuxMPT_SAS_RHEL5-6_SLES10-11_PH21-4.28.00.00-1/message/fusion $ patch < mptlinux.patch |
I wanted to provide an update. I recently updated from Mageia 2 to Mageia 3, and I am now using kernel 3.10.24. Unfortunately, the drivers don't compile anymore, even with the patch. My output from compiling is below:
Code:
jimbob@localhost LinuxMPT_SAS_RHEL5-6_SLES10-11_PH21-4.28.00.00-1/message/fusion $ patch < mptlinux.patch |
Hi, i need help.
I try to install fusion driver to centos 6.5 (kernel 3.4 for xen). I use patch. Now, what i need to do to make rpm-file (or load modules). |
Quote:
Unfortunately, as you can see in all the comments above, I was never able to get the latest version of the fusion drivers to work/compile properly with a 3.x kernel. The 3.x kernels generally do come with the version 3.04 of the fusion drivers built in; unfortunately I haven't been able to get the 4.x version of the drivers to work. I will say that I've encountered much fewer problems with the 3.x drivers in the 3.x kernel, so perhaps the all-around better stability of the 3.x kernel means there's not much advantage to trying to get the 4.x drivers to work. Otherwise, sorry dude, hopefully someone else can throw up some ideas to get them to compile. |
All times are GMT -5. The time now is 03:07 AM. |