summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIoana Radulescu <ruxandra.radulescu@freescale.com>2013-11-11 14:05:01 (GMT)
committerMadalin-Cristian Bucur <madalin.bucur@freescale.com>2014-01-06 15:03:11 (GMT)
commit4ce33519e320bd72efaf3fab0acc4007af10a60e (patch)
tree51e6b77905dcb023dd70437705c2cd2c2dc7123e
parent7c8e2189175aad3494e99f5cc70c53ae5e73edff (diff)
downloadlinux-fsl-qoriq-4ce33519e320bd72efaf3fab0acc4007af10a60e.tar.xz
fmd: Fix problem in dynamic resource allocation algorithm
The patch that removed the forwarding optimized DPAA Ethernet driver (and implicitly the Kconfig option CONFIG_FSL_DPAA_ETH_SG_SUPPORT and all associated code) deleted the wrong branch of an #ifdef in the fmd dynamic resource allocation algorithm. As a result, the allocated FIFO size was not computed correctly, causing resource depletion in case jumbo frames support is enabled. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@freescale.com> Change-Id: Id052d76ef397c8865865cb7b185dc147fa5b154c Reviewed-on: http://git.am.freescale.net:8181/6543 Reviewed-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/7675 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
-rw-r--r--drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_resources.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_resources.c b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_resources.c
index e9903e6..b27016f 100644
--- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_resources.c
+++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_resources.c
@@ -250,9 +250,7 @@ static uint32_t get_largest_buf_size(uint32_t max_rx_frame_size, uint32_t buf_si
uint32_t bp_size = bp_head + max_rx_frame_size
+ NET_IP_ALIGN; /* DPA_BP_SIZE */
- bp_size = CEIL_DIV(bp_size, 16); /* frame split in 16 frags */
-
- return max((uint32_t)16, CEIL_DIV(bp_size, buf_size));
+ return CEIL_DIV(bp_size, buf_size);
}
/* Calculate the fifosize based on MURAM allocation, number of ports, dpde