From ab29dc4430f4ff2627631de4eefc8ff1a61f89fe Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 21 Apr 2020 02:25:32 +0000 Subject: [PATCH 1/3] scst: Port to Linux kernel v5.7 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8863 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 15 +++++++++++++++ scst/include/scst.h | 13 ------------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index 53bcc4335..6d1aeaef4 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -1600,6 +1600,21 @@ static inline void put_unaligned_be64(uint64_t i, void *p) } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 7, 0) +/* Only use get_unaligned_be24() if reading p - 1 is allowed. */ +static inline uint32_t get_unaligned_be24(const uint8_t *const p) +{ + return get_unaligned_be32(p - 1) & 0xffffffU; +} + +static inline void put_unaligned_be24(const uint32_t v, uint8_t *const p) +{ + p[0] = v >> 16; + p[1] = v >> 8; + p[2] = v >> 0; +} +#endif + /* */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) && \ diff --git a/scst/include/scst.h b/scst/include/scst.h index 4797753df..d85f47d4c 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -5406,19 +5406,6 @@ if (!(condition)) { \ } \ } while (0) -/* Only use get_unaligned_be24() if reading p - 1 is allowed. */ -static inline uint32_t get_unaligned_be24(const uint8_t *const p) -{ - return get_unaligned_be32(p - 1) & 0xffffffU; -} - -static inline void put_unaligned_be24(const uint32_t v, uint8_t *const p) -{ - p[0] = v >> 16; - p[1] = v >> 8; - p[2] = v >> 0; -} - #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) const char *scst_get_opcode_name(struct scst_cmd *cmd); #else From 540dc57576002d4c3a87866556f42b3662798160 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 21 Apr 2020 02:25:58 +0000 Subject: [PATCH 2/3] qla2x00t: Port to Linux kernel v5.7 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8864 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t/qla_os.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index 20bb988a1..44a051c23 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -4775,7 +4775,9 @@ qla2xxx_pci_resume(struct pci_dev *pdev) "The device failed to resume I/O from slot/link_reset.\n"); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 7, 0) pci_cleanup_aer_uncorrect_error_status(pdev); +#endif ha->flags.eeh_busy = 0; } From 102797b00b67e951c08954d113c556210f356fd5 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 21 Apr 2020 02:26:16 +0000 Subject: [PATCH 3/3] qla2x00t-32gbit: Port to Linux kernel v5.7 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8865 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_nvme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qla2x00t-32gbit/qla_nvme.c b/qla2x00t-32gbit/qla_nvme.c index 7bd8ccb37..0937121db 100644 --- a/qla2x00t-32gbit/qla_nvme.c +++ b/qla2x00t-32gbit/qla_nvme.c @@ -621,7 +621,8 @@ static void qla_nvme_remoteport_delete(struct nvme_fc_remote_port *rport) } static struct nvme_fc_port_template qla_nvme_fc_transport = { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(5, 7, 0) /* * See also commit 863fbae929c7 ("nvme_fc: add module to ops template * to allow module references").