                 QLogic Fibre Channel Driver

Products supported: QLA22XX, QLA23XX, QLA63XX

08/11/2004

Contents
--------

1. OS Support

2. Supported Features

3. Release History

4. Saving the Driver Source to Diskette

5. Installing the Driver
   5.1  Building the driver using the Source RPM package
        5.1.1 Installing the QLogic Driver Source RPM 
        5.1.2 Uninstalling the QLogic Driver Source RPM 
	5.1.3 Installing only the Driver Source from Source RPM 
	5.1.4 Query the content of the Source RPM package
   5.2  Building the driver using the Source TGZ package
        5.2.1. Building a Single Processor (UP) version of the driver
        5.2.2. Building a Symmetric Multiprocessor(SMP) version of the
               Driver
   5.3  Load the Driver Manually using insmod or modprobe
   5.4  Making a RAMDISK Image to Load the Driver

6. Driver Parameters

   6.1  System Parameters
   6.1.1  Multiple LUN Support
   6.2  NVRAM Parameters
   6.3  Driver Command Line Parameters

7. SNIA API Library Package

   7.1 Using Source RPM Package
   7.2 Using Driver Combo Package
       7.2.1  Installing SNIA API Library
       7.2.2  Uninstalling SNIA API Library		

8. Limitations

9. Additional Notes

   9.1 Proc Filesystem Support
   9.2 Coexistence of QLogic 4.x and 6.x Linux Drivers
   9.3 Failover Support :
       9.3.1 How To Enable The Failover Support In The Driver
       9.3.2 Using SANsurfer With QLA2XXX Driver The First Time
       9.3.3 Configuration Changes Made via SANsurfer
   9.4 Persistent Binding
   9.5 Configuration Data :
       9.5.1 QLA_OPTS (Configuration Update Utility)
       9.5.2 Compatibility With SMS (SANsurfer Management Suite)
       9.5.3 Manual Configuration Update
   9.6 How to Force Rescan of Devices
   9.7 Booting from SAN :
       9.7.1 Creating a Driver Disk (DD-Kit) image.
   9.8 How to Force a LIP

10. Contacting QLogic


**********************************************************************


1. OS Support 
-------------

Refer to the SUPPORTED_KERNEL_VERSION.txt file for a list of kernel
versions and different distributions tested with this 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
* Non Failover and Failover capability


**********************************************************************


3. Release History
------------------

Please refer to Release Notes (release.txt).


**********************************************************************


4. Saving the Driver Distribution / Source file to Diskette
-----------------------------------------------------------

1. Download the driver distribution file
   - qla2x00-vx.yy.zz-dist.tgz or the driver source file
   - qla2x00-vx.yy.zz.tgz from QLogic's website.

   * Failover compressed file has suffix "fo" while non failover 
     does not.		

2. If prompted "What would you like to do with this file?" choose 
   "Save this file to disk."

3. Insert a blank diskette and download to the diskette directly.


**********************************************************************


5. Installing the Driver 
------------------------

5.1  Building the Driver using the source RPM package 
------------------------------------------------------
The easiest way to install and build the QLogic Linux driver is to
use the source RPM package.  The only requirement for the rpm is the
kernel-sources which is normally installed when the kernel is installed
on the system. The following distributions are supported:

1.	Red Hat Advanced Server 2.1 
2.	Red Hat Enterprise Linux 3.0
3.	SUSE Linux Enterprise Server 8 (SLES 8)

5.1.1 Installing the QLogic Driver Source RPM 

	Install the Source RPM by executing the following command :
	
	# rpm -i  qla2x00-vX.XX.XXbXX-Y.ZZZZ.rpm
	
5.1.2 Uninstalling the QLogic Driver Source RPM 

	Uninstall the Source RPM by executing the following command :
	
	# rpm -e  qla2x00-vX.XX.XXbXX-Y

5.1.3 Installing only the Driver Source from Source RPM 

	Install only the Driver Source from Source RPM by executing 			the following command :
	
	# rpm -i --noscripts qla2x00-vX.XX.XXbXX-Y.ZZZZ.rpm

5.1.4 Query the content of the Source RPM package

	To Query the content of the RPM package, execute the following
        command:

	# rpm -qpl qla2x00-vX.XX.XXbXX-Y.ZZZZ.rpm | more


