Build mpt2sas and mpt3sas drivers as modules

History:
Back in the day, we didn't have an initramfs
to allow us to load disk drivers as modules.  All
disk drivers had to be built-in.  In CentOS 7.3,
the mpt2sas and mpt3sas driver code was reorganized
to allow for a common code base.  But along with that,
those drivers would only now build as modules.  We
created a patch which involved taking a snapshot of
mpt driver code, and massaged it all into building
as built-in drivers.

Problem:
That old code snapshot along with the fact
that those two drivers initialize without their
associated hardware being present (they are built-in),
seems to cause interference with some other LSI raid
controllers, namely Harpoon in AVAGO MR9460-8i via a
Huawei enclosure.

Solution:
Simply revert to building those two mptsas drivers as
modules, the way CentOS intended.  They will reside
on initramfs and be loaded automatically if the
appropriate hardware is present. With these drivers now
out of the way, the problematic raid controller works
fine, driven by the megaraid_sas driver.

Change-Id: I054c2396df4e659c324e70bffcf3940ad93c9354
Closes-Bug: 1866293
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
This commit is contained in:
Jim Somerville 2020-03-16 16:16:20 -04:00
parent f80a248eda
commit 1435fe178a
10 changed files with 40 additions and 68517 deletions

View File

@ -1,4 +1,4 @@
COPY_LIST="files/*"
TIS_PATCH_VER=3
TIS_PATCH_VER=4
BUILD_IS_BIG=11
BUILD_IS_SLOW=12

View File

@ -1,22 +1,21 @@
From d85ae09a0e333ba2c0b2630a1d4768655cacf481 Mon Sep 17 00:00:00 2001
Message-Id: <d85ae09a0e333ba2c0b2630a1d4768655cacf481.1566591106.git.Jim.Somerville@windriver.com>
In-Reply-To: <5d869ea9407975726a95d046391cd640b726ca93.1566591106.git.Jim.Somerville@windriver.com>
References: <5d869ea9407975726a95d046391cd640b726ca93.1566591106.git.Jim.Somerville@windriver.com>
From: Bin Yang <bin.yang@intel.com>
Date: Wed, 31 Jul 2019 14:23:20 +0800
From fd3288457759c51746ad1c6cf26c883be36da86e Mon Sep 17 00:00:00 2001
Message-Id: <fd3288457759c51746ad1c6cf26c883be36da86e.1584131446.git.Jim.Somerville@windriver.com>
In-Reply-To: <212f8edf21d8053d99c37d2ebfe3d723fb166bf7.1584131446.git.Jim.Somerville@windriver.com>
References: <212f8edf21d8053d99c37d2ebfe3d723fb166bf7.1584131446.git.Jim.Somerville@windriver.com>
From: Jim Somerville <Jim.Somerville@windriver.com>
Date: Fri, 13 Mar 2020 16:15:29 -0400
Subject: [PATCH 2/2] Compile issues
Signed-off-by: Bin Yang <bin.yang@intel.com>
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
---
SPECS/kernel-rt.spec | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/SPECS/kernel-rt.spec b/SPECS/kernel-rt.spec
index f7aad95..29d3878 100644
index 5660f0b..c37c238 100644
--- a/SPECS/kernel-rt.spec
+++ b/SPECS/kernel-rt.spec
@@ -425,6 +425,11 @@ Patch1031: epoll-fix-use-after-free-in-eventpoll_release_file.patch
@@ -424,6 +424,11 @@ Patch1031: epoll-fix-use-after-free-in-eventpoll_release_file.patch
Patch1032: ipvs-fix-memory-leak-in-ip_vs_ctl.c.patch
Patch1033: rh-ext4-release-leaked-posix-acl-in-ext4_acl_chmod.patch
Patch1034: rh-ext4-release-leaked-posix-acl-in-ext4_xattr_set_a.patch
@ -28,7 +27,7 @@ index f7aad95..29d3878 100644
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -798,6 +803,9 @@ ApplyPatch epoll-fix-use-after-free-in-eventpoll_release_file.patch
@@ -796,6 +801,9 @@ ApplyPatch epoll-fix-use-after-free-in-eventpoll_release_file.patch
ApplyPatch ipvs-fix-memory-leak-in-ip_vs_ctl.c.patch
ApplyPatch rh-ext4-release-leaked-posix-acl-in-ext4_acl_chmod.patch
ApplyPatch rh-ext4-release-leaked-posix-acl-in-ext4_xattr_set_a.patch

