		   **********************************
		   Linux Driver Package Release Notes
		   **********************************


OEM Name         :AMI
Release Date     :Jan 18, 2000
Product Name     :Linux x86/IA64 package v1.14a


Comonent Name(s) and Version #:
------------------------------------------------
Driver Package version: v1.14a

Kernels Tested: 2.0.36 , 2.2.X , 2.4.xx
---------------------------------------



Previous Release:  Driver Version v1.07b


MegaRAID Firmware Images
========================
This package has been tested with the following firmware
images.  If you are using the standard AMI product (not
an AMI product from an OEM), we recommend that you 
upgrade to these images (or later).
   Enterprise 1200 (428) - UF80
   Enterprise 1300 (434) - AR79
   Enterprise 1400 (438) - GH89
   Enterprise 1500 (467) - H70L
   Enterprise 1600 (471) - 1.48
   Express 000 (762) - 2.12
   Express 200 (466) - GH6B
   Express 300 (490) - H931    
   MegaRAID 418 - M76

    Version 1.14b
    Corrected some issue which caused the older cards not to work
 
    Version 1.14a
	Added Host Re-Ordering support 

    Version 1.14
 	Did away with MEGADEV_IOCTL flag. It is now standard part of driver
 	without need for a special #define flag
 	Disabled old scsi ioctl path for kernel versions > 2.3.xx. This is due
 	to the nature in which the new scsi code queues a new scsi command to 
 	controller during SCSI IO Completion
 	Driver now checks for sub-system vendor id before taking ownership of
 	the controller

    Version 1.13t
 	Support for 64bit version of READ/WRITE/VIEW DISK CONFIG

    Version 1.13s
 	Stats counter fixes
 	Temporary fix for some 64 bit firmwares in 2.4.XX kernels
 
    Version 1.13r
    Linux 2.4.xx SCSI changes for modular and non-modular support
    Version 1.13q
 	Paded the new uioctl_t MIMD structure for maintaining alignment 
 	and size across 32 / 64 bit platforms
    
    Version 1.13l , 1.13m, 1.13n, 1.13o
 	Minor Identation changes + misc changes
 
    Version 1.13k
 	Only some idendation correction to 1.13j 
    
    Version 1.13j
 	Moved some code to megaraid.h file, replaced some hard coded
	values with respective macros. Chaged some funtions to static
 
    Version 1.13f to 1.13i
 	misc changes + code clean up
 	Cleaned up the ioctl code and added set_mbox_xfer_addr()
 	Support for START_DEV (6)
   
    Version 1.13e
 	Fixed Broken 2.2.XX compilation changes + misc changes
 
    Version 1.13d
 	Experimental changes in interfacing with the controller in ISR
 
   Version 1.13c
 	1. Resolved Memory Leak when using M_RD_IOCTL_CMD interface
 	2. Resolved Queuing problem when MailBox Blocks
 	3. Added unregister_reboot_notifier support
  
   Version 1.13beta
 	Added Support for Full 64bit address space support. If firmware
 	supports 64bit, it goes to 64 bit mode even on x86 32bit 
 	systems. Data Corruption Issues while running on test9 kernel
 	on IA64 systems. This issue not seen on test11 on x86 system

    Version 1.12 (Sep 21, 2000)
 
      I. Changes have been made for Dynamic DMA mapping in IA64 platform.
   To enable all these changes define M_RD_DYNAMIC_DMA_SUPPORT in megaraid.h
         II. Got rid of windows mode comments
        III. Removed unwanted code segments
     IV. Fixed bug of HP onboard controller information (commented with
                  MEGA_HP_FIX)
 
     Version 1a12
       I.      reboot notifer and new ioctl changes ported from 1c09
 
     Veriosn 1b12
       I.      Changes in new ioctl interface routines ( Nov 06, 2000 )
 
     Veriosn 1c12
       I. Changes in new ioctl interface routines ( Nov 07, 2000 )
 
     Veriosn 1d12
       I. Compilation error under kernel 2.4.0 for 32-bit machine in mega_ioctl
 
     Veriosn 1e12, 1f12
       1.  Fixes for pci_map_single, pci_alloc_consistent along with mailbox alignment
    Version 1b08b
     Change PCI ID value for the 471 card, use #defines when searching
     for megaraid cards.
 
  Version 1.11
       I)  Version number changed from 1.10c to 1.11
   II) DCMD_WRITE_CONFIG(0x0D) command in the driver changed from
       scatter/gather list mode to direct pointer mode..
      Fixed bug of undesirably detecting HP onboard controllers which
        are disabled.
  
   Version 1.10
 
       I) Changes made to make following ioctl commands work in 0x81 interface
               a)DCMD_DELETE_LOGDRV
               b)DCMD_GET_DISK_CONFIG
               c)DCMD_DELETE_DRIVEGROUP
               d)NC_SUBOP_ENQUIRY3
               e)DCMD_CHANGE_LDNO
               f)DCMD_CHANGE_LOOPID
               g)DCMD_FC_READ_NVRAM_CONFIG
       h)DCMD_WRITE_CONFIG
       II) Added mega_build_kernel_sg function
   III)Firmware flashing option added
 
  Version 1.10a
 
       I)Dell updates included in the source code.
        Note:   This change is not tested due to the unavailability of IA64 kernel
       and it is in the #ifdef DELL_MODIFICATION macro which is not defined
 
  Version 1.10b
 
       I)In M_RD_IOCTL_CMD_NEW command the wrong way of copying the data
     to the user address corrected
 
  Version 1.10c
 
       I) DCMD_GET_DISK_CONFIG opcode updated for the firmware changes.
 
 
 