Note  :  Driver source is installed in - /usr/src/qla2x00  path upon 			 installation of the Source RPM. SNIA API Library is installed
	 as well. For more info about SNIA API please refer to section
	 7.1 

5.2  Building a Driver using the source TGZ package  
----------------------------------------------------

From the source code package *.tgz, you can build qla2200.o or qla2300.o for
either UP or SMP systems, and load the driver manually or automatically
using the RAMDISK image.


5.2.1 Building a Single Processor (UP) Version of the Driver
---------------------------------------------------------

For RedHat Distribution:

	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

	2. Using the diskette you created in Section 4, copy the distribution
	   file - qla2x00-vx.yy.zz-dist.tgz or the driver source file - 
	   qla2x00-vx.yy.zz.tgz to /qla2x00. Follow these steps from the
	   "/" (root) directory:

	       # mkdir qla2x00
	       # cd qla2x00
	       # mount /mnt/floppy
	       # cp /mnt/floppy/*.tgz . (the period at the end is required)
	       # tar -xvzf *.tgz

	       (Execute the following additional steps if you have copied
		the distribution file - qla2x00-vx.yy.zz-dist.tgz )
	       
	       # cd qlogic
	       # ./drvrinstall (this extracts the driver source files 
				to the current directory)

	 3. Build the Driver qla2200.o and qla2300.o from the source code by
	    typing:

	       # make all

For SuSE Distribution:

	1. Install the kernel-source from the SuSE distribution CD-ROM 
	   by typing:	

	       # yast  -i kernel-source  or
	       # yast2 -i kernel-source

	2. Create a soft link ( /usr/src/linux) to the kernel source 
	   (/usr/src/<linux-version>) by typing:

	       # ln -sf /usr/src/<linux-version> /usr/src/linux

	3. To ensure kernel version synchronization between the driver and
	   running kernel( for kernel version below 2.4.21), type the following:

      	# cd /usr/src/linux
		# make mrproper (completely clean the kernel tree) 
		# cp /boot/vmlinuz.config .config (copy the new config) 
		# make oldconfig (update configuration using .config) 
		# make dep (rebuild the dependencies) 
		# make modules (build the modules) 

	  Note : Above steps are not applicable for SuSE kernel 2.4.21 and 
	         beyond as its distributed with pre build kernel-headers.

	4. Using the diskette you created in Section 4, copy the distribution 
	   file - qla2x00-vx.yy.zz-dist.tgz or the driver source file 
	   - qla2x00-vx.yy.zz.tgz to /qla2x00. Follow these steps from the 
	   "/" (root) directory:

	       # mkdir qla2x00
	       # cd qla2x00
	       # mount /mnt/floppy
	       # cp /mnt/floppy/*.tgz . (the period at the end is required)
	       # tar -xvzf *.tgz

	       (Execute the following additional steps if you have copied
		the distribution file - qla2x00-vx.yy.zz-dist.tgz )
	       
	       # cd qlogic
	       # ./drvrinstall (this extracts the driver source files 
				to the current directory)

	5. Build the Driver qla2200.o and qla2300.o from the source code by
	   typing:
		
		For Kernel Version below 2.4.21:
	
		# make all OSVER=linux
		
		For Kernel Version 2.4.21 and above:

		#make all OSVER=linux-include/<configuration-name>
		 
		Ex:  For kernel version 2.4.21-107-itanium2, itanium2 is the
		     configuration-name and /usr/src/linux-include is a 
		     soft link to /usr/src/linux-2.4.21-107-include.	

NOTE: To load the driver manually, see section 5.3. To make a RAMDISK
      image to load the driver during system boot time, see section 5.4.


5.2.2. Building a Symmetric Multiprocessor (SMP) Version of the Driver
-----------------------------------------------------------------------

For RedHat Distribution:

	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

	2. Using the diskette you created in Section 4, copy the distribution 
	   file - qla2x00-vx.yy.zz-dist.tgz or the driver source file - 
	   qla2x00-vx.yy.zz.tgz to /qla2x00. Follow these steps from the 
	   "/" (root) directory:

	       # mkdir qla2x00
	       # cd qla2x00
	       # mount /mnt/floppy
	       # cp /mnt/floppy/*.tgz . (the period at the end is required)
	       # tar -xvzf *.tgz

	       (Execute the following additional steps if you have copied
		the distribution file - qla2x00-vx.yy.zz-dist.tgz )
	       
	       # cd qlogic
	       # ./drvrinstall (this extracts the driver source files
	       			to the current directory)

	3. Build the Driver qla2200.o and qla2300.o from the source code by
	   typing:

	       # make all SMP=1

