diff --git a/qla2x00t-32gbit/Kconfig b/qla2x00t-32gbit/Kconfig index 285e25b8b..09f9cc0d6 100644 --- a/qla2x00t-32gbit/Kconfig +++ b/qla2x00t-32gbit/Kconfig @@ -1,8 +1,10 @@ config SCSI_QLA_FC tristate "QLogic QLA2XXX Fibre Channel Support" depends on PCI && SCSI - select SCSI_FC_ATTRS + depends on SCSI_FC_ATTRS + depends on NVME_FC || !NVME_FC select FW_LOADER + select BTREE ---help--- This qla2xxx driver supports all QLogic Fibre Channel PCI and PCIe host adapters. @@ -26,6 +28,8 @@ config SCSI_QLA_FC http://ldriver.qlogic.com/firmware/ + They are also included in the linux-firmware tree as well. + config SCSI_QLA2XXX_TARGET bool "QLogic 2xxx target mode support" depends on SCSI_QLA_FC diff --git a/scripts/kernel-functions b/scripts/kernel-functions index 016389820..de2be73e7 100644 --- a/scripts/kernel-functions +++ b/scripts/kernel-functions @@ -114,6 +114,12 @@ function extract_kernel_tree { fi mv "linux-$1" ".." || return $? cd "../linux-$1" || return $? + ) + rmdir "${tmpdir}" +} + +# Patch a kernel tree where $1 is the kernel version. +function patch_kernel { if [ "$1" = "2.6.29" -o "$1" = "2.6.29.1" -o "$1" = "2.6.29.2" -o "$1" = "2.6.29.3" ] then patch -f -s -p1 <<'EOF' @@ -411,6 +417,11 @@ index 141da26fda4b..343ec388ae2e 100644 EOF ;; esac + + # Use sed to patch the ____ilog2_NaN() prototype. + sed -i 's/__attribute__((const, noreturn))/__attribute__((noreturn))/' \ + include/linux/log2.h tools/include/linux/log2.h 2>/dev/null + # After patch-v4.14.1[12] has been applied, the execute bit has to be # set for sync-check.sh since patch can't do that. for f in "tools/objtool/sync-check.sh"; do @@ -418,8 +429,6 @@ EOF chmod a+x "$f" fi done - ) - rmdir "${tmpdir}" } function download_and_extract_kernel_tree { @@ -431,6 +440,8 @@ function download_and_extract_kernel_tree { { git tag -l "v$1" >/dev/null || git fetch stable; } && git archive "v$1" ) | tar -C "linux-$1" -xf- - fi - download_kernel "$1" && extract_kernel_tree "$1" + else + download_kernel "$1" && extract_kernel_tree "$1" + fi && + (cd linux-$1 && patch_kernel "$1") } diff --git a/scst/include/backport.h b/scst/include/backport.h index 67ab63fcb..e05627e85 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -498,6 +498,20 @@ ssize_t kernel_write(struct file *file, const void *buf, size_t count, #endif #endif +/* */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) && !defined(RHEL_MAJOR) +/* + * See also commit cd7eab44e994 ("genirq: Add IRQ affinity notifiers"; + * v2.6.39). + */ +struct irq_affinity_notify; +static inline int +irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify) +{ + return 0; +} +#endif + /* */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) || \