[arch-commits] Commit in r8168/repos (3 files)
Jan Steffens
heftig at gemini.archlinux.org
Wed Mar 23 00:49:07 UTC 2022
Date: Wednesday, March 23, 2022 @ 00:49:07
Author: heftig
Revision: 1171177
archrelease: copy trunk to community-testing-x86_64
Added:
r8168/repos/community-testing-x86_64/
r8168/repos/community-testing-x86_64/PKGBUILD
(from rev 1171174, r8168/trunk/PKGBUILD)
r8168/repos/community-testing-x86_64/linux517.patch
(from rev 1171174, r8168/trunk/linux517.patch)
----------------+
PKGBUILD | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
linux517.patch | 32 ++++++++++++++++++++++++++++++++
2 files changed, 85 insertions(+)
Copied: r8168/repos/community-testing-x86_64/PKGBUILD (from rev 1171174, r8168/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2022-03-23 00:49:07 UTC (rev 1171177)
@@ -0,0 +1,53 @@
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+# Contributor: Bob Fanger < bfanger(at)gmail >
+# Contributor: Filip <fila pruda com>, Det < nimetonmaili(at)gmail >
+
+pkgname=r8168
+pkgver=8.049.02
+pkgrel=66
+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
+ linux517.patch)
+sha256sums=('2b12d932e976f8f74b8d9545744c04beb4676dd7bc1d032dde51347ed1d8be24'
+ 'SKIP'
+ '6c718137bed0f80bce52cc6862e755de7a1d0c2cbb75491ab5b099bd04534c1c')
+validpgpkeys=('0CADAACF70F64C654E131B3111675C743429DDEF') # Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ patch -Np1 -i ../linux517.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/linux517.patch (from rev 1171174, r8168/trunk/linux517.patch)
===================================================================
--- community-testing-x86_64/linux517.patch (rev 0)
+++ community-testing-x86_64/linux517.patch 2022-03-23 00:49:07 UTC (rev 1171177)
@@ -0,0 +1,32 @@
+diff -u -r r8168-8.049.02/src/r8168_n.c r8168-8.049.02-linux517/src/r8168_n.c
+--- r8168-8.049.02/src/r8168_n.c 2021-07-05 08:30:48.000000000 +0000
++++ r8168-8.049.02-linux517/src/r8168_n.c 2022-03-23 00:32:48.392881125 +0000
+@@ -1733,7 +1733,7 @@
+ static int rtl8168_proc_open(struct inode *inode, struct file *file)
+ {
+ struct net_device *dev = proc_get_parent_data(inode);
+- int (*show)(struct seq_file *, void *) = PDE_DATA(inode);
++ int (*show)(struct seq_file *, void *) = pde_data(inode);
+
+ return single_open(file, show, dev);
+ }
+@@ -24061,6 +24061,7 @@
+ struct rtl8168_private *tp = netdev_priv(dev);
+ int i;
+ u8 mac_addr[MAC_ADDR_LEN];
++ u8 addr[ETH_ALEN];
+
+ for (i = 0; i < MAC_ADDR_LEN; i++)
+ mac_addr[i] = RTL_R8(tp, MAC0 + i);
+@@ -24129,9 +24130,10 @@
+ rtl8168_rar_set(tp, mac_addr);
+
+ for (i = 0; i < MAC_ADDR_LEN; i++) {
+- dev->dev_addr[i] = RTL_R8(tp, MAC0 + 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);
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
+ #endif
More information about the arch-commits
mailing list