1 |
commit: 111b4f5bee7a6ac6538c8df1ae1f427c3cf5ddcb |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 1 22:26:32 2018 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 1 22:26:32 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=111b4f5b |
7 |
|
8 |
net-misc/r8168: Version bump to 8.045.08 |
9 |
|
10 |
Includes patch for 4.15. Thanks to Alois Nespor from Arch Linux. |
11 |
|
12 |
Bug: https://bugs.gentoo.org/646114 |
13 |
Package-Manager: Portage-2.3.21, Repoman-2.3.6 |
14 |
|
15 |
net-misc/r8168/Manifest | 1 + |
16 |
net-misc/r8168/files/linux-4.15-2.patch | 85 +++++++++++++++++++++++++++++++++ |
17 |
net-misc/r8168/r8168-8.045.08.ebuild | 33 +++++++++++++ |
18 |
3 files changed, 119 insertions(+) |
19 |
|
20 |
diff --git a/net-misc/r8168/Manifest b/net-misc/r8168/Manifest |
21 |
index 337f96ab143..3455812608f 100644 |
22 |
--- a/net-misc/r8168/Manifest |
23 |
+++ b/net-misc/r8168/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST r8168-8.044.02.tar.bz2 95880 BLAKE2B f153b077f8112c2b3c81a923a9a9c7d5096d141adb1cc8dd220f9fdf5df32af90c30f19512dc95bb2761febcfe3a59b6634e9fdec8fbb08b6b493a15aad99d0f SHA512 d7e4fd73ee4f17440613b78163777fc0b9e472490a900fdf8e66c4e16f413cc01f49991a68c7bfb19ddf9577e706d0410ff7c8e85ced53e9740e69efda729512 |
26 |
+DIST r8168-8.045.08.tar.bz2 104427 BLAKE2B 56e332b518aa3c244750310a77d53ca2fc9a365f4a043e452c5593bcfcd5679c882d35b9977438ddb6a42ba40bb7c9b45e73926fda37c372314d57290ea3ffab SHA512 9037527f193d59da8bcf69396582e13acb58880ce52328e596ffb469352d38649d43f3c31b01ed607773bba1624561f299b3909dd6124448ed75e8f548d80563 |
27 |
|
28 |
diff --git a/net-misc/r8168/files/linux-4.15-2.patch b/net-misc/r8168/files/linux-4.15-2.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..5f5f17c551c |
31 |
--- /dev/null |
32 |
+++ b/net-misc/r8168/files/linux-4.15-2.patch |
33 |
@@ -0,0 +1,85 @@ |
34 |
+Author: Alois Nespor <info@×××××××××××.info> |
35 |
+Description: fix module build for Linux 4.15 |
36 |
+Origin: vendor, https://aur.archlinux.org/cgit/aur.git/tree/linux-4.15-2.patch?h=r8168-dkms |
37 |
+ |
38 |
+--- a/src/r8168_n.c |
39 |
++++ b/src/r8168_n.c |
40 |
+@@ -407,8 +407,14 @@ MODULE_VERSION(RTL8168_VERSION); |
41 |
+ static void rtl8168_sleep_rx_enable(struct net_device *dev); |
42 |
+ static void rtl8168_dsm(struct net_device *dev, int dev_state); |
43 |
+ |
44 |
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) |
45 |
++static void rtl8168_esd_timer(struct timer_list *timer); |
46 |
++static void rtl8168_link_timer(struct timer_list *timer); |
47 |
++#else |
48 |
+ static void rtl8168_esd_timer(unsigned long __opaque); |
49 |
+ static void rtl8168_link_timer(unsigned long __opaque); |
50 |
++#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) |
51 |
++ |
52 |
+ static void rtl8168_tx_clear(struct rtl8168_private *tp); |
53 |
+ static void rtl8168_rx_clear(struct rtl8168_private *tp); |
54 |
+ |
55 |
+@@ -22964,7 +22970,11 @@ static inline void rtl8168_request_esd_t |
56 |
+ struct rtl8168_private *tp = netdev_priv(dev); |
57 |
+ struct timer_list *timer = &tp->esd_timer; |
58 |
+ |
59 |
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) |
60 |
++ timer_setup(timer, rtl8168_esd_timer, 0); |
61 |
++#else |
62 |
+ setup_timer(timer, rtl8168_esd_timer, (unsigned long)dev); |
63 |
++#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) |
64 |
+ mod_timer(timer, jiffies + RTL8168_ESD_TIMEOUT); |
65 |
+ } |
66 |
+ |
67 |
+@@ -22978,7 +22988,11 @@ static inline void rtl8168_request_link_ |
68 |
+ struct rtl8168_private *tp = netdev_priv(dev); |
69 |
+ struct timer_list *timer = &tp->link_timer; |
70 |
+ |
71 |
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) |
72 |
++ timer_setup(timer, rtl8168_link_timer, 0); |
73 |
++#else |
74 |
+ setup_timer(timer, rtl8168_link_timer, (unsigned long)dev); |
75 |
++#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) |
76 |
+ mod_timer(timer, jiffies + RTL8168_LINK_TIMEOUT); |
77 |
+ } |
78 |
+ |
79 |
+@@ -24717,12 +24731,19 @@ err_out: |
80 |
+ #define PCI_DEVICE_SERIAL_NUMBER (0x0164) |
81 |
+ |
82 |
+ static void |
83 |
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) |
84 |
++rtl8168_esd_timer(struct timer_list *timer) |
85 |
++{ |
86 |
++ struct rtl8168_private *tp = from_timer(tp, timer, esd_timer); |
87 |
++ struct net_device *dev = tp->dev; |
88 |
++#else |
89 |
+ rtl8168_esd_timer(unsigned long __opaque) |
90 |
+ { |
91 |
+ struct net_device *dev = (struct net_device *)__opaque; |
92 |
+ struct rtl8168_private *tp = netdev_priv(dev); |
93 |
+- struct pci_dev *pdev = tp->pci_dev; |
94 |
+ struct timer_list *timer = &tp->esd_timer; |
95 |
++#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) |
96 |
++ struct pci_dev *pdev = tp->pci_dev; |
97 |
+ unsigned long timeout = RTL8168_ESD_TIMEOUT; |
98 |
+ unsigned long flags; |
99 |
+ u8 cmd; |
100 |
+@@ -24856,11 +24877,18 @@ rtl8168_esd_timer(unsigned long __opaque |
101 |
+ } |
102 |
+ |
103 |
+ static void |
104 |
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) |
105 |
++rtl8168_link_timer(struct timer_list *timer) |
106 |
++{ |
107 |
++ struct rtl8168_private *tp = from_timer(tp, timer, link_timer); |
108 |
++ struct net_device *dev = tp->dev; |
109 |
++#else |
110 |
+ rtl8168_link_timer(unsigned long __opaque) |
111 |
+ { |
112 |
+ struct net_device *dev = (struct net_device *)__opaque; |
113 |
+ struct rtl8168_private *tp = netdev_priv(dev); |
114 |
+ struct timer_list *timer = &tp->link_timer; |
115 |
++#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) |
116 |
+ unsigned long flags; |
117 |
+ |
118 |
+ spin_lock_irqsave(&tp->lock, flags); |
119 |
|
120 |
diff --git a/net-misc/r8168/r8168-8.045.08.ebuild b/net-misc/r8168/r8168-8.045.08.ebuild |
121 |
new file mode 100644 |
122 |
index 00000000000..aefe5b84ce6 |
123 |
--- /dev/null |
124 |
+++ b/net-misc/r8168/r8168-8.045.08.ebuild |
125 |
@@ -0,0 +1,33 @@ |
126 |
+# Copyright 1999-2018 Gentoo Foundation |
127 |
+# Distributed under the terms of the GNU General Public License v2 |
128 |
+ |
129 |
+EAPI=6 |
130 |
+ |
131 |
+inherit linux-info linux-mod eutils |
132 |
+ |
133 |
+DESCRIPTION="r8168 driver for Realtek 8111/8168 PCI-E NICs" |
134 |
+HOMEPAGE="http://www.realtek.com.tw" |
135 |
+SRC_URI="http://12244.wpc.azureedge.net/8012244/drivers/rtdrivers/cn/nic/0010-${P}.tar.bz2 -> ${P}.tar.bz2" |
136 |
+LICENSE="GPL-2" |
137 |
+SLOT="0" |
138 |
+KEYWORDS="~amd64 ~x86" |
139 |
+ |
140 |
+MODULE_NAMES="r8168(net:${S}/src)" |
141 |
+BUILD_TARGETS="modules" |
142 |
+ |
143 |
+CONFIG_CHECK="!R8169" |
144 |
+ERROR_R8169="${P} requires Realtek 8169 PCI Gigabit Ethernet adapter (CONFIG_R8169) to be DISABLED" |
145 |
+ |
146 |
+PATCHES=( |
147 |
+ "${FILESDIR}"/linux-4.15-2.patch |
148 |
+) |
149 |
+ |
150 |
+pkg_setup() { |
151 |
+ linux-mod_pkg_setup |
152 |
+ BUILD_PARAMS="KERNELDIR=${KV_DIR}" |
153 |
+} |
154 |
+ |
155 |
+src_install() { |
156 |
+ linux-mod_src_install |
157 |
+ dodoc README |
158 |
+} |