]> git.baikalelectronics.ru Git - kernel.git/commit
dpaa2-eth: properly handle buffer size restrictions
authorIoana Ciornei <ioana.ciornei@nxp.com>
Fri, 15 May 2020 12:30:22 +0000 (15:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 May 2020 17:30:47 +0000 (10:30 -0700)
commit0cbdcd9a469746400df5da127677989dd6d20f80
tree5472367e78b88e2b4245c5c713734fc98b68ae0a
parent2360a478fe735d27e0c9522dd250479818f3acd5
dpaa2-eth: properly handle buffer size restrictions

Depending on the WRIOP version, the buffer size on the RX path must by a
multiple of 64 or 256. Handle this restriction properly by aligning down
the buffer size to the necessary value. Also, use the new buffer size
dynamically computed instead of the compile time one.

Fixes: 854a13adb7e3 ("dpaa2-eth: Use a single page per Rx buffer")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h