For SuSE Distribution:

	1. Install the kernel-source from the SuSE distribution CD-ROM
	   by typing:	

	       # yast -i kernel-source or
	       # yast2  -i kernel-source

	2. Create a soft link ( /usr/src/linux) to the kernel source 
	   (/usr/src/<linux-version>) by typing:

	       # ln -sf /usr/src/<linux-version> /usr/src/linux

	3. To ensure kernel version synchronization between the driver and
	   running kernel( for kernel version below 2.4.21), type the following:

	      # cd /usr/src/linux
		# make mrproper (completely clean the kernel tree) 
		# cp /boot/vmlinuz.config .config (copy the new config) 
		# make oldconfig (update configuration using .config) 
		# make dep (rebuild the dependencies) 
		# make modules (build the modules) 

	  Note : Above steps are not applicable for SuSE kernel 2.4.21 and 
	  	 beyond as its distributed with pre build kernel-headers.


	4. Using the diskette you created in Section 4, copy the distribution
	   file - qla2x00-vx.yy.zz-dist.tgz or the driver source file 
	   - qla2x00-vx.yy.zz.tgz to /qla2x00. Follow these steps from the 
	   "/" (root) directory:

	       # mkdir qla2x00
	       # cd qla2x00
	       # mount /mnt/floppy
	       # cp /mnt/floppy/*.tgz . (the period at the end is required)
	       # tar -xvzf *.tgz

	       (Execute the following additional steps if you have copied
		the distribution file - qla2x00-vx.yy.zz-dist.tgz )
	       
	       # cd qlogic
	       # ./drvrinstall (this extracts the driver source files 
	       			to the current directory)

	5. Build the Driver qla2200.o and qla2300.o from the source code by
	   typing:

		 For Kernel Version below 2.4.21:
	
	           # make all SMP=1 OSVER=linux
		
		 For Kernel Version 2.4.21 and above:

		   # make all SMP=1 OSVER=linux-include/<configuration-name>
		 
		 Ex:  For kernel version 2.4.21-107-itanium2, itanium2 is the 
		      configuration-name and /usr/src/linux-include is a 
		      soft link to /usr/src/linux-2.4.21-107-include.	

NOTE: To load the driver manually, see section 5.3. To make a RAMDISK
      image to load the driver during system boot time, see section 5.4.



5.3  Load the Driver Manually using insmod or modprobe
------------------------------------------------------

Before loading the driver manually, build the driver binary by installing  Source RPM as described in sections 5.1.1 or from the driver source TGZ 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. Build the driver qla2200.o and qla2300.o from the source
          code by typing:

	  For RedHat Distribution:

          # make all install (build the driver and copy to the right location)

	  For SuSE Distribution:
	
	  # make all OSVER=linux install (build the driver 
	  				  and copy to the right location)

       2. Type the following to load the Driver:

          # modprobe qla2200
                  or
          # modprobe qla2300


5.4  Making a RAMDISK Image to Load the Driver
----------------------------------------------

1. Build the Driver binary files (see 5.2.1 and 5.2.2).

2. Install the driver : 

   For RedHat Distribution:

   # make all install
  
   For SuSE Distribution:
	
   # make all OSVER=linux install 

3. Add the following line to /etc/modules.conf.

   For RedHat Distribution:

       alias scsi_hostadapter0 qla2200_conf
       alias scsi_hostadapter1 qla2200
              or
       alias scsi_hostadapter0 qla2300_conf
       alias scsi_hostadapter1 qla2300

   NOTE: Add one entry for each HBA in the system. For example,
      If an QLA2200 and QLA2300 HBAs are installed add the following:

       alias scsi_hostadapter0 qla2200_conf
       alias scsi_hostadapter1 qla2200
       alias scsi_hostadapter2 qla2300_conf
       alias scsi_hostadapter3 qla2300

   For SuSE Distribution:

	You need to modify the /etc/sysconfig/kernel file to specify
	which modules are added during ram disk creation.

	NOTE: Please ensure the conf module is listed before the actual
	      driver module.  For example:

	    INITRD_MODULES="aic7xxx qla2300_conf qla2300 qla2200_conf qla2200"

