From: Ovidiu Panait Date: Wed, 3 Jun 2026 17:36:43 +0000 (+0000) Subject: net: stmmac: dwmac4: Report DCB feature capability X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a58a1b8d5052f5b5072fe2833ef048915192eaf;p=thirdparty%2Flinux.git net: stmmac: dwmac4: Report DCB feature capability Bit 16 of the MAC HW Feature1 register reports the DCB (Data Centre Bridging) feature. Read it so that dma_cap.dcben and the debugfs report it accurately. Right now it is always reported as being disabled. Signed-off-by: Ovidiu Panait Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/20260603173644.24371-1-ovidiu.panait.rb@renesas.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h index ffcd036d4c024..6382836828bac 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h @@ -198,6 +198,7 @@ enum power_event { #define GMAC_HW_FEAT_AVSEL BIT(20) #define GMAC_HW_TSOEN BIT(18) #define GMAC_HW_FEAT_SPHEN BIT(17) +#define GMAC_HW_FEAT_DCBEN BIT(16) #define GMAC_HW_ADDR64 GENMASK(15, 14) #define GMAC_HW_TXFIFOSIZE GENMASK(10, 6) #define GMAC_HW_RXFIFOSIZE GENMASK(4, 0) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c index 28728271fbc9e..829a23bdad01f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c @@ -391,6 +391,7 @@ static int dwmac4_get_hw_feature(void __iomem *ioaddr, dma_cap->av = (hw_cap & GMAC_HW_FEAT_AVSEL) >> 20; dma_cap->tsoen = (hw_cap & GMAC_HW_TSOEN) >> 18; dma_cap->sphen = (hw_cap & GMAC_HW_FEAT_SPHEN) >> 17; + dma_cap->dcben = (hw_cap & GMAC_HW_FEAT_DCBEN) >> 16; dma_cap->addr64 = (hw_cap & GMAC_HW_ADDR64) >> 14; switch (dma_cap->addr64) {