In order to get working configuration, check the MOFED release notes for supported OS/kernel matrix available from Mellanox site
http://www.mellanox.com/related-docs/prod_software/Mellanox_OFED_Linux_Release_Notes_3_3-1_0_4_0.pdf
If the kernel you are using, provided by OS vendor, then it supported and should work. In the case if system has mixed configuration, like OS itself is based RedHat/SLES/Debian but used kernel is from www.kernel.org, this combination might not work.
For more details, check release notes.