diff options
| author | Wei Fang <wei.fang@nxp.com> | 2026-04-15 09:08:32 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-04-17 05:27:51 +0300 |
| commit | 759a32900b6f3db3d0f34a3b61123742723b50b4 (patch) | |
| tree | 8adfc87ad148666146851eea0a5d07c6982fd3b0 /include/linux/stackprotector.h | |
| parent | 5099807f335ce4f783f0578bef7278fffad30b07 (diff) | |
| download | linux-759a32900b6f3db3d0f34a3b61123742723b50b4.tar.xz | |
net: enetc: correct the command BD ring consumer index
The command BD ring cousumer index register has the consumer index as
the lower 10 bits, and the bit 31 is SBE, which indicates whether a
system bus error occurred during execution of the CBD command. So if a
system bus error occurs, reading the register will get the SBE bit set.
However, the current implementation directly uses the register value as
the consumer index without masking it. Therefore, if a system bus error
occurs, an incorrect consumer index will be obtained, causing errors in
the processing of the command BD ring. Thus, we need to mask out the
other bits to obtain the correct consumer index.
In addition, this patch adds a check for the SBE bit after the polling
loop and returns an error if the bit is set.
Fixes: 4701073c3deb ("net: enetc: add initial netc-lib driver to support NTMP")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260415060833.2303846-2-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions
