Re: [PATCH] net: mvneta_bm: add suspend/resume to prevent crash after resume

From: Zhou, Yun

Date: Thu Jun 11 2026 - 03:24:40 EST




On 6/11/26 14:03, Andrew Lunn wrote:
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

On Thu, Jun 11, 2026 at 10:09:35AM +0800, Yun Zhou wrote:
The mvneta driver uses the hardware Buffer Manager (BM) for RX buffer
allocation. During suspend, mvneta disables its clock, causing BM to
lose all buffer address state. On resume, mvneta_bm_port_init() re-
attaches the BM pool to the NIC, but BM hardware returns stale/garbage
buffer addresses. When NAPI poll processes these buffers, DMA cache
sync hits an invalid virtual address causing a kernel panic:
Has this never worked, or has something changed recently which broke
it?

Andrew
It should have never worked before, because the mvneta_bm module
does not have PM related support.On the Marvel Armada XP
development board, if try to put the system to STR while there is
network packet transmission, and then wake it up, after a period
of time (a few minutes or an hour), the crash mentioned in the patch
will appear.

By the way, there is more than one issue on this platform that causes
STR to not work, like this:
https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git/commit/?h=gpio/for-current&id=b9ad50d7505ebd48282ec3630258dc820fc85c81
I guess that the vendor may not have verified STR.

BR,
Yun