This release note and the software that accompanies it are copyright (c) 2017, Intel Corporation or its suppliers, and may only be installed and used in accordance with the license that accompanies the software.

This Software is furnished under license and may only be used or copied in accordance with the terms of that license. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. The Software is subject to change without notice, and should not be construed as a commitment by Intel Corporation or its suppliers to market, license, sell or support any product or technology. Unless otherwise provided for in the license under which this Software is provided, the Software is provided AS IS, with no warranties of any kind, express or implied. Except as expressly permitted by the Software license, neither Intel Corporation nor its suppliers assumes any responsibility or liability for any errors or inaccuracies that may appear herein. Except as expressly permitted by the Software license, no part of the Software may be reproduced, stored in a retrieval system, transmitted in any form, or distributed by any means without the express written consent of Intel Corporation.

==========================
Supported RAID Controllers
==========================
This download supports the following Intel(R) RAID controllers: RMSP3AD160F, RMSP3CD080F, RMSP3HD080E, RSP3WD080E, RSP3TD160F, RSP3DD080F, RSP3MD088F, RSP3LD060/AHWBPBGB24R


===================
Package Information
===================
Driver Version = 07.704.04.00

------------------------------------------------------------------------------



=========================
Installation Instructions
=========================

How to compile the driver source
================================
Driver source code is placed inside released package,
Driver source tarball- megaraid_sas-<driver_version>-src.tar.gz
To compile the driver for distro, first apply the patch for that distro(Patches are placed inside "patches" directory).

Use below command to apply the patch:
#patch -p1 < xyz.patch (pick the right patch)

To compile the driver for distro use the helper script "compile.sh":
#./compile.sh

Note: For RHEL6 and it's clones(OEL6 and CentOS6), no patches are required to be applied.

If there is no patch inside <patches> direcotry for corresponding Distoro/kernel for which user is trying to compile driver source code 
should pick correct/matching patch from patches directory.
Try to pick patch of closest match of the kernel version from patches directory.  
See below example - ubutu12.4 kernel is close to SLES11SP2 and Ubuntu14.10 kernel version is close to RHEL7.
 
ubuntu12.4  (3.2.0-23-generic)                 sles11-sp2.patch (3.0.13-0.27)
ubuntu14.10 (3.16.0-23-generic)                rhel7.patch (3.10.0-123.el7.x86_64)



###########################################
Release contents directory layout.
###########################################

NOTE: Refer "OS_Support_list" text file to find out supported os list of this release.


citrix7		: All Citrix7 related contents are available in this folder. 
oel6_uek  	: All OEL 6 UEK related contents are available in this folder. 
oel7_uek  	: All OEL 7 UEK related contents are available in this folder. 
rhel6_oel6_centos6 : All RHEL6/OEL6/CENTOS6 related contents are available in this folder. 
rhel7_oel7_centos7 : All RHEL7/OEL7/CENTOS7 related contents are available in this folder. 
sles11 		: All SLES11 related contents are available in this folder. 
sles12 		: All SLES12 related contents are available in this folder. 
ubuntu 		: All Ubuntu related contents are available in this folder. 


###########################################
binary kmp,kmod,rpms, iso naming convention.
###########################################

------------------------------------------------------------------------------
-KMP  (For all SUSE releases)
------------------------------------------------------------------------------
KMP RPM images are named as:  lsi-megaraid_sas-kmp-<flavor>-<version>_<os>.<arch>.rpm
	where:
	<flavor>	=	flavor of distro for which this rpm is built
	<version>	=	version tag for this rpm
	<os>		=	{rhel5, sles10, sles11}
	<arch>	=	ia64 - Itanium Processor
	  			x86_64 - Opteron Processor, w/ x86_64 install
				i686 - i686 or later processor (Red Hat)
				i586 - x86 installations (SuSE)
				ppc Power PC (64 bit)
example:
lsi-megaraid_sas-kmp-default-06.600.00.00_sles11-1.i586.rpm

------------------------------------------------------------------------------
-kmod (For all RHEL and OEL releases) 
------------------------------------------------------------------------------

