From 6471bb3481245108afbecd637feb18bf5688a12d Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sun, 26 Jan 2020 17:53:52 +0800 Subject: [PATCH] ipq40xx: fix error patch --- ...714-essedma-add-fix-for-memory-allocation.patch | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/target/linux/ipq40xx/patches-4.14/714-essedma-add-fix-for-memory-allocation.patch b/target/linux/ipq40xx/patches-4.14/714-essedma-add-fix-for-memory-allocation.patch index 5b9fcf780c..6c696caf4b 100644 --- a/target/linux/ipq40xx/patches-4.14/714-essedma-add-fix-for-memory-allocation.patch +++ b/target/linux/ipq40xx/patches-4.14/714-essedma-add-fix-for-memory-allocation.patch @@ -115,12 +115,14 @@ Reviewed-by: Grant Grundler } /* At this point skb should go to stack */ -@@ -756,11 +769,17 @@ static void edma_rx_complete(struct edma +@@ -756,13 +769,17 @@ static u16 edma_rx_complete(struct edma_common_info *edma_cinfo, /* Refill here in case refill threshold wasn't reached */ - if (likely(cleaned_count)) { - ret_count = edma_alloc_rx_buf(edma_cinfo, erdr, cleaned_count, queue_id); -- if (ret_count) + if (edma_rfd_desc_unused(erdr)) { + ret_count = edma_alloc_rx_buf(edma_cinfo, erdr, edma_rfd_desc_unused(erdr), queue_id); +- if (ret_count) { - dev_dbg(&pdev->dev, "Not all buffers was reallocated"); +- edma_realloc_timer_start(napi, queue_id); +- } + erdr->pending_fill = ret_count; + if (ret_count) { + if (net_ratelimit()) @@ -135,7 +137,7 @@ Reviewed-by: Grant Grundler } /* edma_delete_rfs_filter() -@@ -2064,6 +2083,7 @@ int edma_poll(struct napi_struct *napi, +@@ -2064,6 +2081,7 @@ int edma_poll(struct napi_struct *napi, u32 shadow_rx_status, shadow_tx_status; int queue_id; int i, work_done = 0; @@ -143,7 +145,7 @@ Reviewed-by: Grant Grundler /* Store the Rx/Tx status by ANDing it with * appropriate CPU RX?TX mask -@@ -2097,13 +2117,19 @@ int edma_poll(struct napi_struct *napi, +@@ -2097,13 +2115,19 @@ int edma_poll(struct napi_struct *napi, */ while (edma_percpu_info->rx_status) { queue_id = ffs(edma_percpu_info->rx_status) - 1;