net: enetc: implement ring reconfiguration procedure for PTP RX timestamping
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 17 Jan 2023 23:02:31 +0000 (01:02 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Jan 2023 04:52:25 +0000 (20:52 -0800)
commit5093406c784f83f7fc6cc1f1bd49c2b062275954
treee791f950c0caa0ed2e73e473089acc11a73e4fa0
parent598ca0d0905608755c86b10c3836499b051571d9
net: enetc: implement ring reconfiguration procedure for PTP RX timestamping

The crude enetc_stop() -> enetc_open() mechanism suffers from 2
problems:

1. improper error checking
2. it involves phylink_stop() -> phylink_start() which loses the link

Right now, the driver is prepared to offer a better alternative: a ring
reconfiguration procedure which takes the RX BD size (normal or
extended) as argument. It allocates new resources (failing if that
fails), stops the traffic, and assigns the new resources to the rings.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc.c