QLogic Fibre Channel Driver for SuSE 7.3/Enterprise 7 and RedHat 7.1/7.2 Products supported: QLA2200, QLA23XX 05/09/2002 Contents -------- 1. OS Support 2. Supported Features 3. Release History 4. Creating the Driver Diskette 5. Installing the driver 5.1 Building a Custom Kernel to Load the Driver 5.2 Building the driver from the Source 5.2.1. Building an Uni-Processor (UP) version of the driver 5.2.2. Building a Symmetric Multi-Processor(SMP) version of the driver 5.3 Load the Driver Manually 5.4 Making a RAMDISK to Load the Driver 6. Driver Parameters 6.1 System Parameters 6.2 NVRAM Parameters 6.3 Driver Command Line Parameters 7. Limitations 8. Additional Notes 8.1 Proc Filesystem Support 8.2 Co-existence of QLogic 4.x and 6.x Linux drivers 9. Diskette Content 10. Contacting QLogic ********************************************************************** 1. OS Support ------------- This driver works with Linux kernel 2.4.X. Earlier or later versions of Linux are not supported in this beta release. ********************************************************************** 2. Supported Features --------------------- * FCAL - direct attach loop * Point-to-point * Fabric support * Initiator mode only * Fault recovery on down loops * Persistent binding * Extended LUN support up to 255 LUNs * FC tape support ********************************************************************** 3. Release History ------------------ Please refer to Release Notes. ********************************************************************** 4. Creating the Driver Disks ---------------------------- Download qla2x00src-v6.0.1b1.tgz file from QLogic's website. If prompted "What would you like to do with this file?" choose "Save this file to disk". Insert a blank diskette and download to the diskette directly. ********************************************************************** 5. Installing the driver ------------------------ 5.1 Building a Custom Kernel to Load the Driver ------------------------------------------------- This process is only supported on RedHat 7.1/7.2 and SuSE 7.3/ Enterprise 7. The kernel source tree is referenced below as /usr/src/linux. Under the RedHat distribution, the normal directory path is /usr/src/linux-2.4. For SuSE distributions, the kernel source is usually located in /usr/src/linux. Prerequisites: a) Verify that both kernel-headers and kernel-source RPMS are already installed. # rpm -qa | grep kernel If the kernel-headers and kernel-source RPMs are not installed, install from the distribution's CD with the following commands: # rpm -i kernel-sources* # rpm -i kernel-headers* 1. Make special Qlogic Directory under kernel source tree # mkdir /usr/src/linux/drivers/scsi/qla2xxx/ # cd /usr/src/linux/drivers/scsi/qla2xxx/ # tar xvzf qla2x00src-v6.0.X.tgz # rm -f makefile # cp -f Makefile.kernel Makefile 2. Edit the Makefile under the kernel scsi directory # cd /usr/src/linux/drivers/scsi # vi Makefile Look for the following line subdir-$(CONFIG_SCSI_AIC7XXX) += aic7xxx And add the following lines subdir-$(CONFIG_SCSI_QLOGIC_QLA2XXX) += qla2xxx ifeq ($(CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2200),y) SUB_DIRS += qla2xxx MOD_IN_SUB_DIRS += qla2xxx else ifeq ($(CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2200),m) MOD_IN_SUB_DIRS += qla2xxx endif endif ifeq ($(CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2300),y) SUB_DIRS += qla2xxx MOD_IN_SUB_DIRS += qla2xxx else ifeq ($(CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2300),m) MOD_IN_SUB_DIRS += qla2xxx endif endif The edited lines should read as: subdir-$(CONFIG_SCSI_AIC7XXX) += aic7xxx subdir-$(CONFIG_SCSI_QLOGIC_QLA2XXX) += qla2xxx ifeq ($(CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2200),y) SUB_DIRS += qla2xxx MOD_IN_SUB_DIRS += qla2xxx else ifeq ($(CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2200),m) MOD_IN_SUB_DIRS += qla2xxx endif endif ifeq ($(CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2300),y) SUB_DIRS += qla2xxx MOD_IN_SUB_DIRS += qla2xxx else ifeq ($(CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2300),m) MOD_IN_SUB_DIRS += qla2xxx endif endif NOTE: For Redhat Distributions (7.1 and 7.2) :- Locate the following line obj-$(CONFIG_SCSI_QLOGIC_QLA2100) += qla2x00.o Add the following lines below that: obj-$(CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2200) += qla2xxx/qla2200.o obj-$(CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2300) += qla2xxx/qla2300.o Append the following lines to the end of the Makefile: qla2xxx/qla2200.o: cd qla2xxx; make qla2200.o qla2xxx/qla2300.o: cd qla2xxx; make qla2300.o NOTE: For SuSE Distributions (7.2 and 7.3) :- Locate the following line obj-$(CONFIG_SCSI_QLOGIC_QLA2200) += qla2200.o obj-$(CONFIG_SCSI_QLOGIC_QLA2300) += qla2300.o Add the following lines below that: obj-$(CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2200) += qla2xxx/qla2200.o obj-$(CONFIG_SCSI_QLOGIC_QLA2XXX_QLA2300) += qla2xxx/qla2300.o Append the following lines to the end of the Makefile: qla2xxx/qla2200.o: cd qla2xxx; make qla2200.o qla2xxx/qla2300.o: cd qla2xxx; make qla2300.o 4. Edit the Config.in file under the kernel scsi directory # cd /usr/src/linux/drivers/scsi # vi Config.in NOTE: For Redhat Distributions (7.1 and 7.2) :- Locate the following lines dep_tristate 'Qlogic QLA 2100 FC SCSI support' CONFIG_SCSI_QLOGIC_QLA2100 $CONFIG_SCSI dep_tristate 'Qlogic QLA 2200 FC SCSI support' CONFIG_SCSI_QLOGIC_QLA2200 $CONFIG_SCSI Add the following line below that: source drivers/scsi/qla2xxx/Config.in NOTE: For SuSE Distributions (7.2 and 7.3) :- Locate the following lines dep_tristate 'Qlogic QLA2200 SCSI support' CONFIG_SCSI_QLOGIC_QLA2200 $CONFIG_SCSI dep_tristate 'Qlogic QLA2300 SCSI support' CONFIG_SCSI_QLOGIC_QLA2300 $CONFIG_SCSI Add the following lines below that: source drivers/scsi/qla2xxx/Config.in 5. Remove any reference to older QLogic FC drivers NOTE: To ensure that the older driver binary included in the original distribution does not interfere with the updated version, please rename the old driver binary as follows: For Redhat Distributions (7.2 with 2.4.9-21 or above) :- # cd /usr/src/linux/drivers/addon/qla2200 # mv qla2200.o qla2200_rh.o # mv qla2300.o qla2300_rh.o # cd /lib/modules//drivers/addon/qla2200 # mv qla2200.o qla2200_rh.o # mv qla2300.o qla2300_rh.o For SuSE Distributions (Enterprise 7 and above, 7.3 and above) :- # cd /usr/src/linux/drivers/scsi # mv qla2200.o qla2200_su.o # mv qla2300.o qla2300_su.o # cd /lib/modules//drivers/scsi # mv qla2200.o qla2200_su.o # mv qla2300.o qla2300_su.o 6. Configure the kernel to load the new QLogic driver. # cd /usr/src/linux # make menuconfig - Select "SCSI Support" - Select "SCSI Generic Support" - Select "SCSI low-level drivers" - Select "Qlogic QLA 2XXX v6 FC SCSI support" - Select "Qlogic QLA 2200 v6 FC SCSI support" OR - Select "Qlogic QLA 2300 v6 FC SCSI support" - Select Exit to go back to the "SCSI Support" menu. - Select Exit to go back to the "Main Menu". - Select Exit to exit the Main Menu. The system prompts: "Do you wish to save your new kernel configuration?". Select "Yes". The system saves a new config file called ".config" in the current directory. 7. Build kernel # make dep bzImage modules modules_install 5.2 Building a Driver from the Sources Code -------------------------------------------- From the source code you can build a qla2200.o or qla2300.o for your UP or SMP systems, and load the driver manually or automatically using a RAMDISK image during system boot time. 5.2.1 Building a Uni-Processor (UP) Version of the Driver --------------------------------------------------------- 1. Extract the kernel-headers and kernel-sources RPM files from the first RedHat CD: # cd /mnt/cdrom/RedHat/RPMS # rpm -iv kernel-headers*.rpm # rpm -iv kernel-source*.rpm 3. Prepare source headers by first changing to the kernel source directory: (For Redhat 7.1 SMP) # cd /usr/src/linux-2.4 3. Type "make menuconfig" to configure additional support: - Select "SCSI Support" - Select "SCSI Generic Support" - Select Exit to exit the Main Menu. The system prompts: "Do you wish to save your new kernel configuration?". Select "Yes". The system saves a new config file called ".config" in the current directory. 4. Under the kernel source directory type the following: # make dep 5. Using Diskette you created in Section 4, copy the qla2x00src-v6.0.1b1.tgz file to /qla2x00. Follow these steps: # mkdir qla2x00 # cd qla2x00 # mcopy a:*.tgz . # tar -xvzf *.tgz 6. Build the driver qla2200.o and qla2300.o from the Source Code by typing: (For Redhat 7.1 UP) # make all OSVER=linux-2.4 7. To load the driver manually, see section 5.3. To make a RAMDISK to load the driver during system boot time, see section 5.4. 5.2.2. Building Symmetric Multi-Processor (SMP) Version of the Driver --------------------------------------------------------------------- 1. Extract the kernel-headers and kernel-source RPM files from the first RedHat CD: # cd /mnt/cdrom/RedHat/RPMS # rpm -iv kernel-headers*.rpm # rpm -iv kernel-source*.rpm 2. Prepare source headers for a SMP module build by first changing to the kernel source directory: (For Redhat 7.1 SMP) # cd /usr/src/linux-2.4 3. Type "make menuconfig" to configure additional support: - Select "Processor type and features" - Select "Symmetric multiproccessor" - Select Exit to exit the Processor Menu. - Select "SCSI Support" - Select "SCSI Generic Support" - Select Exit to exit the SCSI Menu. - Select Exit to exit the Main Menu. The system prompts: "Do you wish to save your new kernel configuration?". Select "Yes". The system saves a new config file called ".config" in the current directory. 4. Under kernel source directory type the following: # make dep 5. Using the diskette you created in Section 4. Copy the qla2x00src-v6.0.1b1.tgz file to /qla2x00. Follow these steps: # mkdir qla2x00 # cd qla2x00 # mcopy a:*.tgz . # tar -xvzf *.tgz 6. Build the driver qla2200.o and qla2300.o from the Source Code by typing: (For Redhat 7.1 SMP) # make all SMP=1 OSVER=linux-2.4 7. To load the driver manually, see section 5.3. To make a RAMDISK to load the driver during system boot time, see section 5.4. 5.3 Load the Driver Manually ------------------------------ Before loading the driver manually, first build the driver binary from the driver source files as described in sections 5.2.1 and 5.2.2. - To load the driver directly from the local build directory, type the following: # insmod qla2200.o or # insmod qla2300.o - To load the driver using modprobe: 1. Copy driver binary files. Type the following: # cp qla2200.o qla2300.o /lib/modules//kernel/drivers/scsi/ 2. Update the module dependency file. You can either run "depmod -a" or make sure that the following line is in the /lib/modules//modules.dep file: /lib/modules//kernel/drivers/scsi/qla2200.o: /lib/modules//kernel/drivers/scsi/scsi_mod.o and/or /lib/modules//kernel/drivers/scsi/qla2300.o: /lib/modules//kernel/drivers/scsi/scsi_mod.o 3. Type the following to load the driver: # modprobe qla2200.o or # modprobe qla2300.o NOTE: For Redhat Distributions v7.2 with kernel 2.4.9-21 and above: To ensure that the older driver binary included in the original distribution does not interfere with the updated version, please rename the old driver binary as follows: # cd /lib/modules//drivers/addon/qla2200 # mv qla2200.o qla2200_rh.o # mv qla2300.o qla2300_rh.o After renaming the older version of the drivers, you can load the new driver using 'modprobe' after updating the modules dependency file. 5.4 Making a RAMDISK to Load the Driver ----------------------------------------- 1. Build the driver binary files (see 5.2.1 and 5.2.2). 2. Copy the files to /lib/modules//kernel/drivers/scsi/ NOTE: For Redhat Distributions (7.2 with 2.4.9-21 or above) : To ensure that the older driver binary included in the original distribution does not interfere with the updated version, please rename the old driver binary as follows: # cd /lib/modules//drivers/addon/qla2200 # mv qla2200.o qla2200_rh.o # mv qla2300.o qla2300_rh.o 3. Add the following line to /etc/modules.conf. alias scsi_hostadapter0 qla2200 or alias scsi_hostadapter0 qla2300 4. For RedHat Distribution: - Type the following command: # mkinitrd -f - Copy the file to /boot. For SuSE Distribution: - Type the following command: # /sbin/mk_initrd NOTE: By default, the RAMDISK images created are: /boot/initrd /boot/initrd.suse 5. Configure the boot loader with the new RAMDISK image. For LILO: Add "initrd=/boot/" in /etc/lilo.conf under one of the kernel entries to use the ram disk image. Run "lilo" and reboot system. Select the kernel with the new ramdisk image to come up. For GRUB: Add "initrd=/boot/" in /etc/grub.conf under one of the kernel entries to use the ram disk image. ********************************************************************** 6. Driver Parameters -------------------- The driver parameters are divided into System Parameters and NVRAM Parameters sections. 6.1 System parameters ---------------------- 1. Type in the following at the boot prompt to support 128 LUNs: boot: linux max_scsi_luns=128 2. The /etc/lilo.conf file can be changed to automatically make the kernel to enable more than 1 LUN. If you have multiple kernel images,the "append=" line must be added to each kernel image listed in the lilo.conf file. For example, add the following line to support 128 LUNs: append="max_scsi_luns=128" Note: If you have multiple adapters, set max_scsi_luns to maximum LUN supported between adapters. 6.2 NVRAM Parameters --------------------- The NVRAM features described below are hard-coded in the driver. The changes made for the particular NVRAM feature in the Fast!Util do not take effect unless otherwise noted. None. 6.3 Driver Command Line Parameters ----------------------------------- 'verbose' and 'quiet' are command line options available. verbose - Verbose detail debug information quiet - Driver does not display: Waiting for LIP to complete.... scsi%d: Topology - %s, Host Loop address 0x%x scsi(%d): LIP occurred scsi(%d): LIP reset occurred Usage examples: # insmod qla2200.o options = verbose # insmod qla2300.o options = verbose # insmod qla2200.o ql2xopts = quiet # insmod qla2300.o ql2xopts = quiet ********************************************************************** 7. Limitations -------------- N/A ********************************************************************** 8. Additional Notes --------------------- 8.1 Proc Filesystem Support ----------------------------- The /proc filesystem for the QLA2200 and QLA2300 driver can be found in the /proc/scsi/qla2200/ and /proc/scsi/qla2300/ directory. This directory contains a file for each QLogic Fibre Channel adapter in the system. Each file will present information about the adapter and transfer statistics for each discovered LUN. 8.2 Co-existence of QLogic 4.x and 6.x Linux drivers ----------------------------------------------------- The 4.x driver provides support for QLA2100, QLA2200, and QLA23xx. The 6.x driver supports the QLA2200, and QLA23xx only. To make the drivers "co-exist", perform the following: Option 1. 4.x support for QLA2100 6.x support for QLA2200,and QLA23xx o Remove QLA2200/QLA2300/QLA2312 support from the 4.x series driver: - Edit the qla2x00.c file - Look for the following line: {"QLA2300 ", QLA2300_DEVICE_ID, MAX_BUSES, OR {"QLA2312 ", QLA2312_DEVICE_ID, MAX_BUSES, - Above the found line, add this line: #if 0 - The resultant lines should read as: #if 0 {"QLA2300 ", QLA2300_DEVICE_ID, MAX_BUSES, OR #if 0 {"QLA2312 ", QLA2312_DEVICE_ID, MAX_BUSES, - Look for the following line: {"QLA2100 ", QLA2100_DEVICE_ID, MAX_BUSES, - Above the found line, add this line: #endif - The resultant lines should read as: #endif {"QLA2100 ", QLA2100_DEVICE_ID, MAX_BUSES, Option 2. 4.x support for QLA2100,and QLA2200 6.x support for QLA23xx. o Remove QLA2300/QLA2312 support from the 4.x series driver: - Edit the qla2x00.c file - Look for the following line: {"QLA2300 ", QLA2300_DEVICE_ID, MAX_BUSES, OR {"QLA2312 ", QLA2312_DEVICE_ID, MAX_BUSES, - Above the found line, add this line: #if 0 - The resultant lines should read as: #if 0 {"QLA2300 ", QLA2300_DEVICE_ID, MAX_BUSES, OR #if 0 {"QLA2312 ", QLA2312_DEVICE_ID, MAX_BUSES, - Look for the following line: {"QLA2200 ", QLA2200_DEVICE_ID, MAX_BUSES, - Above the found line, add this line: #endif - The resulting lines should read as: #endif {"QLA2200 ", QLA2200_DEVICE_ID, MAX_BUSES, ********************************************************************** 9. Diskette Content -------------------- The qla2x00src-v6.0.1b1.tgz files can be extracted into the following files: Makefile.kernel Config.in makefile qla_settings.h qla_debug.h ql2200_fw.h ql2300_fw.h qla2200.c qla2300.c qla2x00.c qla2x00.h qla2x00_ioctl.c qla_vendor.c qla_cfg.c qla_cfgln.c qla_fo.c qla_fo.cfg qla_inioct.c exioctln.h exioct.h inioct.h qla_cfg.h qla_dbg.h qla_def.h qla_fo.h qla_gbl.h qlfo.h qlfolimits.h qlfoln.h sdm_fo.h revision.notes - Revision history. release.txt - Release notes. README.qla2x00 - This file. ********************************************************************** 10. Contacting QLogic --------------------- Please visit QLogic's website (www.qlogic.com). On this site you will find product information, our latest drivers and links for technical assistance if needed. ====================================================================== Copyright (c) 2002 QLogic Corporation. All rights reserved.