Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: bcmgenet: Reset RBUF on first open
stable inclusion from stable-v5.10.217 commit 1fb7ab9a6e3eb4ea71a02b8b27fe2a95cc1213af category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAWLXC Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1fb7ab9a6e3eb4ea71a02b8b27fe2a95cc1213af -------------------------------- [ Upstream commit 0a6380cb4c6b5c1d6dad226ba3130f9090f0ccea ] If the RBUF logic is not reset when the kernel starts then there may be some data left over from any network boot loader. If the 64-byte packet headers are enabled then this can be fatal. Extend bcmgenet_dma_disable to do perform the reset, but not when called from bcmgenet_resume in order to preserve a wake packet. N.B. This different handling of resume is just based on a hunch - why else wouldn't one reset the RBUF as well as the TBUF? If this isn't the case then it's easy to change the patch to make the RBUF reset unconditional. See: raspberrypi/linux#3850 See: raspberrypi/firmware#1882 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Maarten Vanraes <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: sanglipeng1 <[email protected]>
- Loading branch information