diff options
author | Patrick Northon | 2022-12-14 11:22:38 -0500 |
---|---|---|
committer | Patrick Northon | 2022-12-14 11:22:38 -0500 |
commit | 0cdf3947f152211c0af5367984bfb5cff9287729 (patch) | |
tree | 8cdbd85ff006c421bb4ca2af22edb9296c0da018 | |
parent | dc04e875ea1f8ae652ef90d0817c22abaf1b9df0 (diff) | |
download | aur-0cdf3947f152211c0af5367984bfb5cff9287729.tar.gz |
Add patch for linux 6.1
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | linux-5.18.patch | 52 | ||||
-rw-r--r-- | linux-5.19.patch | 41 |
4 files changed, 10 insertions, 98 deletions
@@ -1,7 +1,7 @@ pkgbase = r8168-dkms pkgdesc = A kernel module for Realtek 8168 network cards (DKMS version) pkgver = 8.051.02 - pkgrel = 1 + pkgrel = 2 url = https://github.com/mtorromeo/r8168 install = r8168-dkms.install arch = i686 @@ -13,8 +13,10 @@ pkgbase = r8168-dkms provides = r8168 conflicts = r8168 source = r8168-dkms::git+https://github.com/mtorromeo/r8168.git + source = r8168-dkms-6.1.patch::https://github.com/mtorromeo/r8168/pull/47.patch source = dkms.conf sha256sums = SKIP + sha256sums = b7ef09e7496715b7576b7a3bff5a96e0e07c0bb02cd5bb5805415be20b883f60 sha256sums = d37b8acbd4fe06f81538581712a04751a96fc37bad3a4bd3ae8329f8744c49b3 pkgname = r8168-dkms @@ -8,7 +8,7 @@ _pkgbase=r8168 pkgname=${_pkgbase}-dkms pkgver=8.051.02 -pkgrel=1 +pkgrel=2 pkgdesc="A kernel module for Realtek 8168 network cards (DKMS version)" url="https://github.com/mtorromeo/r8168" license=("GPL") @@ -18,14 +18,17 @@ makedepends=('git') conflicts=("${_pkgbase}") provides=("${_pkgbase}") source=("r8168-dkms::git+https://github.com/mtorromeo/r8168.git" + "${pkgname}-6.1.patch::https://github.com/mtorromeo/r8168/pull/47.patch" "dkms.conf") sha256sums=('SKIP' + 'b7ef09e7496715b7576b7a3bff5a96e0e07c0bb02cd5bb5805415be20b883f60' 'd37b8acbd4fe06f81538581712a04751a96fc37bad3a4bd3ae8329f8744c49b3') install=r8168-dkms.install -#prepare() { -# cd "$pkgname" -#} +prepare() { + cd "${pkgname}" + patch -p1 -i "$srcdir/${pkgname}-6.1.patch" +} package() { install -Dm644 dkms.conf "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/dkms.conf" diff --git a/linux-5.18.patch b/linux-5.18.patch deleted file mode 100644 index aa0dd866ae0b..000000000000 --- a/linux-5.18.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -u -r r8168-8.050.00/src/r8168_n.c r8168-8.050.00-linux518/src/r8168_n.c ---- r8168-8.050.00/src/r8168_n.c 2022-05-06 09:48:25.000000000 +0000 -+++ r8168-8.050.00-linux518/src/r8168_n.c 2022-05-24 21:31:05.802807395 +0000 -@@ -3698,9 +3698,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_to_dev(tp), -+ 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); -@@ -3726,7 +3732,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_to_dev(tp), 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; -@@ -26403,11 +26413,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/linux-5.19.patch b/linux-5.19.patch deleted file mode 100644 index 3342bfa14b23..000000000000 --- a/linux-5.19.patch +++ /dev/null @@ -1,41 +0,0 @@ -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) |