]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: fsl-dpaa2/eth: Fix access to FAS field
authorIoana Radulescu <ruxandra.radulescu@nxp.com>
Fri, 8 Dec 2017 12:47:53 +0000 (06:47 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 08:09:57 +0000 (09:09 +0100)
commit74b1383a2a32af40ad707c0aa06db6ce39789951
treef1b65483fe24884a472eb88861c1cb50ce45368c
parent83810e8aa67abf7451617103da0dee2cc8b9b200
staging: fsl-dpaa2/eth: Fix access to FAS field

[ Upstream commit 54ce891779888e85a2db04942dbaadd3f40fe223 ]

Commit 4b2d9fe87950 ("staging: fsl-dpaa2/eth: Extra headroom in RX
buffers") removes the software annotation (SWA) area from the RX
buffer layout, as it's not used by anyone, but fails to update the
macros for accessing hardware annotation (HWA) fields, which is
right after the SWA in the buffer headroom.

This may lead to some frame annotation status fields (e.g. indication
if L3/L4 checksum is valid) to be read incorrectly.

Turn the accessor macros into inline functions and add a bool param
to specify if SWA is present or not.

Fixes: 4b2d9fe87950 ("staging: fsl-dpaa2/eth: Extra headroom in RX buffers")
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h