4. Type the following command:

   For RedHat Distribution:

	 # mkinitrd -f <ramdisk image file name> <kernel version>

	 NOTE: This step overwrites the original ramdisk image file if 
         executed within the /boot directory. Specify a unique ramdisk
         image name to preserve the original ramdisk image.

      On IA-32
      --------
       - Copy the newly built <ramdisk image file name> file to /boot. 	

      On IA-64
      --------
       - Copy the newly built <ramdisk image file name> file to 
         /boot/efi/efi/redhat

   For SuSE Distribution:

         # /sbin/mk_initrd

         By default, the RAMDISK images created are:

         /boot/initrd
         /boot/initrd.suse

	   NOTE: This step overwrites the original ramdisk image file. 
                 To preserve the original ramdisk image specify a unique 
		 ramdisk image name as follows:

         # /sbin/mk_initrd  -k <kernel name>  -i <ramdisk image file name>
	 

5. Configure the boot loader with the new RAMDISK image.  

   For LILO:
	On IA-32
	--------
	Add "initrd=/boot/<ramdisk file name>" in 
	/etc/lilo.conf under one of the kernel entries 
	to use the RAMDISK image.
  
	Run "lilo" and reboot system. Select the kernel 
	with the new RAMDISK image to come up.
	
	On IA-64 
	--------
	For RedHat Distribution :
	
	Add "initrd=<ramdisk file name>" in 
	/boot/efi/efi/redhat/elilo.conf under one of the kernel entries 
	to use the RAMDISK image.
  
	Reboot system and Select the kernel with the new RAMDISK image 
	to come up.

	For SuSE Distribution :
	
	Add "initrd=/<ramdisk file name>" in 
	/boot/efi/SuSE/elilo.conf under one of the kernel entries 
	to use the RAMDISK image.
  
	Reboot system and Select the kernel with the new RAMDISK image 
	to come up.


   For GRUB:

	For RedHat Distribution :

	a) Add "initrd /<RAMDISK file name>" in /etc/grub.conf file under one 
	   of the kernel entries to use the RAMDISK image. For example:

		kernel /vmlinuz-2.4.18-14 ro root=LABEL=/
	        initrd /initrd-2.4.18-14.img

	b) Reboot the system.

	For SuSE Distribution :

	a) Add "initrd (hd0,1)/boot/<RAMDISK file name>" in /boot/grub/menu.lst
	   file under one of the kernel entries to use the RAMDISK image.
	   For example:

		kernel (hd0,1)/boot/vmlinuz root=/dev/hda2  max_scsi_luns=128
		initrd (hd0,1)/boot/initrd

	b) Reboot the system.


**********************************************************************


6. Driver Parameters
--------------------

6.1  System Parameters
----------------------

6.1.1  Multiple LUN Support
---------------------------

Support for multiple LUNs can be configured in one of three ways. 
Currently, the maximum number of LUNs that can be scanned for each
device is 128.

(1) The kernel must be configured to have multiple LUN support enabled
    in order for non-zero LUNs to be configured and accessible.  Use
    "make menuconfig" to build a kernel which has the option under 
    SCSI Support enabled to probe all LUNs on SCSI devices.


NOTE:  If you have multiple adapters, set max_scsi_luns to the
       largest number of LUNs supported by any one of these adapters.

(2) If the SCSI Mid-Layer is compiled in the kernel, the boot loader
    can be configured to scan for multiple LUNs each time the system
    boots.

	On IA-32
	---------

	For LILO, perform the following steps:
	
	a) Add the following line to each of the kernel images listed in the
	   /etc/lilo.conf file:

		append="max_scsi_luns=128"

	b) Run "lilo" and reboot the system.

	For GRUB, perform the following steps:

	For RedHat Distribution :

	a) Append the max_scsi_luns parameters to each of the kernel images 
	listed in the /etc/grub.conf file. For example:

	kernel /vmlinux-2.4.7-10 ro root=/dev/hda2 max_scsi_luns=128

	b) Reboot the system.

	For SuSE Distribution :

	a) Append the max_scsi_luns parameters to each of the kernel images 
	listed in the /boot/grub/menu.lst file. For example:

	kernel (hd0,1)/boot/vmlinuz root=/dev/hda2  max_scsi_luns=128

	b) Reboot the system.

	On IA-64
	--------
	For RedHat Distribution :

	a) Add the following line to each of the kernel images listed in the
	   /boot/efi/efi/redhat/elilo.conf 

		append="max_scsi_luns=128"
	b) Reboot the system.

	For SuSE Distribution :

	a) Add the following line to each of the kernel images listed in the
	   /boot/efi/SuSE/elilo.conf 

		append="max_scsi_luns=128"
	b) Reboot the system.


