Linux RHEL 2.1 and 3.0 MegaRAID2 driver Version 2.10.7 Contents 1.0 Supported RAID controllers 1.1 Compatible Firmware Versions 2.0 Install Instructions 2.1 Downloading and Creating the Driver Diskette 2.2 Installing the Driver for the PERC 2.2.1 Installing the Driver during OS Installation 2.2.2 Updating the Driver using RPM after OS is Installed 2.2.3 Building the Driver using DKMS for other kernels 2.2.4 Uninstalling the Driver 3.0 Fixes and Enhancements 4.0 Important Information 5.0 Additional Information 6.0 Release History ============================== 1.0 Supported RAID controllers ============================== This driver supports the following controllers: PERC 4e/Di, 4e/Si, 4e/DC PERC 4/Di, 4/DC, 4/SC PERC 3/QC, 3/DC, 3/DCL, 3/SC 1.1 Compatible Firmware Versions ================================ This device driver is compatible with the following firmware versions: Controller Minimum firmware level Description ---------- ---------------------- ----------- PERC 3/QC 1.92 PERC 3 Quad Channel PERC 3/DC 1.92 PERC 3 Dual Channel PERC 3/DCL 1.92 PERC 3 Dual Channel Lite PERC 3/SC 1.92 PERC 3 Single Channel PERC 4/Di 4.04 PERC 4 Integrated on PE 1750 PERC 4/Di 2.37 PERC 4 Integrated on PE 2600 PERC 4/SC 3.28 PERC 4 Single Channel PERC 4/DC 3.28 PERC 4 Dual Channel PERC 4e/Di 513O PERC 4e Integrated on PE 2800, 2850 PERC 4e/Si 513O PERC 4e Integrated on PE 1850 PERC 4e/DC 513O PERC 4e Dual Channel ======================== 2.0 Install Instructions ======================== 2.1 Downloading and Creating the Driver Diskette ================================================= You will need a formatted 3 1/2 inch floppy diskette for the following procedure. 1. On a Linux system: Download the file perc-2.10.7-A10.tar.gz to a temporary directory on your working system. Extract the file to the floppy disk as follows: Type the following commands under a Linux command shell: mount /dev/fd0 /mnt/floppy tar xvzf (full path to the archive) -C /mnt/floppy (Eg: /temp/perc-2.10.7-A10.tar.gz) umount /mnt/floppy NOTE: Winzip does not extract the driver files correctly under Microsoft Windows. 2. On a Windows system: You will need a formatted 3 1/2 inch floppy diskette for the following procedure. Download the perc-2.10.7-A10.exe file to a temporary directory on your Windows system. 1) Double click on the file to run the executable. 2) Click on the Continue button. This diskette contains the same files as the .tar.gz file above. 2.2 Installing the Driver for the PERC ====================================== This PERC driver package contains compiled binary drivers for the following kernels: Fresh Install using driver diskette ----------------------------------- RHEL 3.0 - 2.4.21-4.EL (uP, smp and enterprise) RHEL 2.1 - 2.4.9-e.3 (uP, smp and enterprise) - 2.4.9-e.34 (uP, smp and enterprise) Upgrade using RPM ----------------- RHEL 3.0 - 2.4.21-4.EL (uP, smp and enterprise) RHEL 2.1 - 2.4.9-e.3 (uP, smp and enterprise) - 2.4.9-e.34 (uP, smp and enterprise) NOTE: The kernel versions mentioned above are Dell supported kernels. For all other kernels, the driver can be automatically compiled and installed. This operation is done only for the currently running kernel and requires the kernel-source and gcc packages to be installed on the system. There are two ways of installing the device driver on Redhat Linux. One is using a driver disk during OS installation and the second is using a driver RPM to update the driver after OS is installed. The steps for both of these methods are provided below. All the files needed for both methods are included in the diskette created above. For more detailed installation instructions of Red Hat, please refer to the OS installation guide at http://www.dell.com/linux. 2.2.1 Installing the Driver during OS Installation ================================================== The following files are needed to install the device driver during a fresh installation. a. modinfo b. modules.cgz c. modules.dep d. pcitable e. rhdd-6.1 These five files are contained in the driver diskette created above. Instructions for Redhat Enterprise Linux 2.1 -------------------------------------------- 1. Boot normally from the Redhat installation CD-Rom. 2. Type 'expert noprobe dd' on the boot prompt. 3. At the "Do you have a driver disk" screen, select 'Yes'. 4. At the "Insert your driver disk" screen, insert the driver disk created above and select 'OK' to continue. 5. Select the appropriate choices on the next three prompts. 6. At the "I don't have any special device..." select 'Add Device'. 7. At the "What kind of devices would you like to add", select 'SCSI'. 8. Scroll down and select the "MegaRAID2" driver, and select 'OK'. 9. Select any additional devices in your system manually by selecting 'Add Device' or select 'Done' to proceed. 10. Complete the installation as directed by the install. Instructions for Redhat Linux 3.0 --------------------------------- 1. Boot normally from the Redhat installation CD-Rom. 2. Type 'expert noprobe dd' on the boot prompt. 3. At the "Do you have a driver disk" screen, select Yes. 4. At the "Driver Disk Source" screen, select fd0 (for floppy) 5. At the "Insert Driver Disk" screen, insert the driver disk created above and select OK to continue. 6. At the "Error - No devices of the appropriate type were found..." screen, select "Manually choose". 7. Scroll down and select the "MegaRAID2" driver. 8. Select any additional devices in your system manually. 9. Complete the installation as directed by the install. 2.2.2 Updating the Driver using RPM after OS is Installed ========================================================= Type the following commands under a Linux command shell: mount /dev/fd0 /mnt/floppy cd /mnt/floppy source install.sh Reboot the system for the changes to take effect. NOTE: The megaraid2 module in only installed for the kernel currently running. 2.2.3 Building the Driver using DKMS for other kernels ====================================================== NOTE: If a binary errata kernel RPM is installed after installing the megaraid2 driver RPM, error messages may be seen when building the INITRD image. This is because the megaraid2 module is not installed for this kernel and is being referenced in the /etc/modules.conf file. To build the megaraid2 driver for any kernel, the following prerequisite packages need to be installed: - The megaraid2 RPM included in this package - Kernel source for the kernel in question - Kernel building tools such as gcc To build and install the megaraid2 driver for a kernel, type the following commands under a Linux shell: # dkms build -m megaraid2 -v v2.10.7 -k # dkms install -m megaraid2 -v v2.10.7 -k where is the kernel version. E.g. 2.4.20-9 OR 2.4.9-e.24enterprise Refer to the DKMS man page for more information. # man dkms 2.2.4 Uninstalling the Driver ============================= If this driver has been installed using the RPM as described in section 2.2.2, it can be uninstalled by the following command: rpm -e megaraid2 Reboot the system for the changes to take effect. ========================== 3.0 Fixes and Enhancements ========================== 1. Improved driver error handling and memory utilization 2. Improved driver algorithm when logical drives are deleted out of sequence =================== 4.0 Important Notes =================== - This driver update package only contains support for x86 based processors. - A warning message is encountered when a logical disk is configured without a partition. After Linux OS installation or any action that causes system devices to be scanned, you will see the following warning message right after the login screen: "megaraid: invalid partition on this disk on channel 0" This message will disappear once a partition is created on all logical drives or if the logical drive without a partition is deleted. - A warning message is seen if errata kernel RPMs are installed after installing the megaraid2 driver. The following message is printed: "No module megaraid2 found for kernel x.y.z-p" This message is seen because the /etc/modules.conf file specifies that the megaraid2 driver is to be added to the initial RAM disk (initrd), but the driver is not yet built and installed for the kernel by DKMS. To boot from this kernel, the megaraid2 driver should be built and installed for the kernel as described in section 2.2.3 and then adding the line: initrd /initrd-x.y.z-p.img to /etc/grub.conf in the stanza for the kernel version installed. - After performing a fresh Linux installation using the driver update, the /etc/modules.conf file may contain unused entries specific to the native 'megaraid' driver that has been replaced by this 'megaraid2' driver update package. 'alias scsi_hostadapter1 megaraid' These entries are created during the operating system installation and may generate error messages during the OS boot process by attempting to load the 'megaraid' driver after 'megaraid2' has already been loaded. To avoid these messages, it is recommended to delete the unused 'megaraid' entries from the etc/modules.conf. - During the fresh Linux installation, the operating system cannot determine drive/device order information based on system BIOS settings. This may lead to undesired drive/device orderings during the install. It is recommended to perform the install with only the target hard drives and storage controller present that you intend to install to, then later add the additional storage controllers and hard drives to the system once the installation is complete. For an existing RHEL 2.1 installation, the addition of another storage controller may change the boot device ordering and impact the operating systems ability to find the root file system partition. To ensure that the operating system can still properly find the partition, it is recommended that before adding the additional controller to edit the /etc/grub.conf and /etc/fstab to use file system labels instead of the hard-coded device names. (Ex. root=LABEL=/ instead of root=/dev/sda2) This change is not necessary in RHEL 3.0 or later since those installers already already utilizes file system labels during installation. ========================== 5.0 Additional information ========================== dkms-1.10-1.noarch.rpm - Dynamic Kernel Module Support utility (DKMS) install.sh - Installation script. license.txt, GPL - License information dell-megaraid2-v2.10.7-32bit-1dkms.noarch.rpm - Megaraid2 binary and source RPM with DKMS support. perc-2.10.7-A10.txt - This document README.dkms - Documentation for DKMS =================== 6.0 Release History =================== ### Version 2.10.1 i. Fixed a bug where PCI-Express based controllers would not be able to use more than 4GB main memory with 2.10.0 driver. ii. Remove redundant PCI-handle allocation. ### Version 2.10.0 i. Added vendor ids and device ids for PCI-Express controllers, PERC4e/Si, PERC4e/Di, PERC4e/DC ii. Backport some minor changes from 2.6 kernel version of the driver. ### Version 2.00.9a i. Minor changes which are brought in when sync'ing with kernel 2.9-test6. ii. Use sizeof(mbox_t) in synchronous routines instead of hard-coded value of 16 bytes. iii. De couple adapter->host->pci_dev. Replace with adapter->pdev ### Version 2.00.9 i. For extended passthru commands, 64-bit scatter-gather list and 64-bit mailbox address must only be used if the controller supports extended CDBs and 64-bit addressing and the kernel is configured to support memory beyond 4GB. With 2.00.8 and previous drivers, if the controllers supports extended CDBs but the kernel does not support high memory - the driver prepares a 32-bit sg list but the mailbox address is chosen to be 64-bit. This causes FW to incorrectly read 32-bit (8 bytes) sg list as 64-bit (12 bytes) sglist. This would cause IO from non-disk devices to fail ### Version 2.00.8 i. Make sure the value of number of statuses, completed command id array, and the mailbox status fields are updated in host memory before we read and interpret them. For this to happen - mailbox numstatus and command id array's first element are invalidated. The ISR busy waits till valid values are obtained in these two fields. Now since the status field is between these two fields it is assumed that status values is sane when write to numstatus and completed id array is complete ii. while returning from the ioctl handler for the SCSI passthru commands a direct access was made to the user address. Now the user structure is copied in before the required field is accessed. iii. Remove redundant volatile casts from pending command counter pend_cmds. ### Version 2.00.7 i. Adapter lock re-definition so that patch for kernels w/o per host lock is less intrusive ii. While in abort and reset handling, check for non-empty pending list is invalid. The intent is to wait for pending commands in FW to complete, not the pending commands with the driver ### Version 2.00.6 i. Declare the function prototypes used for "/proc" within the compiler directives #ifdef CONFIG_PROC_FS. Similarly, move global/local variable declarations and code fragments related to /proc within the directives. ii. Initialize host->lock with adapter->lock. iii. Wait for mailbox status to become valid iv. Right structure is passed to FW for 4-span read configuration command. ### Version 2.00.5 i. Do not use repeated allocations for "pci_dev" for internal allocations. Allocate the handle at load time and set the DMA mask for allocations below 4GB. ii. Remove superfluous definitions, mid-layer /proc entry and synchronous commands iii. Logical drive numbers were incremented in passthru structure after random-deletion operation! Also, the logical drive deletion command is issued in polled mode because of the racy nature of interrupt based operation. iv. Add support for Intel's subsystem vendor id ### Version 2.00.4 i. Do not put the completed SCSI commands in a list. Complete them to mid-layer as soon as we have completed them and reclaimed our associated resources ii. Break ISR functionality in two portions. The lower half serves as interrupt acknowledgment sequence for the firmware. This half can also be called from other places in the driver, e.g., the abort and reset handlers. iii. New abort and reset handling. In these situations, driver allows more time for the firmware to complete outstanding requests instead of failing handlers right-away. ### Version 2.00.3 i. Change the handshake in ISR while acknowledging interrupts. Write the valid interrupt pattern 0x10001234 as soon as it is read from the outdoor register. In existing driver and on certain platform, invalid command ids were being returned. Also, do not wait on status be become 0xFF, since FW can return this status in certain circumstances. Initialize the numstatus field of mailbox to 0xFF so that we can wait on this wait in next interrupt. Firmware does not change its value unless there are some status to be posted ii. Specify the logical drive number while issuing the RESERVATION_STATUS iii. Reduce the default mailbox busy wait time from 300us to 10us. This is done to avoid a possible deadlock in FW because of longer bust waits. iv. The max outstanding commands are reduced to 126 because that's the safest value on all FW. v. Number of sectors per IO are reduced to 128 (64kb), because FW needs resources in special circumstances like check consistency, rebuilds etc. vi. max_commands is no longer a module parameter because of iv. ### Version: 2.00.2 i. Intermediate release with kernel specific code ### Version: 2.00.1i i. Making the older IO based controllers to work with this driver ### Version 2.00.1 i. Release host lock before issuing internal command to reset reservations in megaraid_reset() and reacquire after internal command is completed.