From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6EFAD158020 for ; Tue, 22 Nov 2022 23:42:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5E92AE0BF2; Tue, 22 Nov 2022 23:42:10 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3D136E0BF2 for ; Tue, 22 Nov 2022 23:42:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1981E340FC2 for ; Tue, 22 Nov 2022 23:42:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4BE7E621 for ; Tue, 22 Nov 2022 23:42:07 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1669159796.075f9be47b5343e90d7d0ab0dc94b3072ce2cd2c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/r8152/, net-misc/r8152/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/r8152/files/r8152-2.16.3-kernel-6.1-fix.patch net-misc/r8152/r8152-2.16.3.ebuild X-VCS-Directories: net-misc/r8152/ net-misc/r8152/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 075f9be47b5343e90d7d0ab0dc94b3072ce2cd2c X-VCS-Branch: master Date: Tue, 22 Nov 2022 23:42:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9fcb1ec3-3146-4068-8cc1-35b57946017b X-Archives-Hash: 243aae5e3d5ba52727937bbb36483512 commit: 075f9be47b5343e90d7d0ab0dc94b3072ce2cd2c Author: Jay Faulkner jvf cc> AuthorDate: Tue Nov 22 22:27:02 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Nov 22 23:29:56 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=075f9be4 net-misc/r8152: Support kernel 6.1 Kernel 6.1 is changing the interface for network drivers. This is a backwards-compatable fix to the kernel module to make it work on 6.1. Thanks to ervin.popescu10 gmail.com for the patch. Signed-off-by: Jay Faulkner jvf.cc> Closes: https://github.com/gentoo/gentoo/pull/28391 Signed-off-by: Sam James gentoo.org> .../r8152/files/r8152-2.16.3-kernel-6.1-fix.patch | 46 ++++++++++++++++++++++ net-misc/r8152/r8152-2.16.3.ebuild | 1 + 2 files changed, 47 insertions(+) diff --git a/net-misc/r8152/files/r8152-2.16.3-kernel-6.1-fix.patch b/net-misc/r8152/files/r8152-2.16.3-kernel-6.1-fix.patch new file mode 100644 index 000000000000..d20db413a16b --- /dev/null +++ b/net-misc/r8152/files/r8152-2.16.3-kernel-6.1-fix.patch @@ -0,0 +1,46 @@ +https://github.com/ervinpopescu/realtek-r8152-linux/commit/0029747c3cf68dbccbebfcb560277040673dfe36.patch +From: ervinpopescu +Date: Tue, 15 Nov 2022 19:30:16 +0200 +Subject: [PATCH] Fix for linux 6.1 without breaking older kernel compatibility + +--- a/r8152.c ++++ b/r8152.c +@@ -17558,7 +17558,6 @@ static void r8156_init(struct r8152 *tp) + // break; + // } + +- + r8153b_mcu_spdown_en(tp, false); + + ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS); +@@ -18339,7 +18338,6 @@ int rtl8152_get_settings(struct net_device *netdev, struct ethtool_cmd *cmd) + cmd->autoneg = AUTONEG_DISABLE; + } + +- + if (netif_running(netdev) && netif_carrier_ok(netdev)) { + u16 speed = rtl8152_get_speed(tp); + +@@ -19202,7 +19200,6 @@ static int rtltool_ioctl(struct r8152 *tp, struct ifreq *ifr) + } + break; + +- + case RTLTOOL_USB_OCP_WRITE_DWORD: + if (!tp->rtk_enable_diag && net_ratelimit()) + netif_warn(tp, drv, netdev, +@@ -20708,10 +20705,14 @@ static int rtl8152_probe(struct usb_interface *intf, + + usb_set_intfdata(intf, tp); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0) + if (tp->support_2500full) + netif_napi_add(netdev, &tp->napi, r8152_poll, 256); + else + netif_napi_add(netdev, &tp->napi, r8152_poll, 64); ++#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0) */ ++ netif_napi_add(netdev, &tp->napi, r8152_poll); ++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0) */ + + ret = register_netdev(netdev); + if (ret != 0) { diff --git a/net-misc/r8152/r8152-2.16.3.ebuild b/net-misc/r8152/r8152-2.16.3.ebuild index bb0eb2cef113..ef6a81cfcf22 100644 --- a/net-misc/r8152/r8152-2.16.3.ebuild +++ b/net-misc/r8152/r8152-2.16.3.ebuild @@ -24,6 +24,7 @@ IUSE="+center-tap-short" # 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 ) pkg_setup() {