Add net-misc/r8168 with patch for 3.16 kernel

new file:   net-misc/r8168/Manifest
new file:   net-misc/r8168/files/r8168-8.038.00-3.16.patch
new file:   net-misc/r8168/r8168-8.038.00.ebuild
This commit is contained in:
Sergey Morozov 2014-10-26 18:33:47 +03:00
parent 9268f44556
commit a4457a82f7
3 changed files with 66 additions and 0 deletions

3
net-misc/r8168/Manifest Normal file
View File

@ -0,0 +1,3 @@
AUX r8168-8.038.00-3.16.patch 809 SHA256 65171013cd7858ef471d7750256dac488873a241052e2d4d8e7d869620a8994c SHA512 54217d03c528684b06445a960b45d0744723654ed1db9b02258addbb812bce1d045590259233f4efc4685bd2c7308cdf05bb690ebe2cd7a8614c568c822b3ef9 WHIRLPOOL ca952be98377cae392f9c224e141e2cdaad5f067b3c2bd155253c5a25750b15a6b8164929b5081158cc14fda53133f2b0a4111de2244f5bcdac59e876f892f04
DIST r8168-8.038.00.tar.bz2 74460 SHA256 1384bdf4d33b219f937bf1a600c72b22962baf7796e562b08e4da3c000f49072 SHA512 0a8af9ed1e2388b7e69210c3eadc6b187c63d942e46012bf7bed4bfdc3dbff79ce5cfe58aec1427b5194f0bf63557188609dfadbff1a09b3759b3313cda0102f WHIRLPOOL fb40c59f6abb857fb35c12f2913655d04bda06f601e87164be92e3ec68492d5ce03493f52fa8f6460a0f45f428983d4130d4d0c9f431da872b765e440e3c3600
EBUILD r8168-8.038.00.ebuild 832 SHA256 920af8d221f55e4b352e428ebec59a695b849e5694001cef38e04629f03feec6 SHA512 675af8e21fbdce775869fc9b9163ab28c31d78acfc37eee64926493155a7e1d86975808f4f586fc2e0e814b67fadbc2b7ab48df78094b5a4ec5281cf6ebd88b2 WHIRLPOOL 1e8a9b0a7f15945ca7ccb85c64159272d6afb40e974cc0dd41b1542a806afc0c34eb10735e99372d6c3074e9a958fd781d03ee389336890c5e286fe4c9d6268a

View File

@ -0,0 +1,27 @@
diff -urN r8168-8.038.00.orig/src/r8168_n.c r8168-8.038.00/src/r8168_n.c
--- r8168-8.038.00.orig/src/r8168_n.c 2014-01-08 12:56:43.000000000 +0400
+++ r8168-8.038.00/src/r8168_n.c 2014-10-26 18:28:36.311569403 +0300
@@ -17542,7 +17542,11 @@
RTL_NET_DEVICE_OPS(rtl8168_netdev_ops);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)
SET_ETHTOOL_OPS(dev, &rtl8168_ethtool_ops);
+#else
+ dev->ethtool_ops = &rtl8168_ethtool_ops;
+#endif
dev->watchdog_timeo = RTL8168_TX_TIMEOUT;
dev->irq = pdev->irq;
@@ -19119,7 +19123,11 @@
{
struct rtl8168_private *tp = netdev_priv(dev);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
PREPARE_DELAYED_WORK(&tp->task, task);
+#else
+ INIT_DELAYED_WORK(&tp->task, task);
+#endif
schedule_delayed_work(&tp->task, 4);
}
#endif

View File

@ -0,0 +1,36 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/r8168/r8168-8.038.00.ebuild,v 1.1 2014/03/18 16:45:02 joker Exp $
EAPI=4
inherit linux-mod eutils
DESCRIPTION="r8168 driver for Realtek 8111/8168 PCI-E NICs"
HOMEPAGE="http://www.realtek.com.tw"
SRC_URI="http://r8168dl.appspot.com/files/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
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"
src_prepare() {
epatch "${FILESDIR}"/${P}-3.16.patch
}
pkg_setup() {
linux-mod_pkg_setup
BUILD_PARAMS="KERNELDIR=${KV_DIR}"
}
src_install() {
linux-mod_src_install
dodoc README
}