diff options
| author | Serge Semin <fancer.lancer@gmail.com> | 2021-08-07 13:03:57 +0300 |
|---|---|---|
| committer | Serge Semin <fancer.lancer@gmail.com> | 2026-08-13 20:38:42 +0300 |
| commit | 3b15e0cfa6741fbafe083707138efbcb55fca592 (patch) | |
| tree | d5684fc55b719e55e1395d7457d477e3d46442cc | |
| parent | 90b9a356d33393439f259f98443a85a19a09c3b5 (diff) | |
| download | linux-3b15e0cfa6741fbafe083707138efbcb55fca592.tar.gz linux-3b15e0cfa6741fbafe083707138efbcb55fca592.zip | |
net: stmmac: Parse "max-frame-size" DT-prop for any IP-core
Indeed there is nothing DW MAC v3.x-specific in that property, while MTU
can be platform-specific for any DW MAC IP-core. Move the "max-frame-size"
DT-property read operation to the root path of the
stmmac_probe_config_dt() method.
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index e912383156e7c..27a1561b22ae6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -508,6 +508,15 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac) if (of_property_read_u32(np, "snps,data-width", &plat->data_width)) plat->data_width = 16; + /* Note that the max-frame-size parameter as defined in the + * ePAPR v1.1 spec is defined as max-frame-size, it's + * actually used as the IEEE definition of MAC Client + * data, or MTU. The ePAPR specification is confusing as + * the definition is max-frame-size, but usage examples + * are clearly MTUs + */ + of_property_read_u32(np, "max-frame-size", &plat->maxmtu); + plat->force_sf_dma_mode = of_property_read_bool(np, "snps,force_sf_dma_mode"); @@ -527,14 +536,6 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac) of_device_is_compatible(np, "snps,dwmac-3.70a") || of_device_is_compatible(np, "snps,dwmac-3.72a") || of_device_is_compatible(np, "snps,dwmac")) { - /* Note that the max-frame-size parameter as defined in the - * ePAPR v1.1 spec is defined as max-frame-size, it's - * actually used as the IEEE definition of MAC Client - * data, or MTU. The ePAPR specification is confusing as - * the definition is max-frame-size, but usage examples - * are clearly MTUs - */ - of_property_read_u32(np, "max-frame-size", &plat->maxmtu); of_property_read_u32(np, "snps,multicast-filter-bins", &plat->multicast_filter_bins); of_property_read_u32(np, "snps,perfect-filter-entries", |
