diff options
Diffstat (limited to 'net-misc/r8152')
-rw-r--r-- | net-misc/r8152/Manifest | 5 | ||||
-rw-r--r-- | net-misc/r8152/files/r8152-2.17.1-kernel-6.9-fix.patch | 117 | ||||
-rw-r--r-- | net-misc/r8152/r8152-2.16.3-r1.ebuild | 52 | ||||
-rw-r--r-- | net-misc/r8152/r8152-2.17.1.ebuild | 1 |
4 files changed, 120 insertions, 55 deletions
diff --git a/net-misc/r8152/Manifest b/net-misc/r8152/Manifest index 65187ab07bbe..78ee99b73a4f 100644 --- a/net-misc/r8152/Manifest +++ b/net-misc/r8152/Manifest @@ -3,8 +3,7 @@ AUX r8152-2.16.3-kernel-5.19-fix.patch 1599 BLAKE2B e1300601e2dcd98729481a6d146f AUX r8152-2.16.3-kernel-6.1-fix.patch 1473 BLAKE2B bebafaeaed61bff9ee058ddc64fef6299703bdf9b0c2cd086c86643b362122a8d691577963b9b64f45729bfa4e72f09fe33d6c61fc195d0675bdcd7affd63d7a SHA512 4c5115946a1086d88bc19aa556782aec45fc05f3e38fab8255bb13a863bd2744c08bca0fd6ed72da8c5171fe801436665f4b10bfc22203c500460942a0a6db2d AUX r8152-2.16.3-kernel-6.4.10-fix.patch 731 BLAKE2B 2d7820d7dc749bdd4dbbb165116135af2d6831f17b4721afc9c37bbd078f6915cc6c44ce9cb77941ffc52a399a6065269a578128b2c1bb0823658972f8f81dc2 SHA512 a274fc2d5f998ba0c6bfad74c0a56d50c9b146abe012fdd5eebe9719615876e63f55203f3dcf17397e4e28040cd0b253ef861e2cb9636da9c1d050fa844c226c AUX r8152-2.17.1-kernel-6.8-strscpy.patch 1298 BLAKE2B 057d7c31115e5903b040f53c964e62d79a3e05308d5b8b072ca6fbf4a3c08e13dc9975e0ca0b6f6342f9e70fc0c957e642ac6d9fdd9f7d915eb7ca7fb24e405a SHA512 4f19815e4f3f9bb3f7934fc13b7c912ab044270512c887b6c89f1409131b73d248d1462c7b1a464eb7e16c590e99bfe46032b36ca5b676896e995964d66d1028 -DIST r8152-2.16.3.tar.bz2 73331 BLAKE2B 9e22ee6d9d0197def782f77bfd0c88a2d8827d4f8cc0bbb1a6583ab67533cd07ba79a16cd9350272ed18c733fe809ea1ff70596627abdc65d452bdf817628bc8 SHA512 c37bf5199d3a857c9a7a12f3aa4ecfe9c04b49413aea862a053ebee24c137cd35769e5d5cc7e2bb7dd3bf9057f51ffada0b4e0c53cb3d417e05c8e3fc830705c +AUX r8152-2.17.1-kernel-6.9-fix.patch 4008 BLAKE2B 6566782e57e8b69a2cf183a0d63a9e0c17ce9c83974dc23ef1d8588adca14105b4ef8682ca33225be0c4e2ed5121bbc4cd9d5180f44b9c36655d875505c99668 SHA512 4859d41116474e14aec2b03952d155ec07293941181db5cecb27b389c79d4c03ef8ec1abe540ce3b9f04c1ad835f98a11562484dcf168afb100cad91bc96d334 DIST r8152-2.17.1.tar.bz2 75156 BLAKE2B 05b55ea17a579add9a9abee89db490685086bfe29aeea6cbfbdbb63a81dbee4d1cac151822c178e52febe4bee14a3b5deb20737f671fcdbc6dd6d01938b1d18c SHA512 e465b524ee8aaed12da8258195fb8a4c9fea0862812c1ab268e31ad6ec61444c4f4332d643124063b389fd1df7a271c6c057537d4cbe67188a1a2262b4793f42 -EBUILD r8152-2.16.3-r1.ebuild 1290 BLAKE2B 82d4ebe9fc9bca31b9a1307eae719745e7916c5d694a052e2e41c0178f2d18947d270ea19564347f8847f33dad132b9b4af1fb102e3a0b8e10ed87cfcdb0e4be SHA512 460cef4288683e56e13885a1a3bbc588b4816a9770bbffb22b81e980c50f9848b7cb15b5808ba88a204d0e5ad8372a8e741fc8617efac2e1b3cffc6309a802c3 -EBUILD r8152-2.17.1.ebuild 1244 BLAKE2B 39a421b6c3e0dac8894e75a11b8a435a656096a1de1dabeaf72db5ea672b9f76c6e2630e728b1af7abc2fdd4d0364e734fd23635a59b64e6bec124ecc3145bf9 SHA512 61adcbff9e86f1ec8aab62a384dfc3e8484606cd0b59dfee4f1434af802fddd0ce95b13d5f62218f362951ae638e6bfe10f24bf73d968345b1090c81656be6fa +EBUILD r8152-2.17.1.ebuild 1293 BLAKE2B 19c8c4a1507ce6722f552c2c566e449b06a3b114b5b04e89c9259832e23e03d4d655084ee0d2aaf55d862573a524f762e8afc997a36ac8e61873c6e9d0ecf005 SHA512 069a53b153ac5d61fdebd8bcaa1411b904002b46124e81799efa601ca7ceb2fb4200e49eec7d8818b1a5abda049460e08ba3bdc0d94358116c1b4224ee10dafb MISC metadata.xml 660 BLAKE2B 1f7bd7d75e5fc3b88b140f88b82390b09cbffed8770b73b4584f7d9114fd1b97a84f745881d424f30c1a738c332bb04bab3d651bd9734f0170164eb8158ef098 SHA512 c0258ae24671a18801a9a499869267b2c3d2d0350e1fbbf91db6fe2358326bb27551623ef93c9c9a9bebde3c08520463eae00a05802053a0f5b7ade1b0f5ea4d diff --git a/net-misc/r8152/files/r8152-2.17.1-kernel-6.9-fix.patch b/net-misc/r8152/files/r8152-2.17.1-kernel-6.9-fix.patch new file mode 100644 index 000000000000..433d3deab34e --- /dev/null +++ b/net-misc/r8152/files/r8152-2.17.1-kernel-6.9-fix.patch @@ -0,0 +1,117 @@ +From: https://github.com/wget/realtek-r8152-linux/pull/41 +From a5b3b4a882a3a637ccfa447dc7d2e84eac9ef0fc Mon Sep 17 00:00:00 2001 +From: "oleg.hoefling" <oleg.hoefling@gmail.com> +Date: Wed, 22 May 2024 00:44:37 +0200 +Subject: [PATCH] add compat for 6.9.X kernels + +Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com> +--- a/r8152.c ++++ b/r8152.c +@@ -950,7 +950,10 @@ struct r8152 { + void (*up)(struct r8152 *tp); + void (*down)(struct r8152 *tp); + void (*unload)(struct r8152 *tp); +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0) ++ int (*eee_get)(struct r8152 *tp, struct ethtool_keee *eee); ++ int (*eee_set)(struct r8152 *tp, struct ethtool_keee *eee); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) + int (*eee_get)(struct r8152 *tp, struct ethtool_eee *eee); + int (*eee_set)(struct r8152 *tp, struct ethtool_eee *eee); + #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */ +@@ -19099,7 +19102,11 @@ static void rtl8152_get_strings(struct net_device *dev, u32 stringset, u8 *data) + } + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0) ++static int r8152_get_eee(struct r8152 *tp, struct ethtool_keee *eee) ++#else + static int r8152_get_eee(struct r8152 *tp, struct ethtool_eee *eee) ++#endif + { + u32 lp, adv, supported = 0; + u16 val; +@@ -19115,17 +19122,32 @@ static int r8152_get_eee(struct r8152 *tp, struct ethtool_eee *eee) + + eee->eee_enabled = tp->eee_en; + eee->eee_active = !!(supported & adv & lp); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0) ++ ethtool_convert_legacy_u32_to_link_mode(eee->supported, supported); ++ ethtool_convert_legacy_u32_to_link_mode(eee->advertised, tp->eee_adv); ++ ethtool_convert_legacy_u32_to_link_mode(eee->lp_advertised, lp); ++#else + eee->supported = supported; + eee->advertised = tp->eee_adv; + eee->lp_advertised = lp; ++#endif + + return 0; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0) ++static int r8152_set_eee(struct r8152 *tp, struct ethtool_keee *eee) ++#else + static int r8152_set_eee(struct r8152 *tp, struct ethtool_eee *eee) ++#endif + { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0) ++ u32 advertised = 0; ++ ethtool_convert_link_mode_to_legacy_u32(&advertised, eee->advertised); ++ u16 val = ethtool_adv_to_mmd_eee_adv_t(advertised); ++#else + u16 val = ethtool_adv_to_mmd_eee_adv_t(eee->advertised); +- ++#endif + tp->eee_en = eee->eee_enabled; + tp->eee_adv = val; + +@@ -19134,7 +19156,11 @@ static int r8152_set_eee(struct r8152 *tp, struct ethtool_eee *eee) + return 0; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0) ++static int r8153_get_eee(struct r8152 *tp, struct ethtool_keee *eee) ++#else + static int r8153_get_eee(struct r8152 *tp, struct ethtool_eee *eee) ++#endif + { + u32 lp, adv, supported = 0; + u16 val; +@@ -19150,15 +19176,25 @@ static int r8153_get_eee(struct r8152 *tp, struct ethtool_eee *eee) + + eee->eee_enabled = tp->eee_en; + eee->eee_active = !!(supported & adv & lp); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0) ++ ethtool_convert_legacy_u32_to_link_mode(eee->supported, supported); ++ ethtool_convert_legacy_u32_to_link_mode(eee->advertised, tp->eee_adv); ++ ethtool_convert_legacy_u32_to_link_mode(eee->lp_advertised, lp); ++#else + eee->supported = supported; + eee->advertised = tp->eee_adv; + eee->lp_advertised = lp; ++#endif + + return 0; + } + + static int ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0) ++rtl_ethtool_get_eee(struct net_device *net, struct ethtool_keee *edata) ++#else + rtl_ethtool_get_eee(struct net_device *net, struct ethtool_eee *edata) ++#endif + { + struct r8152 *tp = netdev_priv(net); + int ret; +@@ -19185,7 +19221,11 @@ rtl_ethtool_get_eee(struct net_device *net, struct ethtool_eee *edata) + } + + static int ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0) ++rtl_ethtool_set_eee(struct net_device *net, struct ethtool_keee *edata) ++#else + rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata) ++#endif + { + struct r8152 *tp = netdev_priv(net); + int ret; diff --git a/net-misc/r8152/r8152-2.16.3-r1.ebuild b/net-misc/r8152/r8152-2.16.3-r1.ebuild deleted file mode 100644 index 82753f37ac20..000000000000 --- a/net-misc/r8152/r8152-2.16.3-r1.ebuild +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit linux-mod-r1 udev - -DESCRIPTION="r8152 driver for Realtek USB FE / GBE / 2.5G Gaming Ethernet Family Controller" -HOMEPAGE="https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software" -SRC_URI="http://rtitwww.realtek.com/rtdrivers/cn/nic1/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~x86" - -RDEPEND="virtual/udev" -DEPEND="${RDEPEND}" - -IUSE="+center-tap-short" - -# https://github.com/wget/realtek-r8152-linux/ keeps reasonably up to date -# with kernel support patches. It appears to be used by the AUR maintainer. -PATCHES=( - "${FILESDIR}"/${PN}-2.16.3-kernel-5.19-fix.patch - "${FILESDIR}"/${PN}-2.16.3-kernel-6.1-fix.patch - "${FILESDIR}"/${PN}-2.16.3-kernel-6.4.10-fix.patch - "${FILESDIR}"/${PN}-2.16.3-asus-c5000-support.patch -) - -src_compile() { - local modlist=( ${PN}=kernel/net/usb:. ) - local modargs=( - KERNELDIR="${KV_OUT_DIR}" - CONFIG_CTAP_SHORT="$(usex center-tap-short on off)" - ) - - linux-mod-r1_src_compile -} - -src_install() { - linux-mod-r1_src_install - udev_dorules 50-usb-realtek-net.rules -} - -pkg_postinst() { - linux-mod-r1_pkg_postinst - udev_reload -} - -pkg_postrm() { - udev_reload -} diff --git a/net-misc/r8152/r8152-2.17.1.ebuild b/net-misc/r8152/r8152-2.17.1.ebuild index 865057ee5c0d..0c0485efb61b 100644 --- a/net-misc/r8152/r8152-2.17.1.ebuild +++ b/net-misc/r8152/r8152-2.17.1.ebuild @@ -24,6 +24,7 @@ PATCHES=( "${FILESDIR}"/${PN}-2.16.3-kernel-6.4.10-fix.patch "${FILESDIR}"/${PN}-2.16.3-asus-c5000-support.patch "${FILESDIR}"/${PN}-2.17.1-kernel-6.8-strscpy.patch + "${FILESDIR}"/${PN}-2.17.1-kernel-6.9-fix.patch ) src_compile() { |