Change in 1b08 Release
----------------------
1) Changed the Polling method , so that interrupts are not generated
   in the old polling method. This is for IA64 systems

Changes in 1.08 Release
-----------------------
1) The 1.08 fine tuned the support for 40LD firmware applications
   like MegaManager. 
2) Made sure that it works in 2.3.XX kernel , last tested on 2.3.41
3) Added the /proc file system support for human readable output

Changes in  1.07 Release:
-------------------------------
1) Added support for the future adapters.
2) Fixed a bug with Kernels 2.0.36 and earlier where the 
   compilation flag is set so that uaccess.h is ignored 
   since it is not present in kernels prior to 2.0.38.
3) Megamgr: Most of the screen related issues have been solved
	    * Screen distortion at some menus(background 
	      curruption) has been removed.
	    * The color scheme has been changed and made 
	      conformant with MegaManager on other platforms.
	    * Distortion at the end of the Status bar
	      (write to lower left corner of screen) has 
	      been enabled.
	    * Distortions caused due to overlapping of line 
	      characters has been removed.
4) Megamgr: The speed of rendering of screens has been improved 
   considerably.
5) Megagmr: The Keymappings are restored, and ESC key sequence
   is enabled.
6) Megamgr: On running MegaManager, the menu screen appears.
7) Megamgr: Raid Migration is provided.
8) Megamgr: No capacity expansion provided.
	

* 1.06 was Intel Release
------------------------

Changes in this 1.05-1 Release:
-------------------------------
1) Driver: Fixed hangs occurring under heavy I/O.
2) MegaMGR: Fixed problem running MegaMGR on systems that 
   contained other SCSI Devices.
3) MegaMGR: Fixed problem sometimes seen when removing and
   reinserting drives.  Message that was shown was "Drive
   size is less than configured drive size".
4) MegaMGR: Default new logical drive policy now set to 64K,
   WriteThru, No-ReadAhead, DirectIO.
5) MegaMGR: Miscellaneous cosmetic/screen I/O enhancements.


Changes in the 1.04 Release :
-----------------------------
1. Tape drive timeout error fixed.
2. Intel Madrona detection fixed.
3. Changes to install file.
4. Prints out version on driver load.
5. 40 logical drive adapter support
6. Added new ioctl command 0x81 to support NEW_READ/WRITE_CONFIG
   with data area greater than 4 KB.
7. 8-span support added.


Driver Standard Features:
-------------------------
   :Multithreaded
   :Multiple Processor Support
   :Non-Disk Support
   :Forty Logical Drive Support
   :More than 4GB Support under 2.4.XX kernels

   

Known Driver Limitations/Restrictions:
--------------------------------------
1) From driver version 1.14b,the older RAID applications using /dev/sdX nodes will not work for kernel version 2.3.xx+. Use the MIMD interface to access the driver.
   


Installation:
-------------
There are two types of installation that one might choose to adopt

	1. Source Compilation method
	2. Driver Update Disk (DUD) method

The second option is quite easy and it doesnt require knowledge of
kernel intricacies.


Source Compilation Method:
--------------------------

