diff options
Diffstat (limited to 'net-misc/r8168/files')
-rw-r--r-- | net-misc/r8168/files/r8168-8.050.02-5.18-fix.patch | 51 | ||||
-rw-r--r-- | net-misc/r8168/files/r8168-8.050.03-5.19-fix.patch | 23 |
2 files changed, 0 insertions, 74 deletions
diff --git a/net-misc/r8168/files/r8168-8.050.02-5.18-fix.patch b/net-misc/r8168/files/r8168-8.050.02-5.18-fix.patch deleted file mode 100644 index 442fa1c3eadf..000000000000 --- a/net-misc/r8168/files/r8168-8.050.02-5.18-fix.patch +++ /dev/null @@ -1,51 +0,0 @@ -Functions like 'pci_dma_sync_single_for_device', 'pci_set_dma_mask', and 'pci_set_consistent_dma_mask' -no longer exist in 5.18.0. -Fix similar to https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2238850.html - ---- a/src/r8168_n.c -+++ b/src/r8168_n.c -@@ -3698,7 +3698,11 @@ - 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, -+#else -+ dma_sync_single_for_device(&tp->pci_dev->dev, -+#endif - le64_to_cpu(mapping), - len, DMA_TO_DEVICE); - txd->opts1 = cpu_to_le32(DescOwn | FirstFrag | LastFrag | len); -@@ -3726,7 +3730,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; -@@ -26408,11 +26416,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/net-misc/r8168/files/r8168-8.050.03-5.19-fix.patch b/net-misc/r8168/files/r8168-8.050.03-5.19-fix.patch deleted file mode 100644 index d0f5d30ada06..000000000000 --- a/net-misc/r8168/files/r8168-8.050.03-5.19-fix.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Andrea Righi <andrea.righi@canonical.com> -Subject: support linux 5.19 - -Index: r8168-8.050.03/src/r8168_n.c -=================================================================== ---- r8168-8.050.03.orig/src/r8168_n.c -+++ r8168-8.050.03/src/r8168_n.c -@@ -116,6 +116,15 @@ - #define FIRMWARE_8168FP_3 "rtl_nic/rtl8168fp-3.fw" - #define FIRMWARE_8168FP_4 "rtl_nic/rtl8168fp-4.fw" - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) -+static inline void netif_set_gso_max_size(struct net_device *dev, -+ unsigned int size) -+{ -+ /* dev->gso_max_size is read locklessly from sk_setup_caps() */ -+ WRITE_ONCE(dev->gso_max_size, size); -+} -+#endif -+ - /* Maximum number of multicast addresses to filter (vs. Rx-all-multicast). - The RTL chips use a 64 element hash table based on the Ethernet CRC. */ - static const int multicast_filter_limit = 32; |