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)
commitefa6a7d07523ffbbf6503c1a7eeb52201c15c0e3
tree5472367e78b88e2b4245c5c713734fc98b68ae0a
parent207b584d0ab87e492412fcd69030e34873c7ed5e
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: 27c874867c4e ("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