Kmod RPM images are named as:  kmod-megaraid_sas-<version>_<os>.<arch>.rpm
	where:
	<version>	=	version tag for this rpm
	<os>		=	{rhel5, sles10, sles11}
	<arch>	=	ia64 - Itanium Processor
	  			x86_64 - Opteron Processor, w/ x86_64 install
				i686 - i686 or later processor (Red Hat)
				i586 - x86 installations (SuSE)
				ppc Power PC (64 bit)
example:
kmod-megaraid_sas-v06.600.00.00_rhel6.1-1.i686.rpm

-For current Driver release has both .deb and .rpm format 
binary support.
			
------------------------------------------------------------------------------
Driver Update Disks:
------------------------------------------------------------------------------

dud images are named : megaraid_sas-<version>-<release>-<os>.<arch>.dd.gz

	where:
	<version>	=	version tag for this rpm
	<release>	=	release tag for this rpm
	<os>		=	{rhel5, rhel5, sles10, sles11}
	<arch>	=	ia64 - Itanium Processor
	  			x86_64 - Opteron Processor, w/ x86_64 install
				i686 - i686 or later processor (Red Hat)
				i586 - x86 installations (SuSE)
				ppc Power PC (64 bit)

------------------------------------------------------------------------------
SRPMS
------------------------------------------------------------------------------

SRPM images are named megaraid_sas-<version>-<release>.src.rpm

	where:
	<version>	=	version tag for this rpm
	<release>	=	release tag for this rpm


################################################################################
Erratas/Notes and some known limitations
################################################################################

------------------------------------------------------------------------------
Oracle Linux Installation errata:
------------------------------------------------------------------------------

1.  Installing Driver during Installing for UEK from CD:

For UEK kernels, only the KMODs RPMs are provided, not the DUDs. The reasoning behind this is the OEL installation is using the native Red Hat kernels, not UEK. UEK kernel RPMS can be installed after the basic installation is complete

2.  Few Known RPM install dependency issues.

E.g. on Oracle Linux 5.7/OVM 3.0.3 KMOD RPM gives kABI checks dependency failure message.

For Oracle Linux 5.7 you will encounter ksym (..) dependency issues,
when installing KMOD package the user will need to use the "--nodeps" switch when installing the binary."

Example: rpm -ivh --nodeps kmod-megaraid_sas-vxxxxxx_UEK.xxx.rpm

"If "rpm -ivh throw any dependancy warning/error"

RPM uses KMOD packaging dependency data to ensure the dependencies are met before installing the binary RPM.
Red Hat maintains a whitelist of kernel symbols which RPM
uses to validate against the KMOD binaries. Some symbols may
be in the kernel but not on the whitelist which results in a failed binary RPM  install. 
The user will need to use the "--nodeps" switch when installing the  binary."

3. In the event of installing UEL and non UEK driver RPMs.      Simultaneously RPM will complain the driver is already installed
the reason is the  major driver version identification string for UEK and the non UEK driver package  RPMS are the same

In this case you can  use rpm --force option to install multiple RPMS.

Example :rpm -ivh  kmod-megaraid_sas-vxxxxxx.xxx.rpm
         rpm --force -ivh kmod-megaraid_sas-vxxxxxx_UEK.xxx.rpm


------------------------------------------------------------------------------
Xen Server Driver update NOTE:
------------------------------------------------------------------------------
 
Known Issue:
In case of Citrix driver update disk use, where system has multiple MegaRAID controller
(at least one MR controller which is supported by Inbox Citrix<megaraid_sas> driver),
user will not see storage behind controller which is not supported by Inbox Driver
(normally this was not expected since user expected driver update disk will work well and 
will detect all controllers)
 
 
Reason for the issue:
Since Xen Server load megaraid_sas driver from inbox before it ask for Driver update disk,
user can see "No Storage Disk" on some servers as explained above.
 
Workaround:
If you are booting from CD, when presented with the 'boot:' prompt you want to type 'shell'
- where you can then rmmod your driver before continuing with the installation.

