diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-04-15 17:48:43 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-04-15 17:48:43 +0100 |
commit | 6fc112778f70ed827633ff345036db5b592ca1d0 (patch) | |
tree | e7cdb999d63c6c05d692df24f69651b737792c56 /net-misc/r8125/files | |
parent | 04fc7f10cec12efb1240344a0090b539e24ad0f3 (diff) |
gentoo auto-resync : 15:04:2023 - 17:48:43
Diffstat (limited to 'net-misc/r8125/files')
-rw-r--r-- | net-misc/r8125/files/r8125-9.009.01-linux-5.19.patch | 35 | ||||
-rw-r--r-- | net-misc/r8125/files/r8125-9.011.00-linux-6.1.patch | 28 |
2 files changed, 63 insertions, 0 deletions
diff --git a/net-misc/r8125/files/r8125-9.009.01-linux-5.19.patch b/net-misc/r8125/files/r8125-9.009.01-linux-5.19.patch new file mode 100644 index 000000000000..8dc3f8749a11 --- /dev/null +++ b/net-misc/r8125/files/r8125-9.009.01-linux-5.19.patch @@ -0,0 +1,35 @@ +From c96e5ffc40585d463bea056f2fe02c29d43dcba7 Mon Sep 17 00:00:00 2001 +From: Evgeny Grin <k2k@narod.ru> +Date: Mon, 3 Apr 2023 18:17:24 +0300 +Subject: [PATCH] Backport kernel 5.19 compatibility + +--- + src/r8125_n.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/r8125_n.c b/src/r8125_n.c +index 0bc5eec..e35e557 100644 +--- a/src/r8125_n.c ++++ b/src/r8125_n.c +@@ -12715,6 +12715,10 @@ rtl8125_init_one(struct pci_dev *pdev, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) + dev->hw_features |= NETIF_F_IPV6_CSUM | NETIF_F_TSO6; + dev->features |= NETIF_F_IPV6_CSUM; ++#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 //LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0) + 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; +@@ -12722,6 +12726,7 @@ rtl8125_init_one(struct pci_dev *pdev, + 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) +-- +2.40.0 + diff --git a/net-misc/r8125/files/r8125-9.011.00-linux-6.1.patch b/net-misc/r8125/files/r8125-9.011.00-linux-6.1.patch new file mode 100644 index 000000000000..343ab8ccf125 --- /dev/null +++ b/net-misc/r8125/files/r8125-9.011.00-linux-6.1.patch @@ -0,0 +1,28 @@ +From cc2a99963b0039573464816f0cf86803381d5f11 Mon Sep 17 00:00:00 2001 +From: Evgeny Grin <k2k@narod.ru> +Date: Mon, 3 Apr 2023 16:46:39 +0300 +Subject: [PATCH] Fixed compatibility with Linux kernel versions >= 6.1 + +--- + src/r8125.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/r8125.h b/src/r8125.h +index 9eac0eb..4a29116 100644 +--- a/src/r8125.h ++++ b/src/r8125.h +@@ -676,7 +676,11 @@ typedef int *napi_budget; + typedef struct napi_struct *napi_ptr; + typedef int napi_budget; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0) ++#define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add_weight(ndev, &priv->napi, function, weight) ++#else // LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0) + #define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add(ndev, &priv->napi, function, weight) ++#endif // LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0) + #define RTL_NAPI_QUOTA(budget, ndev) min(budget, budget) + #define RTL_GET_PRIV(stuct_ptr, priv_struct) container_of(stuct_ptr, priv_struct, stuct_ptr) + #define RTL_GET_NETDEV(priv_ptr) struct net_device *dev = priv_ptr->dev; +-- +2.40.0 + |