[arch-commits] Commit in r8168/trunk (PKGBUILD linux519.patch)
Jan Steffens
heftig at gemini.archlinux.org
Thu Aug 4 07:41:06 UTC 2022
Date: Thursday, August 4, 2022 @ 07:41:06
Author: heftig
Revision: 1260226
add patch for linux 5.19
Added:
r8168/trunk/linux519.patch
Modified:
r8168/trunk/PKGBUILD
----------------+
PKGBUILD | 6 ++++--
linux519.patch | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-08-04 06:53:18 UTC (rev 1260225)
+++ PKGBUILD 2022-08-04 07:41:06 UTC (rev 1260226)
@@ -12,15 +12,17 @@
makedepends=('linux-headers')
source=(https://github.com/mtorromeo/r8168/archive/$pkgver/$pkgname-$pkgver.tar.gz
https://github.com/mtorromeo/r8168/releases/download/$pkgver/$pkgname-$pkgver.tar.gz.asc
- linux518.patch)
+ linux518.patch linux519.patch)
sha256sums=('76f9e7c26a8ade7b01dd34060f5b17d74387f15e9b6baa6dbba8c43634a31ce6'
'SKIP'
- 'd8d542770e504775600f686d03412a37cc32489872be7aeb388b5b08d9806096')
+ 'd8d542770e504775600f686d03412a37cc32489872be7aeb388b5b08d9806096'
+ 'f5e08919764bc56d4f11b23fcb7cece663cae3f591992a0ca2be760e6890a9f8')
validpgpkeys=('0CADAACF70F64C654E131B3111675C743429DDEF') # Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
prepare() {
cd "$pkgname-$pkgver"
patch -Np1 -i ../linux518.patch
+ patch -Np1 -i ../linux519.patch
}
build() {
Added: linux519.patch
===================================================================
--- linux519.patch (rev 0)
+++ linux519.patch 2022-08-04 07:41:06 UTC (rev 1260226)
@@ -0,0 +1,41 @@
+diff -u -r r8168-8.050.03/src/r8168_n.c r8168-8.050.03-linux519/src/r8168_n.c
+--- r8168-8.050.03/src/r8168_n.c 2022-08-04 07:29:41.416222834 +0000
++++ r8168-8.050.03-linux519/src/r8168_n.c 2022-08-04 07:38:13.202069962 +0000
+@@ -26898,6 +26898,10 @@
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+ if ((tp->mcfg == CFG_METHOD_1) || (tp->mcfg == CFG_METHOD_2) || (tp->mcfg == CFG_METHOD_3)) {
+ dev->hw_features &= ~NETIF_F_IPV6_CSUM;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
++ netif_set_tso_max_size(dev, LSO_32K);
++ netif_set_tso_max_segs(dev, NIC_MAX_PHYS_BUF_COUNT_LSO_64K);
++#else
+ netif_set_gso_max_size(dev, LSO_32K);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
+ dev->gso_max_segs = NIC_MAX_PHYS_BUF_COUNT_LSO_64K;
+@@ -26905,6 +26909,7 @@
+ dev->gso_min_segs = NIC_MIN_PHYS_BUF_COUNT;
+ #endif //LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
+ #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
+ } else {
+ dev->hw_features |= NETIF_F_IPV6_CSUM;
+ dev->features |= NETIF_F_IPV6_CSUM;
+@@ -26912,6 +26917,10 @@
+ dev->hw_features |= NETIF_F_TSO6;
+ //dev->features |= NETIF_F_TSO6;
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
++ netif_set_tso_max_size(dev, LSO_64K);
++ netif_set_tso_max_segs(dev, NIC_MAX_PHYS_BUF_COUNT_LSO2);
++#else
+ netif_set_gso_max_size(dev, LSO_64K);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
+ dev->gso_max_segs = NIC_MAX_PHYS_BUF_COUNT_LSO2;
+@@ -26919,6 +26928,7 @@
+ dev->gso_min_segs = NIC_MIN_PHYS_BUF_COUNT;
+ #endif //LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
+ #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
+ }
+ #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+ #endif //LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
More information about the arch-commits
mailing list