---------------------------------------------------------------------------
How to Install/upgrade/remove Drivers Ubuntu and Debian.
---------------------------------------------------------------------------

-Find below help for verification. Current Driver release has native .deb binary support.

"In Ubuntu all packages are in .deb format. To install .deb packages we have to use the following command,
 		dpkg -i packagename.deb
e.g.: To install above megaraid_sas driver package we use 
dpkg -i megaraid_sas_06.600.00.00-99_amd64.deb

To verify the status of installed packages then type following command
dpkg  -s packagename
e.g: dpkg -s megaraid-sas	

" After installing megaraid_sas driver, now type 
" modinfo megaraid_sas "
Now it should show the currently installed version of megaraid_sas as
" Filename: /lib/modules/2.6.32-33-server/weak-updates/megaraid_sas/megaraid_sas.ko"
 	'Version: 06.600.00.00" (Driver version of in-house deb package)
" Now restart the machine and type following command
" cat /sys/modules/megaraid_sas/version"
  To get currently installed version i.e. it must be correct driver version.
" Now uninstall megaraid_sas package by 
		dpkg -r megaraid-sas
Verify "modinfo megaraid_sas" megaraid_sas version should be in-box version.
		Ubuntu 10.04 LTS has inbox driver version 02.100.03.0.
" Now again restart the machine and type following command
" cat /sys/modules/megaraid_sas/version"
 		It must be "02.100.03.00" (Inbox Driver version)


---------------------------------------------------------------------------
UEK Notes
---------------------------------------------------------------------------

Added UEKR2 (.rpm support) OEL5 and OEL6 based support for x86_64 and i386.
Go through Oracle provided link on how to upgrade UEKR2. (It is not available in ISO format)
http://www.oracle.com/technetwork/articles/servers-storage-admin/uek-rel2-getting-started-1555632.html

Go through Release notes of UEK2-QU2 from below link.

https://oss.oracle.com/ol6/docs/RELEASE-NOTES-UEK2-QU2-en.html
https://oss.oracle.com/ol5/docs/RELEASE-NOTES-UEK2-QU2-en.html

Kernel version for UEK R2 is "2.6.39-300.28.1".


---------------------------------------------------------------------------
How to set SMP affinity manually to get better performance under Linux
---------------------------------------------------------------------------
1. Check for the output of "dmesg | grep MSI" to findout total number of MR controller
and its associated MSI-x vectors.
See below example of one MR controller and  current MSIX supported by driver is 24 vector.

e.g:
megaraid_sas 0000:07:00.0: irq 136 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 137 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 138 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 139 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 140 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 141 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 142 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 143 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 144 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 145 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 146 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 147 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 148 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 149 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 150 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 151 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 152 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 153 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 154 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 155 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 156 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 157 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 158 for MSI/MSI-X
megaraid_sas 0000:07:00.0: irq 159 for MSI/MSI-X
[scsi20]: FW supports <96> MSIX vector, OnlineCPUs: <24>, Current MSIX <24>

2. Set SMP affinity manually as shown below:
Actual command syntax is
echo "<value>" > /proc/irq/<irq_number>/smp_affinity

e.g:
echo "1" > /proc/irq/136/smp_affinity (mask 1 for cpu 0)
echo "2" > /proc/irq/137/smp_affinity (mask 10 for cpu 1)
echo "4" > /proc/irq/138/smp_affinity (mask 100 for cpu 2)
echo "8" > /proc/irq/139/smp_affinity (mask 1000 for cpu3)
echo "10" > /proc/irq/140/smp_affinity (mask 10000 for cpu4)
echo "20" > /proc/irq/141/smp_affinity (mask 100000 for cpu5)
echo "40" > /proc/irq/142/smp_affinity (mask 1000000 for cpu6)
echo "80" > /proc/irq/143/smp_affinity (mask 10000000 for cpu7)
.
.
.
.
.
echo "400000" > /proc/irq/158/smp_affinity (mask 10000000000000000000000 for cpu22)
echo "800000" > /proc/irq/159/smp_affinity (mask 100000000000000000000000 for cpu23)

