On Mon, Mar 01, 2021 at 01:18:18PM +0200, Vladimir Oltean wrote: > The simpler thing would be to put the write to the consumer index into > enetc_refill_rx_ring directly, but there are issues with the MDIO > locking: in the NAPI poll code we have the enetc_lock_mdio() taken from > top-level and we use the unlocked enetc_wr_reg_hot, whereas in > enetc_open, the enetc_lock_mdio() is not taken at the top level, but > instead by each individual enetc_wr_reg, so we are forced to put an > additional enetc_wr_reg in enetc_setup_rxbdr. Better organization of > the code is left as a refactoring exercise. > > Fixes: d4fd0404c1c9 ("enetc: Introduce basic PF and VF ENETC ethernet > drivers") > Signed-off-by: Vladimir Oltean <vladimir.olt...@nxp.com> > ---
Claudiu pointed out privately that this is exactly what was done prior to commit fd5736bf9f23 ("enetc: Workaround for MDIO register access issue"), and therefore, the driver used to work before that (I missed that during my assessment). So my Fixes: tag is actually incorrect. I will send a follow-up version where this is squashed with patch 7/8 and the Fixes: tag is adjusted.