****************************************************************************** mptlinux.txt ****************************************************************************** This file presents general information about the LSI Logic Fusion-MPT (TM) (Message Passing Technology) device drivers for Linux(TM). It also describes the features and use of the device drivers for the Linux operating system environment. This file is divided into the following sections: Introduction Features LSI Logic Devices Supported Fusion-MPT Linux Drivers Installing to a Fusion-MPT controller Adding Pre-Compiled Binaries to an Existing Installation Adding or Updating the Fusion-MPT Source in the Linux Kernel Adding Fusion-MPT Driver Source Updating the Bundled Fusion-MPT Driver Source Kernel Patch Instructions Driver Build Instructions Loading the Drivers As Modules Boot Setup Commands Syntax Available Arguments Configuring Network Interfaces for Fusion-MPT LAN Support Troubleshooting ******************************** Introduction ******************************** The mptlinux drivers are free software and are supported in source form. These drivers are distributed in the hope that they will be useful, but without any warranty and without even the implied warranty of merchantability or fitness for a particular purpose. You can redistribute them and/or modify them under the terms of version 2 or later of the GNU Public License as published by the Free Software Foundation. You should have received a copy of this license with your Linux kernel source tree (/usr/src/linux/COPYING). For detailed information on the GNU Public License, contact the Free Software Foundation, Inc at 59 Temple Place - Suite 330, Boston, MA 02111-1307 or at URL http://www.gnu.org/copyleft/gpl.html. === Features === o Supports SCSI and IETF-compliant LAN protocols concurrently over FC o Supports 1 Gbit/s Fibre Channel transfer rates (LSIFC909) o Supports 1 Gbit/s and 2 Gbit/s Fibre Channel transfer rates (LSIFC919, LSIFC929, LSIFC919X, LSIFC929X) o Supports Ultra320 transfer rates (LSI53C1030) o Supports LSI Logic Fusion-MPT Architecture and common software interface o Low host CPU utilization with one, or less than one, interrupt per I/O === LSI Logic Devices Supported === o LSIFC909 chips and LSI40909 adapters o LSIFC919 chips and LSI40919 adapters o LSIFC919X chips and LSI7102X adapters o LSIFC929 chips and LSI44929, LSI7402 adapters o LSIFC929X chips and LSI7202X, LSI7402X adapters o LSI53C1020 chips and LSI20320 adapters o LSI53C1030 chips and LSI22320, LSI21320 adapters o LSI53C1035 chips when operating in SCSI mode ****************** Fusion-MPT Linux Drivers ******************* The mptlinux drivers are provided in binary and source form to provide the greatest flexibility to our customers. The binaries are suitably formatted for use as installation diskettes or post-install binary upgrades. The source may be added to an existing kernel for custom kernel builds. The binaries and source may be downloaded from the LSI Logic website, http://www.lsilogic.com or from the anonymous ftp site, ftp://ftp.lsil.com/HostAdapterDrivers/linux/Fusion-MPT. === Installing to a Fusion-MPT controller === The Fusion-MPT driver is a bundled boot controller for Red Hat releases beginning with 7.3 and for SuSE releases beginning with 8.0. You may install to a disk attached to the controller with no additional media. LSI Logic provides 1.44MB images that are suitably formatted to use as driver update disks for those installations where there is no bundled driver: Red Hat 7.0, 7.1, 7.2 (32 bit and 64 bit), 7.3 and 2.1ASE SuSE 7.2, 7.3 and 8.0 Caldera 3.1 and 3.1.1 On the ftp site, ftp> cd 2.05.10 ftp> cd mptlinux-disks download the Vendor readme file, for further instructions and download the appropriate tarball. For all other releases, the bundled driver must be used for installation. Post-installation upgrades are possible by using the driver RPM. On the ftp site, ftp> cd 2.05.10 ftp> cd mptlinux-rpms download the README_rpms.txt file to obtain a listing of the kernels supported by the RPM. === Adding Pre-Compiled Binaries to an Existing Installation === Driver binaries are provided in 1.44MB images that are suitably formatted to use as driver update disks for: Red Hat 7.0, 7.1, 7.2 (32 bit and 64 bit), 7.3 and 2.1ASE SuSE 7.2, 7.3 and 8.0 Caldera 3.1 and 3.1.1 and in RPMS: Red Hat i686 : 7.2, 7.3, 8.0, 9, 2.1ASE Red Hat ia64 : 7.2, 2.1ASE SuSE x86 : 7.2, 7.3, 8.0, 8.1, 8.2, SLES8 SuSE x86_64: SLES8 RPMs should be used to upgrade the driver post-install. The RPMs contain binaries for the install kernel and the latest released errata kernel for each distribution at the time the RPM was created. The README_rpms.txt file to obtain a listing of the kernels supported by the RPM. The update disks should be used for architectures not supported by RPM. To use the driver disks, follow the instructions from the previous section to transfer the image to a diskette. Then: # mount /dev/fd0 # cd /mnt/floppy # ./post_install.scr # cd # umount /dev/fd0 To use the RPMs, the standard install, erase and upgrade commands may be used. The driver source will be placed in your installations RPM Base directory, i.e. /usr/src/redhat or /usr/src/packages. On the ftp site, ftp> cd 2.05.10 ftp> cd mptlinux-rpms download the appropriate tarball. === Adding or Upgrading Fusion-MPT Source to the Linux Kernel === This is a two step procedure: 1) Add or Upgrade the Fusion-MPT source 2) Patch the Kernel ------ Updating Bundled Fusion-MPT Driver Source It is recommended that the original source be saved: # cd /usr/src/linux/drivers/message # tar czvf fusion.orig.tar.gz fusion Continue with the instructions in "Adding Fusion-MPT Driver Source" ------ Adding Fusion-MPT Driver Source For Red Hat 7.0, all 2.2 and 2.4.0 through 2.4.6 kernels, Fusion-MPT support must be added to the kernel source. The mptlinux driver source tar archive should be unpacked in a temporary directory (/home//mptlinux-tmp). Example: $ cd $ mkdir mptlinux-tmp $ cd mptlinux-tmp $ zcat /tmp/mptlinux-2.05.10-src.tar.gz | tar xvf - Run the script "install" to install the source to the kernel directory. For example, to install the source into /usr/src/linux-2.4.18-20 $ su root # ./install /usr/src/linux-2.4.18-20 Continue with "Kernel Patch Instructions" ------ Kernel Patch Instructions The mptlinux host drivers may require a small set of patches to your linux kernel source tree. Patch sets for stock and "well known" kernel versions have been included with the packed source tar archive. Patches may be required even if the mptlinux driver is currently bundled. *** No Patches are required for kernels > 2.4.18 That is, no kernel patches are required for: 2.4.18-3, 2.4.18-4, ..(Red Hat 7.3 ...) 2.4.18-4GB (SuSE 8.0) 2.4.19 For IA64 installations, please see Remark 2 below. Fusion patch files available for linux 2.2.x kernel versions: 2.2.5-15, 2.2.5-16, (Red Hat 6.0) 2.2.12, 2.2.12-20, (Red Hat 6.1) 2.2.13, 2.2.14, 2.2.14-5.0, 2.2.14-6.0, (Red Hat 6.2) 2.2.14-caldera, (Caldera 2.3.1) 2.2.15, 2.2.16, 2.2.16-22, (Red Hat 7.0) 2.2.17, 2.2.18, 2.2.18-2, (TurboLinux 6.5) 2.2.19, 2.2.20 Fusion patch files available for linux 2.4.x kernel versions: 2.4.0, 2.4.1, 2.4.2, 2.4.2-2, (Red Hat 7.1) , (Caldera 3.1) 2.4.3, 2.4.3-6, (Red Hat 7.1, SBE) 2.4.3-12, (Red Hat 7.1, upd#1) 2.4.4, 2.4.4-4GB, (SuSE 7.2 - i386 and ia64) 2.4.5, 2.4.5-3, (TurboLinux 7.0) 2.4.6, 2.4.7, 2.4.7-10, (Red Hat 7.2) 2.4.7-4GB, (SuSE Enterprise Server 7) 2.4.8, 2.4.9, 2.4.9-e.3, (Red Hat 7.2 ASE) 2.4.9-6, (Red Hat 7.1, upd#2) 2.4.9-13, (Red Hat 7.2, upd#1) 2.4.9-18, (Red Hat 7.2 IA64) 2.4.9-21, (Red Hat 7.2, upd#2) 2.4.9-31, (Red Hat 7.2 IA64, upd#1) 2.4.9-34, (Red Hat 7.2 IA64, upd#2) 2.4.10, 2.4.10-4GB, (SuSE 7.3) 2.4.11 (broken kernel, do not use), 2.4.12, 2.4.13, 2.4.13-caldera, (Caldera 3.1.1) 2.4.14, 2.4.15, 2.4.16, 2.4.17, 2.4.18, No Patches are required for kernels > 2.4.18 That is, no kernel patches are required for: 2.4.18-3, 2.4.18-4, ..(Red Hat 7.3 ...) 2.4.18-4GB (SuSE 8.0) 2.4.19 Fusion patch files available for linux 2.5.x kernel versions: Fusion support starts with kernel 2.4.24. No patches required. NOTES: o The Fusion-MPT LAN driver is NOT supported in any of the 2.2.x kernels listed here. You MUST be working with a linux-2.4.x kernel for Fusion-MPT LAN support. o For module support under 2.3.x and 2.4.x kernels you must have modutils v2.3.15 or newer installed. o IA64 support requires a linux-2.4.x kernel. To identify which kernel version you have, examine your /usr/src/linux/Makefile as follows: Example (on a RedHat(TM) 6.2 system): VERSION = 2 PATCHLEVEL = 2 SUBLEVEL = 14 EXTRAVERSION = -5.0 Then apply the closest patch set you can find. Example (on a Red Hat 6.2 system): # cd /usr/src/linux-2.2.14-5.0 # patch -p0 < /home//mptlinux-tmp/drivers/message/fusion/patch/linux-2.2.14-5.0.txt These patches will apply small changes to the following files: Makefile arch/alpha/config.in arch/i386/config.in arch/sparc64/config.in drivers/Makefile include/linux/miscdevice.h include/linux/proc_fs.h Remark 1: You may not find an exact match for your kernel, however, applying the closest patch set *should* work, in general, but may require that you manually fixup any files for which the patch procedure might produce *.rej file sections. You might optionally choose to hand-apply the small set of required kernel patches by examining one or more of the kernel patch files. Remark 2: The Fusion-MPT driver will not show as an elgible driver in the configuration menu unless arch/ia64/config.in contains the line: source drivers/message/fusion/Config.in Depending on the kernel you are using, the supplied patch may or may not contain this fix-up. In this case, please add this line manually. See the patch linux-2.4.9-18.txt for a prototype. ------ Driver Build Instructions The following examples illustrate configuring and building the LSI Logic Fusion-MPT driver(s) as kernel modules, however, please note that the MPT base and ScsiHost drivers can alternatively be compiled into the linux kernel instead of built as modules. 1. From the /usr/src/linux directory, ensure a clean kernel source tree by executing the following command: # make mrproper 2. From the /usr/src/linux directory, run your normal kernel configuration routine: # make oldconfig or: # make config or: # make menuconfig or: # make xconfig 3. Look for the new top-level "Fusion-MPT device support" entry: Fusion-MPT device support ---> and select it to access the Fusion-MPT drivers submenu entries: Fusion-MPT (base + ScsiHost) drivers Enhanced SCSI error reporting < > Fusion-MPT misc device (ioctl) driver < > Fusion-MPT LAN driver On the submenu, select the "Fusion-MPT (base + ScsiHost) drivers" line, and then enter "m" to configure for building this support as a module. (Alternatively, you can enter "y" here to have this support built into the kernel.) NOTES: o Enhanced SCSI error reporting and ioctl drivers are optional, and it is recommended they only be built as modules, due to kernel size considerations. o DO NOT answer "y" for Fusion-MPT LAN driver option as support for this driver is currently restricted to module use only. 4. For LAN support, make sure that "Fibre Channel driver support" is turned on in the "Network device support" section. 5. Save your kernel config changes. Follow any post config instructions and do everything needed on your platform to rebuild the kernel. This will typically include: # make dep and: # make bzImage # varies on non-intel platforms 6. Rebuild the kernel modules: # make modules 7. Optionally, (and potentially dangerous!), do everything needed on your platform to install a newly built kernel. (possibly temporarily, for sanity testing) Take care with this step and make sure you know what you're doing as it's easy to wipe out a good/stable kernel from here on out! 8. (Re)Install newly compiled kernel modules: # make modules_install The output from the last step should look something like this: Installing modules under /lib/modules/2.2.14-5.0/block Installing modules under /lib/modules/2.2.14-5.0/net Installing modules under /lib/modules/2.2.14-5.0/ipv4 Installing modules under /lib/modules/2.2.14-5.0/scsi Installing modules under /lib/modules/2.2.14-5.0/fs Installing modules under /lib/modules/2.2.14-5.0/fs Installing modules under /lib/modules/2.2.14-5.0/cdrom Installing modules under /lib/modules/2.2.14-5.0/video Installing modules under /lib/modules/2.2.14-5.0/net Installing modules under /lib/modules/2.2.14-5.0/misc 9. Update your /boot sector with the new System.map and bzImage, re-create your ramdisk image (refer to your vendor literature) and update your boot manager, i.e., lilo.conf, grub.conf. If you are using lilo, you must run lilo -v prior to reboot. 10. Shut down the system: Example: # shutdown -r now and then reboot with the newly built linux kernel. === Loading the Drivers As Modules === The new driver binaries are ready to be loaded. 1. Load the Fusion-MPT base driver. # insmod mptbase Fusion-MPT base driver 2.05.10 Copyright (c) 1999-2002 LSI Logic Corporation mptbase: Initiating ioc0 bringup ioc0: FC919: Capabilities={Initiator,Target,LAN} mptbase: 1 MPT adapter found, 1 installed. 2. Load the isense driver (optional but highly recommended), to enable enhanced SCSI error reporting. # insmod isense SCSI-3 Opcodes & ASC/ASCQ Strings 2.05.10 mptbase: English readable SCSI-3 OPs & ASC/ASCQ strings enabled. 3. Load the Fusion-MPT SCSI host driver. # insmod mptscsih Fusion-MPT SCSI Host driver 2.05.10 Depending on what FC devices you have attached to your FC link, you should see something like the following on the console and in the system log: scsi0 : ioc0: LSIFC919, FwRev=1000h, Ports=1, MaxQ=256, IRQ=9 scsi : 1 host. Vendor: SEAGATE Model: ST39102FC Rev: 0007 Type: Direct-Access ANSI SCSI revision: 02 Detected scsi disk sda at scsi0, channel 0, id 0, lun 0 Vendor: SEAGATE Model: ST19171FC Rev: 0017 Type: Direct-Access ANSI SCSI revision: 02 Detected scsi disk sdb at scsi0, channel 0, id 1, lun 0 SCSI device sda: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] sda: sda1 SCSI device sdb: hdwr sector= 512 bytes. Sectors= 17783112 [8683 MB] [8.7 GB] sdb: sdb1 All Fibre Channel target devices should be detected and mapped to linux SCSI devices, /dev/sd{a,b,c,...} when the mptscsih module is loaded. All linux commands pertaining to SCSI disk storage management (fdisk, mke2fs, mount, etc.) using the /dev/sdX[N] notation should now be functional. FCP (SCSI) Device Access Example: # fdisk /dev/sdb # mke2fs /dev/sdb1 # mount /dev/sdb1 /mnt/s1 === Boot Setup Commands === 1. Syntax Setup commands can be passed to the SCSI host driver mptscsih as a string variable using 'insmod'. The following command will install driver module with the bus width set to narrow and Domain Validation disabled. insmod mptscsih.o mptscsih="dv:n width:0" Each string argument must be specified as "keyword:value". Only lower-case characters and digits are allowed. 2. Available Arguments 2.1 Domain Validation dv:n disabled dv:y enabled [default] The SCSI host driver will perform a sequence of write, read and compare commands to each target device during driver initialization. If data corruption or bus hangs are detected during this sequence, the driver will automatically slow the transfer rate until reliable transmission is achieved. Warning! These tests use a devices internal buffer. Some older SCSI devices behave badly, that is, freeze, when they receive a Read or Write Buffer command. DV may be disabled on a per-device basis by setting the transfer characterists to ASYNC and NARROW in the adapter BIOS. Alternatively, DV may be disabled for the driver by passing in dv:n as a command line argument. This option is has no effect for LSIFC9XX parts. 2.2 Maximum SCSI Bus Width width:0 wide SCSI disabled width:1 wide SCSI enabled The maximum allowed SCSI bus data transfer width is set to the minimum of the command line options, adapter capabilities, and NVRAM settings. This option is has no effect for LSIFC9XX parts. 2.3 Minimum SCSI Synchronous Factor factor:0x08 Ultra320 (160 Mega-transfers / second) factor:0x09 Ultra160 ( 80 Mega-transfers / second) factor:0x0A Ultra2 ( 40 Mega-transfers / second) factor:0x0C Ultra ( 20 Mega-transfers / second) factor:0x19 FAST ( 10 Mega-transfers / second) factor:0x32 SCSI ( 5 Mega-transfers / second) factor:0xFF 5 Mega-trasfers/second and asynchronous The minimum allowed SCSI synchronous factor is set to the maximum of the command line input, adapters capabilities and NVRAM setting. If the minimum synchronous factor is 0xFF, the synchronous offset will be set to 0 (asynchronous). This option is has no effect for LSIFC9XX parts. === Configuring Network Interfaces for Fusion-MPT LAN Support === You can use ifconfig or your own superb knowledge of network configuration files and vi/emacs to setup the needed info so that you can use your Fusion-MPT LAN connection. The instructions below are specifically for ifconfig, but they should be easily adapted to other utilities. 1. Determine your networking configuration # ifconfig -a Locate the ones with names "fcX" where "X" is the IOC number. 2. To bring up an ethernet interface for fcX, say # ifconfig fcX inet 192.168.1n.x netmask 255.255.255.0 up The value "n" will give the separate FC controllers different domains. The value "x" must be unique and be between 1 and 255. This is the node value. Set your netmask to whatever is used on your network. The default is 255.255.255.0, and should be used unless your network admin says otherwise. 3. To disable the interface, replace "up" with "down", i.e. # ifconfig fcX inet 192.168.1n.x netmask 255.255.255.0 down 4. Example: System A: # ifconfig fc0 inet 192.168.10.1 netmask 255.255.255.0 up # ifconfig fc1 inet 192.168.11.1 netmask 255.255.255.0 up System B: # ifconfig fc0 inet 192.168.10.2 netmask 255.255.255.0 up # ifconfig fc1 inet 192.168.11.2 netmask 255.255.255.0 up Then you can ping from either channel on System A to either channel on System B. ****************************** Troubleshooting ******************************* 1. The SCSI driver error reporting has been nicely enhanced, making it much more readable. Also, there's an (optional) isense driver/shim which provides SCSI-3 opcode string lookup and a LARGE sorted table of 463 unique SCSI-3 Additional Sense Code & Qualifier (ASC/ASCQ) strings, translated directly from a text file off the SCSI T10.org's ftp site: ftp://ftp.t10.org/t10/drafts/spc2/asc-num.txt If the isense driver is (optionally) loaded, whenever a SCSI check condition is generated[1], an english readable ASC/ASCQ string for the SCSI error. Here's an example: ----- SCSI Error (::) SCSI_Status=02h (CHECK_CONDITION) Key=2h (NOT READY); FRU=02h ASC/ASCQ=29h/00h "LOGICAL UNIT NOT READY, INITIALIZING CMD. REQUIRED" CDB[]: 2A 00 00 00 00 41 00 00 02 00 - "WRITE(10)" ----- If the isense driver is NOT installed, neither the SCSI opcode string nor the last ASC/ASCQ string will be displayed. The SCSI Error report will be displayed only if the error occured on a SCSI read or write command. Any errors on other commands, Request Sense, Test Unit Ready, etc., will not be displayed. 2. If you have compiled your linux kernel with /proc file system support, you can examine SCSI devices using this command: $ cat /proc/scsi/scsi A summary of attached/recognized Fusion-MPT adapters can be examined with the following command: $ cat /proc/mpt/summary The driver version is stored in $ cat /proc/mpt/version 3. If you have a LSI Fibre Channel RAID subsystem attached, some of the standard linux SCSI devices that show up will not be accessible, depending on the exact configuration of the RAID controller(s). For example, if you have dual active controllers in one subsystem with 8 active LUNs configured for each controller, all 16 LUNs will be visible through each controller (32 SCSI devices total), although only 8 LUNs will actually be accessible from each controller. There is currently no filtering out of the "visible but not accessible" entries. ****************************************************************************** Fusion-MPT is a trademark of LSI Logic Corporation Linux is a registered trademark of Linus Torvalds Red Hat is a registered trademark of Red Hat Software, Inc. ******************************************************************************