Date: Saturday, July 30, 2022 @ 12:18:19 Author: heftig Revision: 1259169
archrelease: copy trunk to community-testing-x86_64 Added: r8168/repos/community-testing-x86_64/ r8168/repos/community-testing-x86_64/PKGBUILD (from rev 1259164, r8168/trunk/PKGBUILD) r8168/repos/community-testing-x86_64/keys/ r8168/repos/community-testing-x86_64/linux518.patch (from rev 1259164, r8168/trunk/linux518.patch) ----------------+ PKGBUILD | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ linux518.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) Copied: r8168/repos/community-testing-x86_64/PKGBUILD (from rev 1259164, r8168/trunk/PKGBUILD) =================================================================== --- community-testing-x86_64/PKGBUILD (rev 0) +++ community-testing-x86_64/PKGBUILD 2022-07-30 12:18:19 UTC (rev 1259169) @@ -0,0 +1,53 @@ +# Maintainer: Massimiliano Torromeo <massimiliano.torro...@gmail.com> +# Contributor: Bob Fanger < bfanger(at)gmail > +# Contributor: Filip <fila pruda com>, Det < nimetonmaili(at)gmail > + +pkgname=r8168 +pkgver=8.050.03 +pkgrel=12 +pkgdesc="A kernel module for Realtek 8168 network cards" +url="http://www.realtek.com.tw" +license=("GPL") +arch=('x86_64') +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) +sha256sums=('76f9e7c26a8ade7b01dd34060f5b17d74387f15e9b6baa6dbba8c43634a31ce6' + 'SKIP' + 'd8d542770e504775600f686d03412a37cc32489872be7aeb388b5b08d9806096') +validpgpkeys=('0CADAACF70F64C654E131B3111675C743429DDEF') # Massimiliano Torromeo <massimiliano.torro...@gmail.com> + +prepare() { + cd "$pkgname-$pkgver" + patch -Np1 -i ../linux518.patch +} + +build() { + cd "$pkgname-$pkgver" + # avoid using the Makefile directly -- it doesn't understand + # any kernel but the current. + make -C /usr/src/linux M="$PWD/src" \ + ENABLE_USE_FIRMWARE_FILE=y \ + CONFIG_R8168_NAPI=y \ + CONFIG_R8168_VLAN=y \ + CONFIG_ASPM=y \ + ENABLE_S5WOL=y \ + ENABLE_EEE=y \ + modules +} + +package() { + depends=('glibc' 'linux') + + local extradir=/usr/lib/modules/$(</usr/src/linux/version)/extramodules + cd "$pkgname-$pkgver" + install -Dt "$pkgdir$extradir" -m644 src/*.ko + find "$pkgdir" -name '*.ko' -exec strip --strip-debug {} + + find "$pkgdir" -name '*.ko' -exec xz {} + + + echo "blacklist r8169" | \ + install -Dm644 /dev/stdin "$pkgdir/usr/lib/modprobe.d/$pkgname.conf" +} + +# vim:set sw=0 noet: Copied: r8168/repos/community-testing-x86_64/linux518.patch (from rev 1259164, r8168/trunk/linux518.patch) =================================================================== --- community-testing-x86_64/linux518.patch (rev 0) +++ community-testing-x86_64/linux518.patch 2022-07-30 12:18:19 UTC (rev 1259169) @@ -0,0 +1,52 @@ +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))