Monday, November 23, 2009

Gentoo + QLogic's FC HBA Driver

I wanted to use QLogic's FC HBA driver with my Sun StorageTek 6140 disk array on my Gentoo Linux machine, but their driver doesn't seem to be compatible with newer kernels (eg, 2.6.28).

Why use QLogic's proprietary FC HBA driver and not use the open source version included with your kernel? QLogic's driver has MPIO built-in, so no need to use multipath-tools or another MPIO solution. I only see one SCSI device node in /dev per volume. I also like that the firmware image is include in the kernel module, no need for the hotplug framework to load module firmware (binary blob). There is probably a way to "embed" the firmware image into the open source qla2xxx kernel module too, but I haven't researched it.

I hacked the crap out of this driver to make it work on Gentoo and I'll be honest, I'm quite surprised it even works. So, I definitely would not recommend using this driver for production, although I haven't had any problems running in on my machine (yet).

Compiling/installing QLogic's FC HBA (QLE2462 for me) driver on 2.6.28-gentoo-r5:

Get the package from QLogic's web site (qla2xxx-v8.02.23_4-dist.tgz).
tar xvfz qla2xxx-v8.02.23_4-dist.tgz
cd qlogic
./drvrsetup
cd qla2xxx-8.02.23
wget http://longfellow.mcc.edu/~marc.smith/marcitland/qla2xxx-8.02.23.patch
patch -p0 < qla2xxx-8.02.23.patch
extras/build.sh
extras/build.sh install


After the module is installed, a simple 'modprobe qla2xxx' should do the trick. I created an initrd image for my kernel and I can now boot from my SAN.

2 comments:

  1. Hi Marc,

    I try to compile qla2xxx driver on my debian lenny.

    And I have a problem about kernel version and some errors.

    I read your web site which propose a patch,
    but your web link for the patch doesn't work.

    Could you provide me the patch file (http://longfellow.mcc.edu/~marc.smith/marcitland/qla2xxx-8.02.23.patch)?

    I hope it will resolve my problem.

    Thanks in advance,
    Best regards,

    Bertrand

    ReplyDelete
  2. Sorry! I guess I didn't have the comment-to-email option enabled, so I didn't see this until now! The patch is gone, but that kernel version is pretty dated now and the QLogic driver probably is as well.

    ReplyDelete