RE: [RFC net-next 1/5] net: stmmac: introduce IEEE 802.1Qbv configuration functionalities

From: Jose Abreu
Date: Thu Jun 27 2019 - 08:21:18 EST


From: Voon Weifeng <weifeng.voon@xxxxxxxxx>

> diff --git a/drivers/net/ethernet/stmicro/stmmac/dw_tsn_lib.c b/drivers/net/ethernet/stmicro/stmmac/dw_tsn_lib.c
> new file mode 100644
> index 000000000000..cba27c604cb1
> --- /dev/null
> +++ b/drivers/net/ethernet/stmicro/stmmac/dw_tsn_lib.c

XGMAC also supports TSN features so I think more abstraction is needed
on this because the XGMAC implementation is very similar (only reg
offsets and bitfields changes).

I would rather:
- Implement HW specific handling in dwmac4_core.c / dwmac4_dma.c and
add the callbacks in hwif table;
- Let TSN logic in this file but call it stmmac_tsn.c.

> @@ -3621,6 +3622,8 @@ static int stmmac_set_features(struct net_device *netdev,
> */
> stmmac_rx_ipc(priv, priv->hw);
>
> + netdev->features = features;

Isn't this a fix ?