From d316b6a0bc23bd3926d35623369d784c6205aada Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Sun, 22 Sep 2013 18:06:38 +0000 Subject: [PATCH] fix broken skge network driver #36865 --- 3.11.1-fix-skge.patch | 34 ++++++++++++++++++++++++++++++++++ PKGBUILD | 11 ++++++++--- 2 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 3.11.1-fix-skge.patch diff --git a/3.11.1-fix-skge.patch b/3.11.1-fix-skge.patch new file mode 100644 index 0000000..26d90e0 --- /dev/null +++ b/3.11.1-fix-skge.patch @@ -0,0 +1,34 @@ +--- a/drivers/net/ethernet/marvell/skge.c 2013-09-02 16:46:10.000000000 -0400 ++++ b/drivers/net/ethernet/marvell/skge.c 2013-09-22 11:14:10.232067541 -0400 +@@ -3086,23 +3086,27 @@ + PCI_DMA_FROMDEVICE); + skge_rx_reuse(e, skge->rx_buf_size); + } else { ++ struct skge_element ee; + struct sk_buff *nskb; + + nskb = netdev_alloc_skb_ip_align(dev, skge->rx_buf_size); + if (!nskb) + goto resubmit; + ++ ee = *e; ++ ++ skb = ee.skb; ++ prefetch(skb->data); ++ + if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) { + dev_kfree_skb(nskb); + goto resubmit; + } + + pci_unmap_single(skge->hw->pdev, +- dma_unmap_addr(e, mapaddr), +- dma_unmap_len(e, maplen), ++ dma_unmap_addr(&ee, mapaddr), ++ dma_unmap_len(&ee, maplen), + PCI_DMA_FROMDEVICE); +- skb = e->skb; +- prefetch(skb->data); + } + + skb_put(skb, len); diff --git a/PKGBUILD b/PKGBUILD index 52a2644..bb2525c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,7 +5,7 @@ pkgbase=linux # Build stock -ARCH kernel #pkgbase=linux-custom # Build kernel with a different name _srcname=linux-3.11 pkgver=3.11.1 -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') url="http://www.kernel.org/" license=('GPL2') @@ -18,14 +18,16 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz" # standard config files for mkinitcpio ramdisk 'linux.preset' 'change-default-console-loglevel.patch' - 'criu-no-expert.patch') + 'criu-no-expert.patch' + '3.11.1-fix-skge.patch') md5sums=('fea363551ff45fbe4cb88497b863b261' '43331cad943b9540afea49ad8ce5cf46' '247d9bafa184e2d9a27c1a0485419fff' '5effb245b8ec78ad570b3e5962a1a7e0' 'eb14dcfd80c00852ef81ded6e826826a' '98beb36f9b8cf16e58de2483ea9985e3' - 'd50c1ac47394e9aec637002ef3392bd1') + 'd50c1ac47394e9aec637002ef3392bd1' + '4fcee2b4485492dcfdead632275198eb') _kernelname=${pkgbase#linux} @@ -49,6 +51,9 @@ prepare() { # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch" + # #36865 fix broken skge network module + patch -Np1 -i "${srcdir}/3.11.1-fix-skge.patch" + # allow criu without expert option set # patch from fedora patch -Np1 -i "${srcdir}/criu-no-expert.patch"