From 7883a5d2e672c63c9e992a09e523892f0ed748cf Mon Sep 17 00:00:00 2001 From: CN_SZTL <22235437+1715173329@users.noreply.github.com> Date: Sat, 12 Jun 2021 01:57:31 +0800 Subject: [PATCH] r8152: fix build under kernel >= 4.19.10 or kernel >= 4.14.217 (#6965) Fixes: 1024f0ec23f63d ("r8152: update to 2.15 (#6900)") Fixes: #6946 Signed-off-by: Tianling Shen --- package/lean/r8152/Makefile | 4 ++- ...not_on_list-was-backported-since-ker.patch | 26 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 package/lean/r8152/patches/010-compat-skb_mark_not_on_list-was-backported-since-ker.patch diff --git a/package/lean/r8152/Makefile b/package/lean/r8152/Makefile index d71e212f5..b0f44a034 100644 --- a/package/lean/r8152/Makefile +++ b/package/lean/r8152/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=r8152 PKG_VERSION:=2.15 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/1715173329/realtek-r8152-linux/tar.gz/v$(PKG_VERSION)? @@ -19,6 +19,8 @@ PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-linux-$(PKG_VERSION) PKG_MAINTAINER:=Tianling Shen +PKG_BUILD_PARALLEL:=1 + include $(INCLUDE_DIR)/package.mk define KernelPackage/usb-net-rtl8152-vendor diff --git a/package/lean/r8152/patches/010-compat-skb_mark_not_on_list-was-backported-since-ker.patch b/package/lean/r8152/patches/010-compat-skb_mark_not_on_list-was-backported-since-ker.patch new file mode 100644 index 000000000..fdbf84253 --- /dev/null +++ b/package/lean/r8152/patches/010-compat-skb_mark_not_on_list-was-backported-since-ker.patch @@ -0,0 +1,26 @@ +From b61b90b9aea30b944fc51b891dab3ab5eb30980c Mon Sep 17 00:00:00 2001 +From: Tianling Shen +Date: Sat, 29 May 2021 00:46:25 +0800 +Subject: [PATCH] compat: skb_mark_not_on_list was backported since kernel + 4.14.217 and 4.19.10 + +Signed-off-by: Tianling Shen +--- + compatibility.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/compatibility.h ++++ b/compatibility.h +@@ -548,10 +548,12 @@ + linkmode_clear_bit(nr, addr); + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,217) || LINUX_VERSION_CODE < KERNEL_VERSION(4,19,10) + static inline void skb_mark_not_on_list(struct sk_buff *skb) + { + skb->next = NULL; + } ++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,14,217) || LINUX_VERSION_CODE < KERNEL_VERSION(4,19,10) */ + #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0) */ + #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0) */ + #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0) */