View File

@ -1,21 +1,19 @@
From 5d869ea9407975726a95d046391cd640b726ca93 Mon Sep 17 00:00:00 2001
Message-Id: <5d869ea9407975726a95d046391cd640b726ca93.1566591106.git.Jim.Somerville@windriver.com>
From: Bin Yang <bin.yang@intel.com>
Date: Mon, 29 Jul 2019 11:48:49 -0400
From 212f8edf21d8053d99c37d2ebfe3d723fb166bf7 Mon Sep 17 00:00:00 2001
Message-Id: <212f8edf21d8053d99c37d2ebfe3d723fb166bf7.1584131446.git.Jim.Somerville@windriver.com>
From: Jim Somerville <Jim.Somerville@windriver.com>
Date: Fri, 13 Mar 2020 16:15:29 -0400
Subject: [PATCH 1/2] Kernel source patches for TiC
Signed-off-by: Bin Yang <bin.yang@intel.com>
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
Signed-off-by: Robin Lu <bin1.lu@intel.com>
---
SPECS/kernel-rt.spec | 71 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
SPECS/kernel-rt.spec | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/SPECS/kernel-rt.spec b/SPECS/kernel-rt.spec
index adffde2..f7aad95 100644
index c48b73e..5660f0b 100644
--- a/SPECS/kernel-rt.spec
+++ b/SPECS/kernel-rt.spec
@@ -388,6 +388,43 @@ Source30002: kernel-3.10.0-x86_64-rt-trace.config.tis_extra
@@ -388,6 +388,42 @@ Source30002: kernel-3.10.0-x86_64-rt-trace.config.tis_extra
# Empty final patch file to facilitate testing of kernel patches
Patch999999: linux-kernel-test.patch
@ -33,7 +31,6 @@ index adffde2..f7aad95 100644
+Patch1011: PCI-Add-ACS-quirk-for-Intel-Fortville-NICs.patch
+Patch1012: x86-enable-DMA-CMA-with-swiotlb.patch
+Patch1013: Add-missing-ifdef-around-max-latency-variable.patch
+Patch1014: Enable-building-mpt2sas-and-mpt3sas-as-builtin-for-C.patch
+Patch1015: Enable-building-kernel-with-CONFIG_BLK_DEV_NBD.patch
+Patch1016: x86-make-dma_alloc_coherent-return-zeroed-memory-if-.patch
+Patch1018: Porting-Cacheinfo-from-Kernel-4.10.17.patch
@ -59,7 +56,7 @@ index adffde2..f7aad95 100644
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -727,6 +764,40 @@ cp %{SOURCE38} .
@@ -727,6 +763,39 @@ cp %{SOURCE38} .
## Apply Patches here
ApplyPatch linux-kernel-test.patch
@ -77,7 +74,6 @@ index adffde2..f7aad95 100644
+ApplyPatch Notification-of-death-of-arbitrary-processes.patch
+ApplyPatch x86-enable-DMA-CMA-with-swiotlb.patch
+ApplyPatch Add-missing-ifdef-around-max-latency-variable.patch
+ApplyPatch Enable-building-mpt2sas-and-mpt3sas-as-builtin-for-C.patch
+ApplyPatch Enable-building-kernel-with-CONFIG_BLK_DEV_NBD.patch
+ApplyPatch x86-make-dma_alloc_coherent-return-zeroed-memory-if-.patch
+ApplyPatch Porting-Cacheinfo-from-Kernel-4.10.17.patch

View File

