mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
net-misc/r8168: Version bump to 8.045.08
Includes patch for 4.15. Thanks to Alois Nespor from Arch Linux. Bug: https://bugs.gentoo.org/646114 Package-Manager: Portage-2.3.21, Repoman-2.3.6
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST r8168-8.044.02.tar.bz2 95880 BLAKE2B f153b077f8112c2b3c81a923a9a9c7d5096d141adb1cc8dd220f9fdf5df32af90c30f19512dc95bb2761febcfe3a59b6634e9fdec8fbb08b6b493a15aad99d0f SHA512 d7e4fd73ee4f17440613b78163777fc0b9e472490a900fdf8e66c4e16f413cc01f49991a68c7bfb19ddf9577e706d0410ff7c8e85ced53e9740e69efda729512
|
||||
DIST r8168-8.045.08.tar.bz2 104427 BLAKE2B 56e332b518aa3c244750310a77d53ca2fc9a365f4a043e452c5593bcfcd5679c882d35b9977438ddb6a42ba40bb7c9b45e73926fda37c372314d57290ea3ffab SHA512 9037527f193d59da8bcf69396582e13acb58880ce52328e596ffb469352d38649d43f3c31b01ed607773bba1624561f299b3909dd6124448ed75e8f548d80563
|
||||
|
||||
85
net-misc/r8168/files/linux-4.15-2.patch
Normal file
85
net-misc/r8168/files/linux-4.15-2.patch
Normal file
@@ -0,0 +1,85 @@
|
||||
Author: Alois Nespor <info@aloisnespor.info>
|
||||
Description: fix module build for Linux 4.15
|
||||
Origin: vendor, https://aur.archlinux.org/cgit/aur.git/tree/linux-4.15-2.patch?h=r8168-dkms
|
||||
|
||||
--- a/src/r8168_n.c
|
||||
+++ b/src/r8168_n.c
|
||||
@@ -407,8 +407,14 @@ MODULE_VERSION(RTL8168_VERSION);
|
||||
static void rtl8168_sleep_rx_enable(struct net_device *dev);
|
||||
static void rtl8168_dsm(struct net_device *dev, int dev_state);
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
|
||||
+static void rtl8168_esd_timer(struct timer_list *timer);
|
||||
+static void rtl8168_link_timer(struct timer_list *timer);
|
||||
+#else
|
||||
static void rtl8168_esd_timer(unsigned long __opaque);
|
||||
static void rtl8168_link_timer(unsigned long __opaque);
|
||||
+#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
|
||||
+
|
||||
static void rtl8168_tx_clear(struct rtl8168_private *tp);
|
||||
static void rtl8168_rx_clear(struct rtl8168_private *tp);
|
||||
|
||||
@@ -22964,7 +22970,11 @@ static inline void rtl8168_request_esd_t
|
||||
struct rtl8168_private *tp = netdev_priv(dev);
|
||||
struct timer_list *timer = &tp->esd_timer;
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
|
||||
+ timer_setup(timer, rtl8168_esd_timer, 0);
|
||||
+#else
|
||||
setup_timer(timer, rtl8168_esd_timer, (unsigned long)dev);
|
||||
+#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
|
||||
mod_timer(timer, jiffies + RTL8168_ESD_TIMEOUT);
|
||||
}
|
||||
|
||||
@@ -22978,7 +22988,11 @@ static inline void rtl8168_request_link_
|
||||
struct rtl8168_private *tp = netdev_priv(dev);
|
||||
struct timer_list *timer = &tp->link_timer;
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
|
||||
+ timer_setup(timer, rtl8168_link_timer, 0);
|
||||
+#else
|
||||
setup_timer(timer, rtl8168_link_timer, (unsigned long)dev);
|
||||
+#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
|
||||
mod_timer(timer, jiffies + RTL8168_LINK_TIMEOUT);
|
||||
}
|
||||
|
||||
@@ -24717,12 +24731,19 @@ err_out:
|
||||
#define PCI_DEVICE_SERIAL_NUMBER (0x0164)
|
||||
|
||||
static void
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
|
||||
+rtl8168_esd_timer(struct timer_list *timer)
|
||||
+{
|
||||
+ struct rtl8168_private *tp = from_timer(tp, timer, esd_timer);
|
||||
+ struct net_device *dev = tp->dev;
|
||||
+#else
|
||||
rtl8168_esd_timer(unsigned long __opaque)
|
||||
{
|
||||
struct net_device *dev = (struct net_device *)__opaque;
|
||||
struct rtl8168_private *tp = netdev_priv(dev);
|
||||
- struct pci_dev *pdev = tp->pci_dev;
|
||||
struct timer_list *timer = &tp->esd_timer;
|
||||
+#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
|
||||
+ struct pci_dev *pdev = tp->pci_dev;
|
||||
unsigned long timeout = RTL8168_ESD_TIMEOUT;
|
||||
unsigned long flags;
|
||||
u8 cmd;
|
||||
@@ -24856,11 +24877,18 @@ rtl8168_esd_timer(unsigned long __opaque
|
||||
}
|
||||
|
||||
static void
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
|
||||
+rtl8168_link_timer(struct timer_list *timer)
|
||||
+{
|
||||
+ struct rtl8168_private *tp = from_timer(tp, timer, link_timer);
|
||||
+ struct net_device *dev = tp->dev;
|
||||
+#else
|
||||
rtl8168_link_timer(unsigned long __opaque)
|
||||
{
|
||||
struct net_device *dev = (struct net_device *)__opaque;
|
||||
struct rtl8168_private *tp = netdev_priv(dev);
|
||||
struct timer_list *timer = &tp->link_timer;
|
||||
+#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
33
net-misc/r8168/r8168-8.045.08.ebuild
Normal file
33
net-misc/r8168/r8168-8.045.08.ebuild
Normal file
@@ -0,0 +1,33 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit linux-info linux-mod eutils
|
||||
|
||||
DESCRIPTION="r8168 driver for Realtek 8111/8168 PCI-E NICs"
|
||||
HOMEPAGE="http://www.realtek.com.tw"
|
||||
SRC_URI="http://12244.wpc.azureedge.net/8012244/drivers/rtdrivers/cn/nic/0010-${P}.tar.bz2 -> ${P}.tar.bz2"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
MODULE_NAMES="r8168(net:${S}/src)"
|
||||
BUILD_TARGETS="modules"
|
||||
|
||||
CONFIG_CHECK="!R8169"
|
||||
ERROR_R8169="${P} requires Realtek 8169 PCI Gigabit Ethernet adapter (CONFIG_R8169) to be DISABLED"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/linux-4.15-2.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
linux-mod_pkg_setup
|
||||
BUILD_PARAMS="KERNELDIR=${KV_DIR}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
dodoc README
|
||||
}
|
||||
Reference in New Issue
Block a user