The linux driver package contains the megaraid.c and megaraid.h file.
You will need to copy these files to /usr/src/linux/drivers/scsi/ and
choose yes to replace the existing drivers. The file
/usr/src/linux/drivers/scsi/sd.c needs to be edited, and the following
line changed from:
#define SD_TIMEOUT (15 * HZ)
to:
#define SD_TIMEOUT (30 * HZ)
There is a patch included which will make this modification for you
if you have kernel 2.2.10.  Read the beginning of 
linux-2.2.10-scsi_tmout.patch for more details.
The increased timeout value is needed because the RAID controller 
will allow hundreds of commands to be queued at once, but the disks 
can only accept 64 at a time so some have to wait in an intermediate
queue. If this value is not changed, false scsi timeouts and aborts 
may occur from the upper scsi layer under a heavy load.

Next step is to run "make menuconfig" from /usr/src/linux and configure
your kernel as desired.  Make sure that under the <scsi> menu the
option for "probe all LUN's" is selected, and under the low-level
driver section there is an asterisk next to MegaRAID
(or an M to build as a module).  After making the necessary 
changes, exit and save.  Then recompile the kernel with the following
command:

# make dep clean zImage modules modules_install   
 (or bzImage for larger kernels)

After the kernel has finished compiling, copy the image from 
arch/i386/bzImage to /boot and name it according to the naming
convention that you are using. Make the appropriate changes to
/etc/lilo.conf.

An example

For systems containing one processor provision in the motherboard alone
# cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.15-20

and if the system has more than one processor provision in the motherboard
the general convention is 

# cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.12-20smp


Now we create a initial ram disk file that contains the module
version of the driver. This is required even if the megaraid driver
is linked statically.

# mkinitrd /boot/initrd-{linux kernel version}.img  {version of the kernel}

An example is given below
(for linux kernel 2.2.12-20)

For systems containing one processor provision in the motherboard alone
# mkinitrd /boot/initrd-2.2.12-20.img 2.2.12-20

and if the system has more than one processor provision in the motherboard
the general convention is 

# mkinitrd /boot/initrd-2.2.12-20smp.img 2.2.12-20

Make sure that the new entries created in the /etc/lilo.conf for the new kernel
is updated with the latest kernel and initrd parameter

An example entry for the lilo.conf that contains new entries

For systems containing one processor provision in the motherboard alone

image=/boot/vmlinuz-2.2.12-20
      label=linux-ami
      initrd=/boot/initrd-2.2.12-20.img
      read-only
      root=/dev/sda1

and if the system has more than one processor provision in the motherboard
the general convention is 

image=/boot/vmlinuz-2.2.12-20smp
      label=linux-amismp
      initrd=/boot/initrd-2.2.15-20smp.img
      read-only
      root=/dev/sda1

Note: if you are using a builtin RAID extension slot on an Intel 
Madrona motherboard, figure out which scsi id the SAF_TE processor
is using (can be found in Ctlr-M utitlity) and add the line 
append="megaraid=skipXX" in the section for the current image in 
lilo.conf (replace XX with the scsi id of the SAF_TE processor).
The driver will crash if it tries to scan this id, so this lets 
it know to skip it.

When finished editing lilo.conf, run lilo and reboot.  When it comes
up again, the RAID controller and all disks attached should be
detected.


Driver Update Disk ( DUD ) Method
---------------------------------
This is a quick and easy method of driver upgradation. The latest
driver can be installed during the installation of the OS itself.
First extract the contents of the file mraid[driver version]
eg mraid1b07 into a msdos formatted floppy.

When installing the OS , choose 'expert' mode. This will prompt to
insert the driver update disk ( DUD ). At this time insert the driver
update disk ( DUD )and press OK to continue . After few screens when
it asks whether you want to load specific driver, choose OK and select
the driver with the description string

'American Megatrends PCI Disk Array Controller'

or

'Updated MegaRAID Driver'

After this continue installation normally.

LUN Support Under RedHat 6.1
----------------------------

To see the proper Logical Drives (LUNs) under RedHat 6.1, a 
a workaround is required.  Type the following command:


echo "scsi-add-single-device 1 2 3 4" > /proc/scsi/scsi

where "1 2 3 4" is replaced by the host/channel/ID/LUN of 
the new device.  This can be determined by typing
cat /proc/scsi/scsi .  You will use the next available 
LUN for the new megaraid device. For example, if this
is the output from cat /proc/scsi/scsi

Host: Scsi 0 channel: 01 Id: 00 Lun: 00
Vendor: Megaraid model: LD0 Raid 0 4218R Rev GH6B
Type: Direct-Access        ANSI SCSI revision: 02

you will type the following

echo "scsi add-single-device 0 1 0 1" >/proc/scsi/scsi

More information can be found regarding the uses and 
limitations of this command in /usr/src/linux/drivers/
scsi/scsi.c .