@ -24,8 +24,9 @@ CONFIG_SCSI_PMCRAID=y
CONFIG_SCSI_HPSA=y
CONFIG_MEGARAID_SAS=y
CONFIG_SCSI_SMARTPQI=y
CONFIG_SCSI_MPT2SAS=y
CONFIG_SCSI_MPT3SAS=y
# These two will only build as modules
CONFIG_SCSI_MPT2SAS=m
CONFIG_SCSI_MPT3SAS=m
CONFIG_SCSI_VIRTIO=y
CONFIG_FUSION_SAS=y
CONFIG_SCSI_AIC94XX=y

View File

@ -1,4 +1,4 @@
COPY_LIST="files/*"
TIS_PATCH_VER=2
TIS_PATCH_VER=3
BUILD_IS_BIG=11
BUILD_IS_SLOW=12

View File

@ -1,7 +1,7 @@
From f9a5a49c9daac827d94cd562c0c6f100388fd798 Mon Sep 17 00:00:00 2001
Message-Id: <f9a5a49c9daac827d94cd562c0c6f100388fd798.1566587341.git.Jim.Somerville@windriver.com>
In-Reply-To: <ac67546ccbecd3ee18145be31d87d7253048adda.1566587341.git.Jim.Somerville@windriver.com>
References: <ac67546ccbecd3ee18145be31d87d7253048adda.1566587341.git.Jim.Somerville@windriver.com>
From 6c41acf7c1a4f5f3437e474505193bb353d241e6 Mon Sep 17 00:00:00 2001
Message-Id: <6c41acf7c1a4f5f3437e474505193bb353d241e6.1584125537.git.Jim.Somerville@windriver.com>
In-Reply-To: <47c970e28e2adfd6483fa8d861eeb338492297bf.1584125537.git.Jim.Somerville@windriver.com>
References: <47c970e28e2adfd6483fa8d861eeb338492297bf.1584125537.git.Jim.Somerville@windriver.com>
From: "zhao.shuai" <zhaos@neusoft.com>
Date: Tue, 6 Aug 2019 16:18:04 +0800
Subject: [PATCH 2/2] Compile issues
@ -13,10 +13,10 @@ Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
1 file changed, 9 insertions(+)
diff --git a/SPECS/kernel.spec b/SPECS/kernel.spec
index d5df4a4..1d765ed 100644
index 012ddbd..6595a38 100644
--- a/SPECS/kernel.spec
+++ b/SPECS/kernel.spec
@@ -497,6 +497,12 @@ Patch40027: epoll-fix-use-after-free-in-eventpoll_release_file.patch
@@ -496,6 +496,12 @@ Patch40027: epoll-fix-use-after-free-in-eventpoll_release_file.patch
Patch40028: ipvs-fix-memory-leak-in-ip_vs_ctl.c.patch
Patch40029: rh-ext4-release-leaked-posix-acl-in-ext4_acl_chmod.patch
Patch40030: rh-ext4-release-leaked-posix-acl-in-ext4_xattr_set_a.patch
@ -29,7 +29,7 @@ index d5df4a4..1d765ed 100644
BuildRoot: %{_tmppath}/kernel-%{KVRA}-root
@@ -881,6 +887,9 @@ ApplyOptionalPatch epoll-fix-use-after-free-in-eventpoll_release_file.patch
@@ -879,6 +885,9 @@ ApplyOptionalPatch epoll-fix-use-after-free-in-eventpoll_release_file.patch
ApplyOptionalPatch ipvs-fix-memory-leak-in-ip_vs_ctl.c.patch
ApplyOptionalPatch rh-ext4-release-leaked-posix-acl-in-ext4_acl_chmod.patch
ApplyOptionalPatch rh-ext4-release-leaked-posix-acl-in-ext4_xattr_set_a.patch

View File

