Skip to contentSkip to conversation

net: stmmac: remove unused and unimplemented AXI properties

PATCH Applied Russell King (Oracle) 5 participants 8 messages Mar 24 – Mar 27

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

cover net: stmmac: remove unused and unimplemented AXI properties

commit afea03656add ("stmmac: rework DMA bus setting and introduce new platform AXI structure") added support for parsing all the stmmac AXI attributes, and added code to set most of the appropriate register bits with three exceptions:

snps,kbbe
snps,mb
snps,rb

These were parsed by the driver, but the result of parsing was never used by any of the cores.

Moreover, no DTS in the kernel makes use of these properties.

Thus, it doesn't make sense for the driver to parse these, so let's remove them. Also remove them from the DT binding document.

 Documentation/devicetree/bindings/net/snps,dwmac.yaml | 18 ------------------
 drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c |  1 -
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c |  3 ---
 include/linux/stmmac.h                                |  3 ---
 4 files changed, 25 deletions(-)
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
#1 lore raw

PATCH 1/2 net: stmmac: remove axi_kbbe, axi_mb and axi_rb members

axi_kbbe, axi_mb and axi_rb are all written, but nothing ever reads their values. Remove the code that sets these and the struct members.

---
 drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c | 1 -
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 ---
 include/linux/stmmac.h                                | 3 ---
 3 files changed, 7 deletions(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c +0 -1
index d245546b90db..02c786ce5dd4 100644
@@ -231,7 +231,6 @@ motorcomm_default_plat_data(struct pci_dev *pdev)
 
 	plat->axi->axi_wr_osr_lmt	= 1;
 	plat->axi->axi_rd_osr_lmt	= 1;
-	plat->axi->axi_mb		= true;
 	plat->axi->axi_blen_regval	= DMA_AXI_BLEN4 | DMA_AXI_BLEN8 |
 					  DMA_AXI_BLEN16 | DMA_AXI_BLEN32;
 
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +0 -3
index 545b8a3425eb..5cae2aa72906 100644
@@ -109,10 +109,7 @@ static struct stmmac_axi *stmmac_axi_setup(struct platform_device *pdev)
 
 	axi->axi_lpi_en = of_property_read_bool(np, "snps,lpi_en");
 	axi->axi_xit_frm = of_property_read_bool(np, "snps,xit_frm");
-	axi->axi_kbbe = of_property_read_bool(np, "snps,kbbe");
 	axi->axi_fb = of_property_read_bool(np, "snps,fb");
-	axi->axi_mb = of_property_read_bool(np, "snps,mb");
-	axi->axi_rb =  of_property_read_bool(np, "snps,rb");
 
 	if (of_property_read_u32(np, "snps,wr_osr_lmt", &axi->axi_wr_osr_lmt))
 		axi->axi_wr_osr_lmt = 1;
include/linux/stmmac.h +0 -3
index 5b2bece81448..eaaee329ef9d 100644
@@ -133,10 +133,7 @@ struct stmmac_axi {
 	u32 axi_blen_regval;
 	bool axi_lpi_en;
 	bool axi_xit_frm;
-	bool axi_kbbe;
 	bool axi_fb;
-	bool axi_mb;
-	bool axi_rb;
 };
 
 struct stmmac_rxq_cfg {
Signature · 1 line
2.47.3
#5 lore raw

PATCH 2/2 dt-bindings: remove unimplemented AXI snps,kbbe snps,mb and snps,rb

In reply to Russell King (Oracle)

Remove the AXI snps,kbbe snps,mb and snps,rb properties as they have not been used, and although the driver parses these, the code hasn't ever used the parsed result. This parsing has now been removed.

These were introduced by commit afea03656add ("stmmac: rework DMA bus setting and introduce new platform AXI structure").

---
 .../devicetree/bindings/net/snps,dwmac.yaml    | 18 ------------------
 1 file changed, 18 deletions(-)
Documentation/devicetree/bindings/net/snps,dwmac.yaml +0 -18
index 98ebb6276bc6..6d4afd824418 100644
@@ -203,11 +203,8 @@ title: Synopsys DesignWare MAC
         * snps,xit_frm, unlock on WoL
         * snps,wr_osr_lmt, max write outstanding req. limit
         * snps,rd_osr_lmt, max read outstanding req. limit
-        * snps,kbbe, do not cross 1KiB boundary.
         * snps,blen, this is a vector of supported burst length.
         * snps,fb, fixed-burst
-        * snps,mb, mixed-burst
-        * snps,rb, rebuild INCRx Burst
 
   snps,mtl-rx-config:
     $ref: /schemas/types.yaml#/definitions/phandle
@@ -587,11 +584,6 @@ title: Synopsys DesignWare MAC
         description:
           max read outstanding req. limit
 
-      snps,kbbe:
-        $ref: /schemas/types.yaml#/definitions/flag
-        description:
-          do not cross 1KiB boundary.
-
       snps,blen:
         $ref: /schemas/types.yaml#/definitions/uint32-array
         description:
@@ -604,16 +596,6 @@ title: Synopsys DesignWare MAC
         description:
           fixed-burst
 
-      snps,mb:
-        $ref: /schemas/types.yaml#/definitions/flag
-        description:
-          mixed-burst
-
-      snps,rb:
-        $ref: /schemas/types.yaml#/definitions/flag
-        description:
-          rebuild INCRx Burst
-
 required:
   - compatible
   - reg
Signature · 1 line
2.47.3
Acked-by on v1 2/2
#6 lore raw

Re: [PATCH net-next 2/2] dt-bindings: remove unimplemented AXI snps,kbbe snps,mb and snps,rb

Quoted 9 lines · Russell King (Oracle)

Remove the AXI snps,kbbe snps,mb and snps,rb properties as they have not been used, and although the driver parses these, the code hasn't ever used the parsed result. This parsing has now been removed.

These were introduced by commit afea03656add ("stmmac: rework DMA bus setting and introduce new platform AXI structure").

---

Cheers,
Conor.

reviewer
#2 lore raw

Re: [PATCH net-next 1/2] net: stmmac: remove axi_kbbe, axi_mb and axi_rb members

In reply to Russell King (Oracle)
Quoted 4 lines · Russell King (Oracle)

axi_kbbe, axi_mb and axi_rb are all written, but nothing ever reads their values. Remove the code that sets these and the struct members.

Hi Russell,

FYI, AI review suggests that these fields should also be removed from Documentation/networking/device_drivers/ethernet/stmicro/stmmac.rst

#3 lore raw

Re: [PATCH net-next 1/2] net: stmmac: remove axi_kbbe, axi_mb and axi_rb members

Quoted 10 lines · Simon Horman
Quoted 4 lines · Russell King (Oracle)

axi_kbbe, axi_mb and axi_rb are all written, but nothing ever reads their values. Remove the code that sets these and the struct members.

Hi Russell,

FYI, AI review suggests that these fields should also be removed from Documentation/networking/device_drivers/ethernet/stmicro/stmmac.rst

I noticed. I've prepared an update if netdev folk want that to happen as I've noticed that that documentation is fairly out of date now.

Do we think it's still useful, or should we consider deleting or trimming it down? Would it be better to move the struct definitions into the header file and making the header file part of the docs so that the documentation is local to the structs?

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
#4 lore raw

Re: [PATCH net-next 1/2] net: stmmac: remove axi_kbbe, axi_mb and axi_rb members

Quoted 7 lines · Russell King (Oracle)
Quoted 6 lines · Simon Horman
Quoted 4 lines · Russell King (Oracle)

axi_kbbe, axi_mb and axi_rb are all written, but nothing ever reads their values. Remove the code that sets these and the struct members.

Quoted 7 lines
Quoted 4 lines

Hi Russell,

FYI, AI review suggests that these fields should also be removed from Documentation/networking/device_drivers/ethernet/stmicro/stmmac.rst

I noticed. I've prepared an update if netdev folk want that to happen as I've noticed that that documentation is fairly out of date now.

There's another reason I haven't submitted an update, and that's because netdev is fairly backlogged at the moment - currently there's 381 patches in patchwork - four pages of patchwork, with the oldest "new" patch dated 21st March. I don't think netdev patchwork needs more patches at the moment!

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
#7 lore raw
In reply to Russell King (Oracle)
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Tue, 24 Mar 2026 10:05:23 +0000 you wrote:

commit afea03656add ("stmmac: rework DMA bus setting and introduce new platform AXI structure") added support for parsing all the stmmac AXI attributes, and added code to set most of the appropriate register bits with three exceptions:

snps,kbbe
snps,mb
snps,rb

[...]

Here is the summary with links:
- [net-next,1/2] net: stmmac: remove axi_kbbe, axi_mb and axi_rb members

    https://git.kernel.org/netdev/net-next/c/a800398e746f
  - [net-next,2/2] dt-bindings: remove unimplemented AXI snps,kbbe snps,mb and snps,rb
    https://git.kernel.org/netdev/net-next/c/af0331e1ac51

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html