(3) If the SCSI Mid-Layer is compiled as a module, add the following
    line to the /etc/modules.conf file to scan for multiple LUNs at
    each boot:

	options scsi_mod max_scsi_luns=128
	
    and rebuild the RAMDISK image. For details on how to build the RAMDISK 
    image refer to steps 4 and 5 in section 5.3


6.2  NVRAM Parameters
---------------------

The NVRAM parameters are read by the driver at initialization time. Any 
changes made for the particular NVRAM feature in the Fast!Util do not
take effect until the driver is reloaded or changed by the SANsurfer utilities.


6.3  Driver Command Line Parameters
-----------------------------------
The driver gets its parameters from the command line itself or from  
modprobe 'option' directive found in the modules.conf file. The parameters 
are in simple <keyword>=value format, i.e. ql2xfailover=1. 
Where <keyword> is one of the following option parameters:

	Usage: insmod qla2300 <keyword>=value
	
*	ql2xfailover - This parameter defines whether failover mode is enable or 
	disable.  0 to disable; 1 to enable. 
	Default: 0

* 	ql2xmaxqdepth - This parameter defines the maximum queue depth reported to Scsi
 	Mid-Level per device. The Queue depth specifies the number of outstanding requests
	per lun.
	Default: 32.

* 	ql2xmaxsgs - This parameter defines the maximum number of scatter gather entries 
	that are reported to Scsi Mid-Level per request for the adapter. 
	Default: 32.

* 	ql2xmaxsectors - This parameter defines the maximum number of sectors that are
	reported to Scsi Mid-Level per request for the adapter. 
	Default: 512.

*	ql2xlogintimeout - This parameter defines the Login timeout value in seconds 
	during the initial login. 
	Default: 20 seconds

*	qlport_down_retry - This parameter defines how long to wait for a port that returns
	a PORT-DOWN status before returning I/O back to the OS.
	Default: 0  (use value specified in NVRAM)

*	ql2xretrycount - This parameter defines the maximum number of Scsi Mid-Level retries 
	allowed per command. 
	Default: 20 (standard mode value)
		     30 (failover mode value)

*	max_srbs - This parameter defines the maximum number of simultaneous
	commands that can be accepted from the Scsi Mid-Level per HBA. 
	Default: 4096.

*	displayConfig - This parameter defines whether to display the current configuration.
	1 - display the configuration; 0 - don't display the configuration.
	Default:  1 

*	Binding method  - This parameter defines what target persistent binding 
	method to use: 0 - bind by Portname and 1 - bind by PortID. 
	Default:  0  (portname binding)
	
*	extended_error_logging - This parameter defines whether to enable (1) or 
	Disable (0) writing the debug information to /var/log/messages.
	Default:  0  (disable)
	
*	MaxPathsPerDevice - This parameter defines maximum number of paths to a device
	Default:  8 (compile time only)	
	
*	MaxRetriesPerPath - This parameter defines how many retries to perform 
	on the current path before failing over to the next path in the path list.
	Default:  3 
	
*	MaxRetriesPerIo - This parameter defines total retries to do before failing 
	the command and returning to the OS with selection timeout (DID_NO_CONNECT).
	Default:  (MaxRetriesPerPath * MaxPathsPerDevice ) + 1

*	QlFailoverNotifyType - This parameter defines type of failover notification 
	mechanism to use when a failover or failback occurs. Certain storage systems require
	special CDB's to be issued to do failover or failback.
	Default:  0 (none)
	
*	ConfigRequired - This parameter defines how to bind the devices.
	0 - Present all the devices discovered to the OS. 
	1 - Present only the configured devices (i.e. the device defined in 
	/etc/qla2300_conf ) to the OS. 
	Default:  0 
	
*	FailbackTime - This parameter defines the delay in seconds before a failback 
	is performed to ensure all paths are available.
	Default:  5 seconds
	