3. By default Irq balancer will be ON,Stop Irq balancer temporarily via below command:
        "chkconfig irqbalance off"
   Verify Irq balancer is stopped via below command:
        "service irqbalance status"


-----------------------------------------------------------------------
How to convert Source RPM to Binary RPM
-----------------------------------------------------------------------

1) Install source RPM like below-

rpm -ivh megaraid_sas-06.809.10.00-1-ubuntu15.4.src.rpm 

2) go to directory where source RPM spec file will be copied-
SPEC file location for RHEL, Ubuntu/Debian based-

cd /root/rpmbuild/SPECS

SPEC file location for SLES based-

cd /usr/src/packages/SPECS

3) There must be specfile(e.g. megaraid_sas-u15.4.spec) inside SPEC file directory. Build binary RPM-
	rpmbuild -ba megaraid_sas-u15.4.spec 

4) cd ../RPMS/

5) Go to cd <arch>, where arch may be- x86_64, i386, ppc64le.... <arch> directory should contain newly generated binary RPM.

Step 6 and 7 are only applicable for Ubuntu/Debian.

6) For Ubuntu and Debian OS, need to conevrt Binary RPM to deb package(for Ubuntu and Debian OS only), do that as below-
	e.g. alien -k --to-deb --scripts megaraid_sas-06.809.10.00-1.ppc64le.rpm 

7) There should be new deb pacakge generated like below-
	megaraid-sas_06.809.10.00-1_ppc64el.deb
	

=============
Fixes/Updates
=============
v7.704.04.00 (MR7.4)
	Defects Fixed
		SCGCQ01394892 - Provided driver workaround to reset __GFP_WAIT flag while allocating IO request frames.
		SCGCQ01430747 - Use IOC_INIT frame once driver has verified IOC_INIT frame allocation was successful.
		SCGCQ01468189 - Driver should go through stream detection logic after it's finalized which path(fastpath vs non fastpath) IO will go through
		SCGCQ01392652 - Fixed coverity reported defects
		SCGCQ01392643 - Selective stream detection logic in driver
		SCGCQ01392656 - During PCI remove, set unload flag after scsi_remove_host is called
		SCGCQ01389431 - Set DMA mask after FW is in READY state in PCI resume path of megaraid_sas driver
		SCGCQ01415439 - update LD map after populate drv_map, increase wait in IOCTL, fix index in error handling, rework in refiring DCMDs
		SCGCQ01439776 - Updated OEL6_UEK and OEL7_UEK buildkit
		SCGCQ01396747 - Added driver support for OEL7.4
		SCGCQ01396738 - MR7.4: OS driver support for RHEL 7.4
		SCGCQ01393249 - Added driver binary support for Xenserver7.2
		SCGCQ01396756 - MR7.4: Add SLES12 SP3 OS support
		SCGCQ01393194 - Removed support for few OS to align with OS support matrix policy

v7.703.06.00 (MR7.3)
	Defects Fixed:
		SCGCQ01455132 - Use IOC_INIT frame once driver has verified IOC_INIT frame allocation was successful
	Enhancements:
		SCGCQ01455135 - Added NVME passthru support in MR linux driver

v7.702.06.00 (MR7.2)
	Defects Fixed:
		SCGCQ01350963 - Removed device ID- 0x0015 from supported PCI IDs of MR7.2 linux driver
		SCGCQ01344142 - Minimum possible value for module parameter- resetwaittime should be 1 secs instead of 0 secs.
		SCGCQ01264464 - For R6 WT VD, stream detected writes should be directed to core 0 even if both CPU cores are enabled in CPU affinity mask

v7.011.11.0(MR7.1)
	Defects Fixed:
		SCGCQ01229442 - MR 7.1: Linux OS crash when powering off enclosure during I/O
		SCGCQ01229897 - On OEL SPARC (Big Endian), Linux MR 7.1 driver loading fails to initialize Ventura which has RDPQ support enabled
		SCGCQ01231229 - Fixed data corruption by asking OS not to do merging of IOs to avoid SGE holes

 
*Third-party trademarks are the property of their respective owners.


