]> 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)
commitb763e02d147db285544987cd46b22cd76952ea66
tree5472367e78b88e2b4245c5c713734fc98b68ae0a
parente75dd90c67691c56a7336b731f989ff4f67366dc
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: e106a04f1ffa ("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