[PATCH net-next 2/3] net: stmmac: xgmac: Correct supported speed modes
Russell King (Oracle)
linux at armlinux.org.uk
Wed Jul 16 23:45:09 PDT 2025
On Mon, Jul 14, 2025 at 03:59:18PM +0800, Rohan G Thomas via B4 Relay wrote:
> @@ -1532,8 +1542,8 @@ int dwxgmac2_setup(struct stmmac_priv *priv)
> mac->mcast_bits_log2 = ilog2(mac->multicast_filter_bins);
>
> mac->link.caps = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
> - MAC_1000FD | MAC_2500FD | MAC_5000FD |
> - MAC_10000FD;
> + MAC_10FD | MAC_100FD | MAC_1000FD |
> + MAC_2500FD | MAC_5000FD | MAC_10000FD;
...
> @@ -405,6 +405,7 @@ static int dwxgmac2_get_hw_feature(void __iomem *ioaddr,
> dma_cap->sma_mdio = (hw_cap & XGMAC_HWFEAT_SMASEL) >> 5;
> dma_cap->vlhash = (hw_cap & XGMAC_HWFEAT_VLHASH) >> 4;
> dma_cap->half_duplex = (hw_cap & XGMAC_HWFEAT_HDSEL) >> 3;
> + dma_cap->mbps_10_100 = (hw_cap & XGMAC_HWFEAT_GMIISEL) >> 1;
What if dma_cap->mbps_10_100 is false? Should MAC_10FD | MAC_100FD
still be set? What if dma_cap->half_duplex is set but
dma_cap->mbps_10_100 is not? Should we avoid setting 10HD and 100HD?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
More information about the linux-arm-kernel
mailing list