lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230919164535.128125-2-ben.wolsieffer@hefring.com>
Date: Tue, 19 Sep 2023 12:45:34 -0400
From: Ben Wolsieffer <ben.wolsieffer@...ring.com>
To: linux-stm32@...md-mailman.stormreply.com,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
	Jose Abreu <joabreu@...opsys.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>,
	Christophe Roullier <christophe.roullier@...com>,
	Ben Wolsieffer <ben.wolsieffer@...ring.com>
Subject: [PATCH 0/2] net: stmmac: dwmac-stm32: fix resume on STM32 MCU

On STM32 MCUs, Ethernet fails to come up after resume and the following
errors appear in dmesg:

[   17.451148] stm32-dwmac 40028000.ethernet: Failed to reset the dma
[   17.451266] stm32-dwmac 40028000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed

This occurs because clk_rx is never re-enabled during resume. On the
STM32MP1, clk_rx is left running during suspend, and therefore doesn't
need to be enabled during resume, but this code was mistakenly applied
to the STM32 MCUs as well.

The first patch in this series applies a minimal fix for the bug, while
the second refactors the clock configuration to make it easier to spot
such bugs in the future.

I have tested that this series allows Ethernet to come back up correctly
after resuming from s2idle on an STM32F746. I don't have STM32MP1
hardware to test.

Ben Wolsieffer (2):
  net: stmmac: dwmac-stm32: fix resume on STM32 MCU
  net: stmmac: dwmac-stm32: refactor clock config

 .../net/ethernet/stmicro/stmmac/dwmac-stm32.c | 116 ++++++++----------
 1 file changed, 48 insertions(+), 68 deletions(-)

-- 
2.42.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