*	RecoveryTime - This parameter defines the recovery time in seconds required 
	before commands can be sent to the restored path.
	Default:  10 seconds

	ql2xprocessnotready - This parameter defines the handling of the
	"NOT READY" by the driver.		
	Default: 1 - Handled by the driver
		 0 - Disable the handling within the driver
	
	All the available parameters can be viewed using one 
	of the following commands:

	# modinfo -p qla2300
	# modinfo -p qla2200
	# modinfo -p qla2100

 Usage examples:

    # insmod qla2300.o ql2xfailover=1
    # insmod qla2300.o qlport_down_retry=60


**********************************************************************

7. SNIA API Library Package
---------------------------
Its distributed (qlapi-<api_version>-rel.tgz) as part of driver combo package - qla2x00-vx.yy.zz-dist.tgz or qla2x00-vx.yy.zz-fo-dist.tgz and Source RPM package as well.

7.1  Using Source RPM Package
-----------------------------
Source RPM package automatically installs/setup the SNIA API Library.
API Library distribution file is installed in - /usr/src/qla2x00  path 
upon installation of the Source RPM. 

Please refer to section 5.1 for steps to install/uninstall source RPM 
package.

7.2  Using Driver Combo Package
-------------------------------
Using the diskette you created in Section 4, copy the distribution 
file - qla2x00-vx.yy.zz-dist.tgz to /qla2x00. Follow these steps 
from the "/" (root) directory:

       # mkdir qla2x00
       # cd qla2x00
       # mount /mnt/floppy
       # cp /mnt/floppy/*.tgz . (the period at the end is required)
       # tar -xvzf *.tgz
       # cd qlogic

7.2.1  Installing SNIA API Library
--------------------------------
Type the following command in current directory to install/setup API
library:

	       # ./libinstall (this installs/sets up HBA API library) 

7.2.2  Uninstalling SNIA API Library
----------------------------------
Type the following command in current directory to remove API library:

		# ./libremove	(Script file to remove HBA API library)


**********************************************************************

8. Limitations
--------------

	N/A
 

**********************************************************************


9. Additional Notes
-------------------


9.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/ directories. These 
directories contain a file for each QLogic Fibre Channel adapter
in the system. Each file presents information about the adapter
and transfers statistics for each discovered LUN.


9.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 resulting 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 resulting 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 resulting 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.3 Failover Support
--------------------

9.3.1 How to Enable The Failover Support In The Driver
------------------------------------------------------

Failover support can be enabled in the QLA2XXX driver by enabling the
macro MPIO_SUPPORT in qla_settings.h file ie

#define MPIO_SUPPORT                    1

or specifying the option on the commandline:
	insmod qla2300 ql2xfailover=1

Note: The failover distribution package, qla2x00-vx.yy.zz-fo-dist.tgz, 
      has the above macro enabled by default.

9.3.2 Using SANsurfer With QLA2XXX Driver The First Time
--------------------------------------------------------

1. To work with SANsurfer, the driver should always be built
   with MPIO_SUPPORT set to 1 in qla_settings.h.

2. Add the following parameter in modules.conf file:

   options qla2200 ConfigRequired=1 ql2xopts=
             or
   options qla2300 ConfigRequired=1 ql2xopts=

3. Now you can load the driver and SANsurfer.

9.3.3 Configuration Changes Made via SANsurfer
----------------------------------------------

1. LUN Masking

   For the new LUN masking configuration to take effect, the
   driver must be reloaded.  The following is an example of
   the sequence of actions to take:

   - Load the driver:

     modprobe <driver>

   - Load the qlremote agent.

   - Start the GUI and connect it to the destination system.

   - Make LUN masking changes.

   - Disconnect the host from GUI and stop qlremote agent.

   - Unload the driver:

     modprobe -r <driver>

   - Reload the driver:

     modprobe <driver>

   - Load qlremote agent again.

   - Start the GUI and connect it to the destination system.

   Now you should see the updated LUN masking configuration.

Please note that when using modprobe to load the driver, the
length of the option line specified in /etc/modules.conf file
has a limit of 2K characters. Any longer option line causes
a string overflow error from modprobe.


9.4 Persistent Binding
----------------------

The Persistent Binding information consists of some adapter configuration
entries along with some target entries. The entries are specified in
two formats: verbose and shorten.  The shorten format allows a bigger
configuration to fix in the limited space on the command line. An 
alternate to command line is the configuration file. See section 
8.5.

