enetc: update TSN Qbv PSPEED set according to adjust link speed
authorPo Liu <po.liu@nxp.com>
Fri, 15 Nov 2019 03:33:41 +0000 (03:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Nov 2019 20:49:16 +0000 (12:49 -0800)
commit2e47cb415f0a0ec6555d71598361e90f8c144fb2
tree4817e8077bf02a9c335deba24ef1daa764bddad7
parent34c6adf1977b611fca3b824ad12a2a415e1e420e
enetc: update TSN Qbv PSPEED set according to adjust link speed

ENETC has a register PSPEED to indicate the link speed of hardware.
It is need to update accordingly. PSPEED field needs to be updated
with the port speed for QBV scheduling purposes. Or else there is
chance for gate slot not free by frame taking the MAC if PSPEED and
phy speed not match. So update PSPEED when link adjust. This is
implement by the adjust_link.

Signed-off-by: Po Liu <Po.Liu@nxp.com>
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/enetc/enetc.h
drivers/net/ethernet/freescale/enetc/enetc_hw.h
drivers/net/ethernet/freescale/enetc/enetc_pf.c
drivers/net/ethernet/freescale/enetc/enetc_qos.c