net-misc/r8152: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/37346
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
This commit is contained in:
Michael Mair-Keimberger
2024-06-29 11:20:57 +02:00
committed by Conrad Kostecki
parent a092a8b6b7
commit 1f28ad7dd0
2 changed files with 0 additions and 89 deletions

View File

@@ -1,43 +0,0 @@
From: https://github.com/wget/realtek-r8152-linux/commit/6ffb3760c34a904467d70830ac9c10211e8f5d3a
From: Hyacinthe Cartiaux <hyacinthe.cartiaux@free.fr>
Date: Wed, 14 Sep 2022 15:13:31 +0200
Subject: [PATCH] Fix for linux 5.19 without breaking older kernel
compatibility
--- a/r8152.c
+++ b/r8152.c
@@ -20458,9 +20458,13 @@ static ssize_t sg_en_store(struct device *dev, struct device_attribute *attr,
return -EINVAL;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
+/* LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0) */
+ netif_set_tso_max_size(netdev, tso_size);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+/* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) */
netif_set_gso_max_size(netdev, tso_size);
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) */
+#endif
return count;
}
@@ -20620,12 +20624,16 @@ static int rtl8152_probe(struct usb_interface *intf,
rtl_get_mapt_ver(tp);
netdev->ethtool_ops = &ops;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
+/* LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0) */
+ netif_set_tso_max_size(netdev, RTL_LIMITED_TSO_SIZE);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+/* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) */
if (!tp->sg_use)
netif_set_gso_max_size(netdev, RTL_LIMITED_TSO_SIZE);
#else
netdev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6);
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) */
+#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
/* MTU range: 68 - 1500 or 9194 */

View File

@@ -1,46 +0,0 @@
https://github.com/ervinpopescu/realtek-r8152-linux/commit/0029747c3cf68dbccbebfcb560277040673dfe36.patch
From: ervinpopescu <ervin.popescu10@gmail.com>
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) {