[packages/r8168] - up to 8.036.00 - fix build with linux 3.10
baggins
baggins at pld-linux.org
Sun Aug 25 12:40:22 CEST 2013
commit a256259e32bb829fb2ac9a2dc7c9c2ffce13a8c2
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Aug 25 12:40:05 2013 +0200
- up to 8.036.00
- fix build with linux 3.10
linux-3.10.patch | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
linux-3.8.patch | 62 ---------------------------------------------------
r8168.spec | 8 +++----
3 files changed, 71 insertions(+), 66 deletions(-)
---
diff --git a/r8168.spec b/r8168.spec
index 632fcc8..2f51cca 100644
--- a/r8168.spec
+++ b/r8168.spec
@@ -10,12 +10,12 @@
%undefine with_dist_kernel
%endif
-%define rel 9
+%define rel 1
%define pname r8168
Summary: Linux driver for RTL8111/8168B PCI Express Gigabit Ethernet controllers
Summary(pl.UTF-8): Linuksowy sterownik dla kart sieciowych RTL8111/8168B PCI Express Gigabit Ethernet
Name: %{pname}%{_alt_kernel}
-Version: 8.035.00
+Version: 8.036.00
Release: %{rel}
License: GPL
Group: Base/Kernel
@@ -24,8 +24,8 @@ URL: http://www.realtek.com.tw/
# http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false
# unfortunately this download is not DF-friendly.
Source0: %{pname}-%{version}.tar.bz2
-# Source0-md5: 80b8d23e463e5408dced1b1377579dae
-Patch0: linux-3.8.patch
+# Source0-md5: a9a5b238f59cc30eefa5917d7f6b728e
+Patch0: linux-3.10.patch
%if %{with kernel}
%if %{with dist_kernel}
BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.33
diff --git a/linux-3.10.patch b/linux-3.10.patch
new file mode 100644
index 0000000..b52856e
--- /dev/null
+++ b/linux-3.10.patch
@@ -0,0 +1,67 @@
+Author: Ko Matsumura <minaco2 at gmail.com>
+Description: add kernel 3.10 support
+Origin: other, https://code.google.com/p/r8168/issues/detail?id=15#c1
+Bug-Debian: http://bugs.debian.org/717161
+
+--- a/src/r8168_n.c 2013-06-17 20:42:48.000000000 +0900
++++ b/src/r8168_n.c 2013-07-21 00:20:02.000000000 +0900
+@@ -52,6 +52,10 @@
+ #include <linux/init.h>
+ #include <linux/rtnetlink.h>
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++#include <uapi/linux/if_ether.h>
++#endif
++
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ #include <linux/pci-aspm.h>
+ #endif
+@@ -2232,6 +2236,9 @@
+ swab16(opts2 & 0xffff));
+ ret = 0;
+ }
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++ if (opts2 & RxVlanTag)
++ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff));
+ #else
+ if (opts2 & RxVlanTag)
+ __vlan_hwaccel_put_tag(skb, swab16(opts2 & 0xffff));
+@@ -2294,8 +2301,11 @@
+ tp->cp_cmd |= RxChkSum;
+ else
+ tp->cp_cmd &= ~RxChkSum;
+-
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++ if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
++#else
+ if (dev->features & NETIF_F_HW_VLAN_RX)
++#endif
+ tp->cp_cmd |= RxVlan;
+ else
+ tp->cp_cmd &= ~RxVlan;
+@@ -16195,7 +16205,11 @@
+
+ #ifdef CONFIG_R8168_VLAN
+ if (tp->mcfg != CFG_METHOD_DEFAULT) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++ dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
++#else
+ dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
++#endif
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+ dev->vlan_rx_kill_vid = rtl8168_vlan_rx_kill_vid;
+ #endif //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+@@ -16209,8 +16223,13 @@
+ tp->cp_cmd |= RxChkSum;
+ #else
+ dev->features |= NETIF_F_RXCSUM;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++ dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
++ NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
++#else
+ dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
+ NETIF_F_RXCSUM | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
++#endif
+ dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
+ NETIF_F_HIGHDMA;
+ #endif
diff --git a/linux-3.8.patch b/linux-3.8.patch
deleted file mode 100644
index 0a7ffaa..0000000
--- a/linux-3.8.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- r8168-8.035.00/src/r8168_n.c.orig 2012-12-19 11:38:56.000000000 +0100
-+++ r8168-8.035.00/src/r8168_n.c 2013-06-04 13:10:37.691818331 +0200
-@@ -14541,7 +14541,11 @@
- spin_unlock_irqrestore(&tp->phy_lock, flags);
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
- static int __devinit
-+#else
-+static int
-+#endif
- rtl8168_init_board(struct pci_dev *pdev,
- struct net_device **dev_out,
- void __iomem **ioaddr_out)
-@@ -14711,7 +14711,11 @@
- goto out;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
- static void __devinit
-+#else
-+static void
-+#endif
- rtl8168_init_sequence(struct rtl8168_private *tp)
- {
- void __iomem *ioaddr = tp->mmio_addr;
-@@ -14964,7 +14964,11 @@
- };
- #endif
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
- static int __devinit
-+#else
-+static int
-+#endif
- rtl8168_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
- {
-@@ -15128,7 +15128,11 @@
- return 0;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
- static void __devexit
-+#else
-+static void
-+#endif
- rtl8168_remove_one(struct pci_dev *pdev)
- {
- struct net_device *dev = pci_get_drvdata(pdev);
-@@ -17649,7 +17649,11 @@
- .name = MODULENAME,
- .id_table = rtl8168_pci_tbl,
- .probe = rtl8168_init_one,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
- .remove = __devexit_p(rtl8168_remove_one),
-+#else
-+ .remove = rtl8168_remove_one,
-+#endif
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)
- .shutdown = rtl8168_shutdown,
- #endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/r8168.git/commitdiff/a256259e32bb829fb2ac9a2dc7c9c2ffce13a8c2
More information about the pld-cvs-commit
mailing list