@ -1,5 +1,5 @@
From ac67546ccbecd3ee18145be31d87d7253048adda Mon Sep 17 00:00:00 2001
Message-Id: <ac67546ccbecd3ee18145be31d87d7253048adda.1566587341.git.Jim.Somerville@windriver.com>
From 47c970e28e2adfd6483fa8d861eeb338492297bf Mon Sep 17 00:00:00 2001
Message-Id: <47c970e28e2adfd6483fa8d861eeb338492297bf.1584125537.git.Jim.Somerville@windriver.com>
From: "zhao.shuai" <zhaos@neusoft.com>
Date: Mon, 5 Aug 2019 17:55:01 +0800
Subject: [PATCH 1/2] Kernel-source-patches-for-TiC
@ -8,14 +8,14 @@ Signed-off-by: zhao.shuai <zhaos@neusoft.com>
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
Signed-off-by: Robin Lu <bin1.lu@intel.com>
---
SPECS/kernel.spec | 66 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
SPECS/kernel.spec | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/SPECS/kernel.spec b/SPECS/kernel.spec
index e42177e..d5df4a4 100644
index 0b2ff2e..012ddbd 100644
--- a/SPECS/kernel.spec
+++ b/SPECS/kernel.spec
@@ -463,6 +463,41 @@ Patch1002: debrand-rh-i686-cpu.patch
@@ -463,6 +463,40 @@ Patch1002: debrand-rh-i686-cpu.patch
Source30000: kernel-3.10.0-x86_64.config.tis_extra
Source30001: ima_signing_key.pub
@ -31,7 +31,6 @@ index e42177e..d5df4a4 100644
+Patch40009: memblock-introduce-memblock_alloc_range.patch
+Patch40010: cma-add-placement-specifier-for-cma-kernel-parameter.patch
+Patch40011: x86-enable-DMA-CMA-with-swiotlb.patch
+Patch40012: Enable-building-mpt2sas-and-mpt3sas-as-builtin-for-C.patch
+Patch40013: Enable-building-kernel-with-CONFIG_BLK_DEV_NBD.patch
+Patch40014: x86-make-dma_alloc_coherent-return-zeroed-memory-if-.patch
+Patch40016: Porting-Cacheinfo-from-Kernel-4.10.17.patch
@ -57,7 +56,7 @@ index e42177e..d5df4a4 100644
BuildRoot: %{_tmppath}/kernel-%{KVRA}-root
%description
@@ -816,6 +851,37 @@ ApplyOptionalPatch debrand-single-cpu.patch
@@ -816,6 +850,36 @@ ApplyOptionalPatch debrand-single-cpu.patch
ApplyOptionalPatch debrand-rh_taint.patch
ApplyOptionalPatch debrand-rh-i686-cpu.patch
@ -73,7 +72,6 @@ index e42177e..d5df4a4 100644
+ApplyOptionalPatch memblock-introduce-memblock_alloc_range.patch
+ApplyOptionalPatch cma-add-placement-specifier-for-cma-kernel-parameter.patch
+ApplyOptionalPatch x86-enable-DMA-CMA-with-swiotlb.patch
+ApplyOptionalPatch Enable-building-mpt2sas-and-mpt3sas-as-builtin-for-C.patch
+ApplyOptionalPatch Enable-building-kernel-with-CONFIG_BLK_DEV_NBD.patch
+ApplyOptionalPatch x86-make-dma_alloc_coherent-return-zeroed-memory-if-.patch
+ApplyOptionalPatch Porting-Cacheinfo-from-Kernel-4.10.17.patch

View File

@ -24,8 +24,9 @@ CONFIG_SCSI_PMCRAID=y
CONFIG_SCSI_HPSA=y
CONFIG_MEGARAID_SAS=y
CONFIG_SCSI_SMARTPQI=y
CONFIG_SCSI_MPT2SAS=y
CONFIG_SCSI_MPT3SAS=y
# These two will only build as modules
CONFIG_SCSI_MPT2SAS=m
CONFIG_SCSI_MPT3SAS=m
CONFIG_SCSI_VIRTIO=y
CONFIG_FUSION_SAS=y
CONFIG_SCSI_AIC94XX=y