summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>2019-05-03 16:03:11 +0300
committerDavid S. Miller <davem@davemloft.net>2019-05-05 10:31:33 -0700
commit17170e6570c082717c142733d9a638bcd20551f8 (patch)
tree3cbf113b92b126cd7a31511e09d07e2820f0deb7
parentd14a108d510ec66f6db15509b9d7d2f0b6208145 (diff)
downloadlinux-17170e6570c082717c142733d9a638bcd20551f8.tar.gz
linux-17170e6570c082717c142733d9a638bcd20551f8.tar.bz2
linux-17170e6570c082717c142733d9a638bcd20551f8.zip
dpaa_eth: fix SG frame cleanup
Fix issue with the entry indexing in the sg frame cleanup code being off-by-1. This problem showed up when doing some basic iperf tests and manifested in traffic coming to a halt. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/freescale/dpaa/dpaa_eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index dfebc30c4841..d3f2408dc9e8 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -1648,7 +1648,7 @@ static struct sk_buff *dpaa_cleanup_tx_fd(const struct dpaa_priv *priv,
qm_sg_entry_get_len(&sgt[0]), dma_dir);
/* remaining pages were mapped with skb_frag_dma_map() */
- for (i = 1; i < nr_frags; i++) {
+ for (i = 1; i <= nr_frags; i++) {
WARN_ON(qm_sg_entry_is_ext(&sgt[i]));
dma_unmap_page(dev, qm_sg_addr(&sgt[i]),