diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-09-20 12:12:03 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-09-20 12:12:03 +0100 |
commit | d60aa36cd97fb2193f756b45820d7c073a49229d (patch) | |
tree | b5ae46dda53baf2afda4cd6b637f36cd3ac809e2 /net-misc/r8152 | |
parent | fe0961fc9674dd24a017f474a34c1edbbd005965 (diff) |
gentoo auto-resync : 20:09:2024 - 12:12:03
Diffstat (limited to 'net-misc/r8152')
-rw-r--r-- | net-misc/r8152/Manifest | 5 | ||||
-rw-r--r-- | net-misc/r8152/files/r8152-2.18.1-kernel-6.9-fix.patch | 134 | ||||
-rw-r--r-- | net-misc/r8152/metadata.xml | 10 | ||||
-rw-r--r-- | net-misc/r8152/r8152-2.18.1.ebuild | 55 |
4 files changed, 201 insertions, 3 deletions
diff --git a/net-misc/r8152/Manifest b/net-misc/r8152/Manifest index 40bfd656b458..473f3d463286 100644 --- a/net-misc/r8152/Manifest +++ b/net-misc/r8152/Manifest @@ -2,6 +2,9 @@ AUX r8152-2.16.3-asus-c5000-support.patch 581 BLAKE2B a502be8abc3e714fd6c1d90447 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 AUX r8152-2.17.1-kernel-6.9-fix.patch 4008 BLAKE2B 6566782e57e8b69a2cf183a0d63a9e0c17ce9c83974dc23ef1d8588adca14105b4ef8682ca33225be0c4e2ed5121bbc4cd9d5180f44b9c36655d875505c99668 SHA512 4859d41116474e14aec2b03952d155ec07293941181db5cecb27b389c79d4c03ef8ec1abe540ce3b9f04c1ad835f98a11562484dcf168afb100cad91bc96d334 +AUX r8152-2.18.1-kernel-6.9-fix.patch 4559 BLAKE2B 1e0e00f3e04448eb40638b1d9f49d9da056354b9d54d5aab7e8a6390e81bf3c74eb4371c93a8a10bbb29ece92c0975759591daa234ad537ae713d28495e7b2e9 SHA512 0a84fb69f0bb17f1be2478f863be8f6203301a7a2714f0d478528f36e29e191c10f4d967527a30ad7d7aaef6a8c5b99e4f86be46f945408ed353da1a0c550570 DIST r8152-2.17.1.tar.bz2 75156 BLAKE2B 05b55ea17a579add9a9abee89db490685086bfe29aeea6cbfbdbb63a81dbee4d1cac151822c178e52febe4bee14a3b5deb20737f671fcdbc6dd6d01938b1d18c SHA512 e465b524ee8aaed12da8258195fb8a4c9fea0862812c1ab268e31ad6ec61444c4f4332d643124063b389fd1df7a271c6c057537d4cbe67188a1a2262b4793f42 +DIST r8152-2.18.1.tar.gz 109919 BLAKE2B 59fa24b599a7378109e162689ef4ff305dc0d3a7f3bc77059d9e2f142e0b4fd01b38fcfdfe7bc1f3aa13805302522632e4305990133d53266d7c268e1f2284c0 SHA512 c99f482bd69b2263943bdb26a8fea40eed09ca21f8f42436937dc5c83239f0fe48a386ea4f2ddf90a193c808503a3709ea9637793d476774107c4757b56c4223 EBUILD r8152-2.17.1.ebuild 1293 BLAKE2B 19c8c4a1507ce6722f552c2c566e449b06a3b114b5b04e89c9259832e23e03d4d655084ee0d2aaf55d862573a524f762e8afc997a36ac8e61873c6e9d0ecf005 SHA512 069a53b153ac5d61fdebd8bcaa1411b904002b46124e81799efa601ca7ceb2fb4200e49eec7d8818b1a5abda049460e08ba3bdc0d94358116c1b4224ee10dafb -MISC metadata.xml 660 BLAKE2B 1f7bd7d75e5fc3b88b140f88b82390b09cbffed8770b73b4584f7d9114fd1b97a84f745881d424f30c1a738c332bb04bab3d651bd9734f0170164eb8158ef098 SHA512 c0258ae24671a18801a9a499869267b2c3d2d0350e1fbbf91db6fe2358326bb27551623ef93c9c9a9bebde3c08520463eae00a05802053a0f5b7ade1b0f5ea4d +EBUILD r8152-2.18.1.ebuild 1482 BLAKE2B 94d3e6793955c3d4237f776b838391406a60d9abde4f86d2ef41a7f279146d7fc49c24f31053abf384b43f5664708e0bbcd4f083142be3e675c2d0ed00caf435 SHA512 f6a69b77e1b6269a485ca921e7c6fbe3ce8028d9b94d5f7c1dcbfe8a6966171b7a7b4984637e0af951b1a46596d69adcf7637d8a74a8a2c5013c1a3c41469352 +MISC metadata.xml 772 BLAKE2B d7741f26157519bd2585a35e152733aa5b125ca5b4049b65f2a42d15afe4b20fd1c702f8c9fe6e4a02d87bfae6685d774fdf749b6601e6c4517aecfc98314057 SHA512 190846f73588b2bce1107fa521dcfb5a2eb7190ef98b268d862e5e8e6830c7aecda7aa476a8cf43ff4fae478e96eab72590de4439eb28db8f3c9a3299c36b1aa diff --git a/net-misc/r8152/files/r8152-2.18.1-kernel-6.9-fix.patch b/net-misc/r8152/files/r8152-2.18.1-kernel-6.9-fix.patch new file mode 100644 index 000000000000..155a5aa1100b --- /dev/null +++ b/net-misc/r8152/files/r8152-2.18.1-kernel-6.9-fix.patch @@ -0,0 +1,134 @@ +From 32d026ab6b601cfe2882818921ba379cfbc3031e Mon Sep 17 00:00:00 2001 +From: Jay Faulkner <jay@jvf.cc> +Date: Wed, 11 Sep 2024 20:30:33 -0700 +Subject: [PATCH] Forward ported version of kernel 6.9.x fix patch + +Original version sourced from below; has been forward-ported from +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> +--- + r8152.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 46 insertions(+), 4 deletions(-) + +diff --git a/r8152.c b/r8152.c +index cee3b23..4063525 100644 +--- a/r8152.c ++++ b/r8152.c +@@ -1006,7 +1006,10 @@ struct r8152 { + int (*up)(struct r8152 *tp); + int (*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) */ +@@ -23342,8 +23345,13 @@ 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; + int ret; +@@ -23369,17 +23377,33 @@ static int r8152_get_eee(struct r8152 *tp, struct ethtool_eee *eee) + + eee->eee_enabled = tp->eee_en; + eee->eee_active = !!(supported & adv & lp); +- eee->supported = supported; ++#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 = mmd_eee_adv_to_ethtool_adv_t(tp->eee_adv); + eee->lp_advertised = lp; ++#endif + + out: + return (ret < 0) ? ret : 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 + { +- u16 val = ethtool_adv_to_mmd_eee_adv_t(eee->advertised); ++#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; +@@ -23387,7 +23411,11 @@ static int r8152_set_eee(struct r8152 *tp, struct ethtool_eee *eee) + return rtl_eee_enable(tp, tp->eee_en); + } + ++#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; +@@ -23410,16 +23438,26 @@ static int r8153_get_eee(struct r8152 *tp, struct ethtool_eee *eee) + + eee->eee_enabled = tp->eee_en; + eee->eee_active = !!(supported & adv & lp); +- eee->supported = supported; ++#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 = mmd_eee_adv_to_ethtool_adv_t(tp->eee_adv); + eee->lp_advertised = lp; ++#endif + + out: + return (ret < 0) ? ret : 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; +@@ -23446,7 +23484,11 @@ out: + } + + 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; +-- +2.46.0 + diff --git a/net-misc/r8152/metadata.xml b/net-misc/r8152/metadata.xml index b840941c9ce9..932424f746ed 100644 --- a/net-misc/r8152/metadata.xml +++ b/net-misc/r8152/metadata.xml @@ -9,9 +9,15 @@ <email>proxy-maint@gentoo.org</email> <name>Proxy Maintainers</name> </maintainer> - <longdescription>Official Realtek r8152 linux driver. The following cards are currently supported: -RTL8156 RTL8156B(S)(G) RTL8153 RTL8153B RTL8154 RTL8154B RTL8152B</longdescription> + <longdescription> + Official Realtek r8152 linux driver. Supports most realtek + USB network cards, including: RTL8157, RTL8156(,B), RTL8153(,B,C,D,E), + RTL8154(,B), RTL8152B. + </longdescription> <use> <flag name="center-tap-short">Enable support for center tap short</flag> </use> + <upstream> + <remote-id type="github">jayofdoom/realtek-r8152-unchanged</remote-id> + </upstream> </pkgmetadata> diff --git a/net-misc/r8152/r8152-2.18.1.ebuild b/net-misc/r8152/r8152-2.18.1.ebuild new file mode 100644 index 000000000000..ca03338e82f4 --- /dev/null +++ b/net-misc/r8152/r8152-2.18.1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2024 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" +# Using github readme as homepage as the realtek page has changed location twice in six months. +HOMEPAGE="https://github.com/jayofdoom/realtek-r8152-unchanged" +SRC_URI="https://github.com/jayofdoom/realtek-r8152-unchanged/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/realtek-r8152-unchanged-${PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="virtual/udev" +DEPEND="${RDEPEND}" + +IUSE="+center-tap-short" + +# Many of the patches are sourced from pull requests to +# https://github.com/wget/realtek-r8152-linux/ -- we do not use this repo +# as the official upstream as it does not keep a clear deliniation between +# shipped realtek code and patches. It is the source used by the AUR package. +PATCHES=( + "${FILESDIR}"/${PN}-2.16.3-kernel-6.4.10-fix.patch + "${FILESDIR}"/${PN}-2.16.3-asus-c5000-support.patch + "${FILESDIR}"/${PN}-2.18.1-kernel-6.9-fix.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 +} |