ramips: fix cd-poll sd card remove randomly
[openwrt/openwrt.git] / target / linux / generic / patches-3.18 / 077-02-bgmac-implement-GRO-and-use-build_skb.patch
index 3636fb619a753bd5f1095a0c77921126027ddbbe..8dc5242b5ae86d6dbba21433bed3e106ab39e696 100644 (file)
@@ -1,10 +1,10 @@
-From: Felix Fietkau <nbd@openwrt.org>
+From: Felix Fietkau <nbd@nbd.name>
 Date: Mon, 23 Mar 2015 02:41:25 +0100
 Subject: [PATCH] bgmac: implement GRO and use build_skb
 
 This improves performance for routing and local rx
 
-Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
 ---
 
 --- a/drivers/net/ethernet/broadcom/bgmac.c
@@ -104,12 +104,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                }
        }
 +}
--      if (ring->cpu_base) {
--              /* Free ring of descriptors */
--              size = ring->num_slots * sizeof(struct bgmac_dma_desc);
--              dma_free_coherent(dma_dev, size, ring->cpu_base,
--                                ring->dma_base);
++
 +static void bgmac_dma_rx_ring_free(struct bgmac *bgmac,
 +                                 struct bgmac_dma_ring *ring)
 +{
@@ -121,7 +116,12 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 +              slot = &ring->slots[i];
 +              if (!slot->buf)
 +                      continue;
-+
+-      if (ring->cpu_base) {
+-              /* Free ring of descriptors */
+-              size = ring->num_slots * sizeof(struct bgmac_dma_desc);
+-              dma_free_coherent(dma_dev, size, ring->cpu_base,
+-                                ring->dma_base);
 +              if (slot->dma_addr)
 +                      dma_unmap_single(dma_dev, slot->dma_addr,
 +                                       BGMAC_RX_BUF_SIZE,