Persistent Binding  can be specified in two ways. Manually or via
SANsurfer. We recommend using SANsurfer for ease of use. Reference 
section 8.3.3 for additional information about SANsurfer. The 
following is the procedure to manually add persistent binding 
commands: 

The driver displays the current configuration when the displayConfig
command line option is specified. The persistent binding 
configuration is found in /var/log/messages file. It prints the 
configuration information in the format required by the driver.
The best way to extract configuration messages is to use grep and 
direct the output to a file. You need to remove the Linux timestamp at
the beginning of each message and combine them together on single line.
For example
        #insmod qla2300 displayConfig=1
        #grep "scsi-qla" /var/log/messages > /tmp/info.cfg

The format of the persistent binding commands is as follows: 

Device descriptions

scsi-qla<#>-adapter-port=<adapter port name value>;
OR
<#>-w=<adapter port name value>;    ** shorten format **
The designated by qla<#>, where the <#> is the adapter instance number.

The parameter specifies the FC port name to be used for the adapter.
where <adapter port name value> is the FC port name value in hexa-
    decimal format.  If this entry is not specified in the conf file,
    the default value is the adapter's port name as saved in the NVRAM.
Example:
scsi-qla00-adapter-port=210000e08b01158d\;

host adapter instance 0 has a portname of 210000e08b01158d

scsi-qla<#1>-tgt-<#2>-di-<#3>-node=<device FC name>;
OR
<#1>-<#2>-<#3>-n=<device FC name>;	** shorten format **
This parameter associates the specified <device FC name> with the
SCSI target ID value specified by <#2> and a device id value specified
by <#3>. where <device FC name> type is the FC node name of the 
device, and <#2> is the SCSI target ID to be assigned to the device 
and <#3> is the device unique id.
Where
   <#1>   Specifies the adapter instance number   
   <#2>   Specifies the SCSI ID of Target
   <#3>   Specifies the path/device id	

scsi-qla<#1>-tgt-<#2>-di-<#3>-port=<device FC name>;
OR
<#1>-<#2>-<#3>-p=<device FC name>;	** shorten format **
This parameter associates the specified <device FC name> with the
SCSI target ID value specified by <#2> and a device id value specified
by <#3>. where <device FC name> type is the FC port 
Where
   <#1>   Specifies the adapter instance number   
   <#2>   Specifies the SCSI ID of Target
   <#3>   Specifies the path/device id	(always 0 for non-failover)

name of the device, and <#2> is the SCSI target ID to be assigned to 
the device and <#3> is the device unique id.

scsi-qla<#1>-tgt-<#2>-di-<#3>-disabled=<256 bit mask>;
OR
<#1>-<#2>-<#3>-d=<256 bit mask>;	** shorten format **
This parameter associates the specified <256 bit mask> with the
SCSI target ID value specified by <#2> and a device id value specified
by <#3>. 

Where
   <#1>   Specifies the adapter instance number   
   <#2>   Specifies the SCSI ID of Target
   <#3>   Specifies the path/device id	

<256 bit mask>
msb                                                            lsb
 000000000000000000000000000000000000000000000000000000000000000F

the mask above makes the first four luns, 3, 2, 1, and 0 of a 
given Target disabled on that target/path.

This mask specification is heavily type checked to be a sequence of
64 hex digits.


9.5 Configuration Data
----------------------

Configuration/persistent data is loaded in the driver automatically when the
driver is installed and loaded. Normally this information is passed to the 
driver via the command line, but due to the constraints inherent in using 
the command line we have provide an alternate method using QLA_OPTS.

9.5.1 QLA_OPTS 
---------------
QLA_OPTS reads the configuration data from qla2N00.conf and updates 
the binary module qla2N00_conf.o . The driver automatically tries to load 
the binary module qla2N00_conf.o at driver initialization time. Once 
loaded, the module passes the configuration information directly to the driver.
The configuration data and module can be found in /etc/ with the filename 
based on the ISP board type:

		Configuration File  Module name
		------------------  -----------
		/etc/qla2200.conf   qla2200_conf.o
		/etc/qla2300.conf   qla2300_conf.o


Note: Approximately 300K of configuration space has been pre-allocated 
      within the qla2200_conf/qla2300_conf module for 
      configuration/persistent data.


9.5.2 Compatibility With SMS (SANsurfer Management Suite)
--------------------------------------------------------

