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: <aR2aaDs6rqfu32B-@shell.armlinux.org.uk>
Date: Wed, 19 Nov 2025 10:22:32 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	linux-arm-kernel@...ts.infradead.org,
	linux-stm32@...md-mailman.stormreply.com,
	Maxime Coquelin <mcoquelin.stm32@...il.com>, netdev@...r.kernel.org,
	Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH net-next 0/6] net: stmmac: simplify axi_blen handling

stmmac's axi_blen (burst length) handling is very verbose and
unnecessary.

Firstly, the burst length register bitfield is the same across all
dwmac cores, so we can use common definitions for these bits which
platform glue can use.

We end up with platform glue:
- filling in the axi_blen[] array with the decimal burst lengths, e.g.
  dwmac-intel.c, etc
- decoding a bitmap into burst lengths for this array, e.g.
  dwmac-dwc-qos-eth.c

Other cases read the array from DT, placing it into the axi_blen
array, and converting later to the register bitfield.

This series removes all this complexity, ultimately ending up with
platform glue providing the register value containing the burst
length bitfield directly. Where necessary, platform glue calls
stmmac_axi_blen_to_mask() to convert a decimal array (e.g. from
DT) to the register value.

This also means that stmmac_axi_blen_to_mask() can issue a
diagnostic message at probe time if the burst length is incorrect.

 drivers/net/ethernet/stmicro/stmmac/common.h       | 13 ++++++++
 .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c    | 28 ++--------------
 drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c  |  5 ++-
 .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c    | 30 ++---------------
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c   | 30 ++---------------
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h   | 11 +------
 drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h    | 13 ++------
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h     | 11 ++-----
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 33 ++++---------------
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  | 38 ++++++++++++++++++++++
 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c   |  6 ++--
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |  4 ++-
 include/linux/stmmac.h                             |  2 +-
 13 files changed, 78 insertions(+), 146 deletions(-)

- 
-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