summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXyne2015-06-21 02:45:04 +0000
committerXyne2015-06-21 02:45:04 +0000
commit17f1ac52b097516e7f3191d59632ba73328cecf3 (patch)
treeee96c82250a8f7a511a81b5b6b6f0c22177fa3f6
downloadaur-17f1ac52b097516e7f3191d59632ba73328cecf3.tar.gz
Initial import.
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD41
-rw-r--r--jme-git.install12
-rw-r--r--kernel-3.10.patch103
4 files changed, 176 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..574f2ee1da1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = jme-git
+ pkgdesc = JMicron Ethernet Linux driver
+ pkgver = 1329935374
+ pkgrel = 1
+ url = http://bbs.cooldavid.org/git/?p=jme.git
+ install = jme-git.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ makedepends = linux-headers
+ provides = jme
+ conflicts = jme
+ source = git://bbs.cooldavid.org/jme.git#branch=master
+ source = kernel-3.10.patch
+ sha512sums = SKIP
+ sha512sums = 72c1d51afea066df405a7e0ade6ac3313664538349819ab869be1c1050e3a4cb6fa88f503332b046d58903ae8b51f21cfccdd57cd6b0d38320bb6e1d68bc5cd8
+
+pkgname = jme-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..16f0073718e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Xyne <ca archlinux xyne, backwards>
+_pkgname=jme
+pkgname=jme-git
+pkgver=1329935374
+pkgrel=1
+pkgdesc="JMicron Ethernet Linux driver"
+arch=('i686' 'x86_64')
+url="http://bbs.cooldavid.org/git/?p=jme.git"
+license=('GPL')
+makedepends=('git' 'linux-headers')
+provides=('jme')
+conflicts=('jme')
+install="$pkgname".install
+
+source=('git://bbs.cooldavid.org/jme.git#branch=master' 'kernel-3.10.patch')
+sha512sums=('SKIP'
+ '72c1d51afea066df405a7e0ade6ac3313664538349819ab869be1c1050e3a4cb6fa88f503332b046d58903ae8b51f21cfccdd57cd6b0d38320bb6e1d68bc5cd8')
+
+pkgver() {
+ cd -- "$srcdir/$_pkgname"
+ git log -n1 --pretty=format:%ct
+}
+
+prepare() {
+ cd -- "$srcdir/$_pkgname"
+ git apply "$srcdir/kernel-3.10.patch"
+}
+
+build() {
+ cd -- "$srcdir/$_pkgname"
+ make -j1
+ gzip jme.ko
+}
+
+package() {
+ cd -- "$srcdir/$_pkgname"
+ install -Dm644 jme.ko.gz "$pkgdir"/lib/modules/"$(uname -r)"/updates/jme.ko.gz
+ install -Dm644 jme.h "$pkgdir"/usr/include/jme.h
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/jme-git.install b/jme-git.install
new file mode 100644
index 00000000000..fca789fa984
--- /dev/null
+++ b/jme-git.install
@@ -0,0 +1,12 @@
+post_install() {
+ echo "updating module dependencies"
+ depmod -a
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kernel-3.10.patch b/kernel-3.10.patch
new file mode 100644
index 00000000000..12de8362cf6
--- /dev/null
+++ b/kernel-3.10.patch
@@ -0,0 +1,103 @@
+From f0cc60359934abb2aa8c8aede3e0753167643a18 Mon Sep 17 00:00:00 2001
+From: Xyne <xyne@archlinux.ca>
+Date: Tue, 10 Sep 2013 06:04:50 +0000
+Subject: [PATCH] kernel 3.10 patch based on
+ https://code.google.com/p/r8168/issues/detail?id=15
+
+---
+ jme.c | 33 ++++++++++++++++++++++++++++++++-
+ 1 file changed, 32 insertions(+), 1 deletion(-)
+
+diff --git a/jme.c b/jme.c
+index 6ab8a2e..0bef759 100644
+--- a/jme.c
++++ b/jme.c
+@@ -42,6 +42,12 @@
+ #include <linux/if_vlan.h>
+ #include <linux/slab.h>
+ #include <net/ip6_checksum.h>
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++#include <uapi/linux/if_ether.h>
++#endif
++
+ #include "jme.h"
+
+ static int force_pseudohp = -1;
+@@ -1057,8 +1063,11 @@ jme_alloc_and_feed_skb(struct jme_adapter *jme, int idx)
+
+ if (rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_TAGON)) {
+ u16 vid = le16_to_cpu(rxdesc->descwb.vlan);
+-
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++ __vlan_hwaccel_put_tag(skb, htons(ETH_P_IP), vid);
++#else
+ __vlan_hwaccel_put_tag(skb, vid);
++#endif
+ NET_STAT(jme).rx_bytes += 4;
+ }
+ jme->jme_rx(skb);
+@@ -2946,7 +2955,11 @@ static const struct net_device_ops jme_netdev_ops = {
+ .ndo_set_features = jme_set_features,
+ };
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++static int
++#else
+ static int __devinit
++#endif
+ jme_init_one(struct pci_dev *pdev,
+ const struct pci_device_id *ent)
+ {
+@@ -3003,6 +3016,15 @@ jme_init_one(struct pci_dev *pdev,
+ NETIF_F_TSO |
+ NETIF_F_TSO6 |
+ NETIF_F_RXCSUM;
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++ netdev->features = NETIF_F_IP_CSUM |
++ NETIF_F_IPV6_CSUM |
++ NETIF_F_SG |
++ NETIF_F_TSO |
++ NETIF_F_TSO6 |
++ NETIF_F_HW_VLAN_CTAG_TX |
++ NETIF_F_HW_VLAN_CTAG_RX;
++ #else
+ netdev->features = NETIF_F_IP_CSUM |
+ NETIF_F_IPV6_CSUM |
+ NETIF_F_SG |
+@@ -3010,6 +3032,7 @@ jme_init_one(struct pci_dev *pdev,
+ NETIF_F_TSO6 |
+ NETIF_F_HW_VLAN_TX |
+ NETIF_F_HW_VLAN_RX;
++ #endif
+ if (using_dac)
+ netdev->features |= NETIF_F_HIGHDMA;
+
+@@ -3197,7 +3220,11 @@ err_out:
+ return rc;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++static void
++#else
+ static void __devexit
++#endif
+ jme_remove_one(struct pci_dev *pdev)
+ {
+ struct net_device *netdev = pci_get_drvdata(pdev);
+@@ -3306,7 +3333,11 @@ static struct pci_driver jme_driver = {
+ .name = DRV_NAME,
+ .id_table = jme_pci_tbl,
+ .probe = jme_init_one,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
++ .remove = jme_remove_one,
++#else
+ .remove = __devexit_p(jme_remove_one),
++#endif
+ .shutdown = jme_shutdown,
+ .driver.pm = JME_PM_OPS,
+ };
+--
+1.8.4
+