[packages/r8168] - up to 8.051.02
baggins
baggins at pld-linux.org
Wed Sep 6 04:28:48 CEST 2023
commit 7021aab6dd97ba0d152260b782723f928e0e2cef
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed Sep 6 02:43:25 2023 +0200
- up to 8.051.02
kernel-5.17.patch | 45 ---------------------------------------------
kernel-5.18.patch | 51 ---------------------------------------------------
kernel-5.19.patch | 40 ----------------------------------------
kernel-6.5.patch | 13 +++++++++++++
r8168.spec | 14 +++++---------
5 files changed, 18 insertions(+), 145 deletions(-)
---
diff --git a/r8168.spec b/r8168.spec
index 7e8912e..dcbef7d 100644
--- a/r8168.spec
+++ b/r8168.spec
@@ -4,12 +4,12 @@
# nothing to be placed to debuginfo package
%define _enable_debug_packages 0
-%define rel 4
+%define rel 1
%define pname r8168
Summary: Linux driver for RTL8111/8168B PCI Express Gigabit Ethernet controllers
Summary(pl.UTF-8): Linuksowy sterownik dla kart sieciowych RTL8111/8168B PCI Express Gigabit Ethernet
Name: %{pname}%{_alt_kernel}
-Version: 8.049.02
+Version: 8.051.02
Release: %{rel}%{?_pld_builder:@%{_kernel_ver_str}}
License: GPL
Group: Base/Kernel
@@ -18,11 +18,9 @@ URL: http://www.realtek.com.tw/
# https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
# unfortunately this download is not DF-friendly.
Source0: %{pname}-%{version}.tar.bz2
-# Source0-md5: 9c2191ca3ff85102bc18a41916eceb8b
-Patch0: kernel-5.17.patch
-Patch1: kernel-5.18.patch
-Patch2: kernel-5.19.patch
-Patch3: kernel-6.1.patch
+# Source0-md5: c3ca2e48ff5079540153a4ba30b0014a
+Patch0: kernel-6.1.patch
+Patch1: kernel-6.5.patch
BuildRequires: rpmbuild(macros) >= 1.701
%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
BuildRoot: %{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
@@ -76,8 +74,6 @@ Express Gigabit Ethernet.\
%setup -q -n %{pname}-%{version}
%patch0 -p1
%patch1 -p1
-%patch2 -p1
-%patch3 -p1
%build
%{expand:%build_kernel_packages}
diff --git a/kernel-5.17.patch b/kernel-5.17.patch
deleted file mode 100644
index 2c836c3..0000000
--- a/kernel-5.17.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- r8168-8.048.02/src/r8168_n.c~ 2022-04-02 22:25:30.000000000 +0200
-+++ r8168-8.048.02/src/r8168_n.c 2022-04-02 22:28:28.896501079 +0200
-@@ -1615,7 +1615,11 @@
- static int rtl8168_proc_open(struct inode *inode, struct file *file)
- {
- struct net_device *dev = proc_get_parent_data(inode);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
- int (*show)(struct seq_file *, void *) = PDE_DATA(inode);
-+#else
-+ int (*show)(struct seq_file *, void *) = pde_data(inode);
-+#endif
-
- return single_open(file, show, dev);
- }
---- r8168-8.049.02/src/r8168_n.c.orig 2022-04-02 23:30:49.000000000 +0200
-+++ r8168-8.049.02/src/r8168_n.c 2022-04-02 23:40:02.568626144 +0200
-@@ -24065,6 +24065,9 @@
- struct rtl8168_private *tp = netdev_priv(dev);
- int i;
- u8 mac_addr[MAC_ADDR_LEN];
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
-+ u8 addr[ETH_ALEN] __aligned(4);
-+#endif
-
- for (i = 0; i < MAC_ADDR_LEN; i++)
- mac_addr[i] = RTL_R8(tp, MAC0 + i);
-@@ -24132,10 +24135,18 @@
-
- rtl8168_rar_set(tp, mac_addr);
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
-+ for (i = 0; i < MAC_ADDR_LEN; i++) {
-+ addr[i] = RTL_R8(tp, MAC0 + i);
-+ tp->org_mac_addr[i] = dev->dev_addr[i]; /* keep the original MAC address */
-+ }
-+ eth_hw_addr_set(dev, addr);
-+#else
- for (i = 0; i < MAC_ADDR_LEN; i++) {
- dev->dev_addr[i] = RTL_R8(tp, MAC0 + i);
- tp->org_mac_addr[i] = dev->dev_addr[i]; /* keep the original MAC address */
- }
-+#endif
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
- memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
- #endif
diff --git a/kernel-5.18.patch b/kernel-5.18.patch
deleted file mode 100644
index 3d05b49..0000000
--- a/kernel-5.18.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- r8168-8.049.02/src/r8168_n.c~ 2022-05-25 16:48:22.000000000 +0200
-+++ r8168-8.049.02/src/r8168_n.c 2022-05-25 16:56:57.575961627 +0200
-@@ -3665,9 +3665,15 @@
- txd->opts2 = 0;
- while (1) {
- memset(tmpAddr, pattern++, len - 14);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
- pci_dma_sync_single_for_device(tp->pci_dev,
- le64_to_cpu(mapping),
- len, DMA_TO_DEVICE);
-+#else
-+ dma_sync_single_for_device(&tp->pci_dev->dev,
-+ le64_to_cpu(mapping),
-+ len, DMA_TO_DEVICE);
-+#endif
- txd->opts1 = cpu_to_le32(DescOwn | FirstFrag | LastFrag | len);
-
- RTL_W32(tp, RxConfig, RTL_R32(tp, RxConfig) | AcceptMyPhys);
-@@ -3693,7 +3699,11 @@
- if (rx_len == len) {
- dma_sync_single_for_cpu(tp_to_dev(tp), le64_to_cpu(rxd->addr), tp->rx_buf_sz, DMA_FROM_DEVICE);
- i = memcmp(skb->data, rx_skb->data, rx_len);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
- pci_dma_sync_single_for_device(tp->pci_dev, le64_to_cpu(rxd->addr), tp->rx_buf_sz, DMA_FROM_DEVICE);
-+#else
-+ dma_sync_single_for_device(&tp->pci_dev->dev, le64_to_cpu(rxd->addr), tp->rx_buf_sz, DMA_FROM_DEVICE);
-+#endif
- if (i == 0) {
- // dev_printk(KERN_INFO, tp_to_dev(tp), "loopback test finished\n",rx_len,len);
- break;
-@@ -25175,11 +25175,20 @@
-
- if ((sizeof(dma_addr_t) > 4) &&
- use_dac &&
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
- !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
- !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
-+#else
-+ !dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) &&
-+ !dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) {
-+#endif
- dev->features |= NETIF_F_HIGHDMA;
- } else {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
- rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
-+#else
-+ rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
-+#endif
- if (rc < 0) {
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
- if (netif_msg_probe(tp))
diff --git a/kernel-5.19.patch b/kernel-5.19.patch
deleted file mode 100644
index a5b8f6b..0000000
--- a/kernel-5.19.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- r8168-8.049.02/src/r8168_n.c.orig 2022-08-13 13:32:08.000000000 +0200
-+++ r8168-8.049.02/src/r8168_n.c 2022-08-13 14:10:04.268095369 +0200
-@@ -25602,6 +25602,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;
-@@ -25609,6 +25613,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
- } else {
- dev->hw_features |= NETIF_F_IPV6_CSUM;
- dev->features |= NETIF_F_IPV6_CSUM;
-@@ -25616,6 +25621,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;
-@@ -25623,6 +25632,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
- }
- #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
- #endif //LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
diff --git a/kernel-6.5.patch b/kernel-6.5.patch
new file mode 100644
index 0000000..0683a06
--- /dev/null
+++ b/kernel-6.5.patch
@@ -0,0 +1,13 @@
+--- r8168-8.051.02/src/r8168_n.c~ 2022-10-20 10:57:18.000000000 +0200
++++ r8168-8.051.02/src/r8168_n.c 2023-09-06 02:41:32.191684157 +0200
+@@ -81,6 +81,10 @@
+ #include <linux/mdio.h>
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,5,0)
++#include <net/gso.h>
++#endif
++
+ #include <asm/io.h>
+ #include <asm/irq.h>
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/r8168.git/commitdiff/7021aab6dd97ba0d152260b782723f928e0e2cef
More information about the pld-cvs-commit
mailing list