QLA_OPTS works seamlessly with updated SMS applications. Originally, when
an SMS application saved a configuration the corresponding data was
written to the 'options' section of the modules.conf file in a form similar to
the following:

	ql2xopts=scsi-qla0-adapter-port=210000e08b000000\;scsi-qla0-tgt-1-di-0-node=20000020371682e7\;
	scsi-qla0-tgt-1-di-0-port=21000020371682e7\;scsi-qla0-tgt-1-di-0-pid=0000e2\;scsi-qla0-tgt-1-di-0-control=00\;

Now, the information is written to the appropriate qla2[2|3]00.conf file in
/etc and then branded to the binary file of the corresponding configuration
module (qla2200_conf.o or qla2300_conf.o):

   /lib/modules/<CURRENT_KERNEL_VERSION>/kernel/drivers/scsi

Where CURRENT_KERNEL_VERSION is the result of the command 'uname -r'. This
operation is performed automatically and requires no user intervention.  Of
course, if the driver was loaded from an initrd image, as before with the
modules.conf interface, the user would be required to rebuild the initrd image
after updating a configuration.


9.5.3 Updating Configuration Manually
--------------------------------------

Manually updating the /etc/qla2[2|3]00.conf file is strongly discouraged.
Because it can cause the binary module and the configuration file to get
out of sync. However, in the event that some persistent/configuration value 
needs to be changed manually, first change the /etc/qla2[2|3]00.conf file, 
then run "make install" from the driver's build directory to update the 
configuration module as well.


9.6 How To Force Rescan Of Devices
----------------------------------

Starting from driver version v6.06.00b12 there is support for the mechanism
which allows the user to force the driver to do re-scan of the devices to
allow a new device to be added. This triggers the driver to initiate lun
discovery process.

To do this from the command line: 

# echo "scsi-qlascan" > /proc/scsi/<driver-name>/<adapter-id>
(qlogic driver re-scans)

Where <driver-name> can be either one : qla2100/qla2200/qla2300	
<adapter-id> is the instance number of the HBA.

Once that has been done , user then can force the scsi mid layer to do its
own scan and build the device table entry for the new device:

# echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
(scsi mid layer re-scans)

Where "0 1 2 3" is replaced by your "Host Channel Id Lun". 

The scanning has to be done in the above mentioned order. First the driver
(qla2300/qla2200 driver etc) and then the Linux scsi mid layer (i.e. OS scan)
later.

9.7 Booting from SAN 
--------------------

9.7.1 Creating a Driver Disk (DD Kit) image
-------------------------------------------
The driver disk (DD Kit) image enables to install the RedHat/SLES 8 OS 
and QLogic driver(qla2300) on the Fibre Channel boot disk connected to the
QLogic Host Bus adapter(QLA23XX/QLA63XX).

For RedHat Distribution :

To build the driver disk image file for QLA23XX/QLA63XX HBA's perform 
the following steps:

(1) Download the sample kit (how_to_build_dd_kit_for_redhat.tgz) from 
    QLogic website:

	http://www.qlogic.com/

(2) Untar the tgz file:

	# tar -xvzf *.tgz

(3) Follow the instruction outlined in "HOW-TO-BUILD-dd-kit-for-RedHat.txt" 
    file to build the driver disk image file using the sample kit 
    - mod_devel_kit.tgz as an example.

For SuSE Distribution:

To build the driver disk image file for QLA23XX/QLA63XX HBA's perform 
the following steps:

(1) Download the sample kit (how_to_build_dd_kit_for_suse.tgz) from 
    QLogic website:

	http://www.qlogic.com/

(2) Untar the tgz file:

	# tar -xvzf *.tgz

(3) Follow the instruction outlined in "HOW-TO-BUILD-dd-kit-for-SuSE.txt" 
    file to build the driver disk image file using the sample kit 
    - update_media_kit.tgz as an example.

9.8 How to Force a LIP
----------------------

From driver version -v7.00.00b21 onward one can initiate a LIP
on a specific HBA during run time. Essentially, all one needs to do
is execute the following command :

	# echo "scsi-qlalip " > /proc/scsi/qla2300/<host_no>

to initiate the LIP reset process.

Following NVRAM options must be set in order to perform the LIP reset:

	o Enable Lip Reset
	o Enable Target Reset -- if the attached targets should be 
				       also be reset

If both the above parameters are disabled, a Full Login LIP is
executed.
  



**********************************************************************

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.


======================================================================






