From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/r8168/, net-misc/r8168/files/
Date: Thu, 1 Feb 2018 22:27:15 +0000 (UTC) [thread overview]
Message-ID: <1517523992.111b4f5bee7a6ac6538c8df1ae1f427c3cf5ddcb.chewi@gentoo> (raw)
commit: 111b4f5bee7a6ac6538c8df1ae1f427c3cf5ddcb
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 1 22:26:32 2018 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Feb 1 22:26:32 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=111b4f5b
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
net-misc/r8168/Manifest | 1 +
net-misc/r8168/files/linux-4.15-2.patch | 85 +++++++++++++++++++++++++++++++++
net-misc/r8168/r8168-8.045.08.ebuild | 33 +++++++++++++
3 files changed, 119 insertions(+)
diff --git a/net-misc/r8168/Manifest b/net-misc/r8168/Manifest
index 337f96ab143..3455812608f 100644
--- a/net-misc/r8168/Manifest
+++ b/net-misc/r8168/Manifest
@@ -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
diff --git a/net-misc/r8168/files/linux-4.15-2.patch b/net-misc/r8168/files/linux-4.15-2.patch
new file mode 100644
index 00000000000..5f5f17c551c
--- /dev/null
+++ b/net-misc/r8168/files/linux-4.15-2.patch
@@ -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);
diff --git a/net-misc/r8168/r8168-8.045.08.ebuild b/net-misc/r8168/r8168-8.045.08.ebuild
new file mode 100644
index 00000000000..aefe5b84ce6
--- /dev/null
+++ b/net-misc/r8168/r8168-8.045.08.ebuild
@@ -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
+}
next reply other threads:[~2018-02-01 22:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 22:27 James Le Cuirot [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-08-29 11:56 [gentoo-commits] repo/gentoo:master commit in: net-misc/r8168/, net-misc/r8168/files/ Pacho Ramos
2020-04-01 23:06 Pacho Ramos
2019-12-27 15:24 James Le Cuirot
2017-05-13 19:39 James Le Cuirot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1517523992.111b4f5bee7a6ac6538c8df1ae1f427c3cf5ddcb.chewi@gentoo \
--to=chewi@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox