RE: [PATCH net-next v1 1/5] net: lan743x: reset DMA channels that fail to stop
From: Chris Babroski
Date: Tue Oct 27 2026 - 11:27:59 EST
Hi Woojung and Nicolai,
> Recommended way of setting TX_SWR_x is after stopping and flushing FCT
> to avoid in-flight frames during TX DMA reset.
>
> lan743x_dmac_tx_reset() is already called lan743x_tx_open() with
> proper sequence of initializing FCT at lan743x_netdev_open().
>
> lan743x_reset_work() in the patch 4/5 is doing lan743x_netdev_close(),
> ... and lan743x_netdev_open(), I think no additional
> lan743x_dmac_tx_reset() may be needed at failure of
> lan743x_dmac_tx_wait_till_stopped() in lan743x_tx_close().
>
> Hi Chris,
> Did you see calling lan743x_dmac_tx_reset() at lan743x_tx_close() is a
> necessary step in addition to lan743x_dmac_tx_reset() at
> lan743x_tx_open() when lockup happened?
Thanks for clarifying the reset flow. I did not see that it is
unnecessary, but is it an issue to leave the DMAC in a started state on
close if the descriptor ring was freed even though the FIFO is disabled
after?
I can remove the call to lan743x_dmac_tx_reset() in lan743x_tx_close().
It sounds like changing the order of lan743x_tx_close() to disable FIFO
beforehand could also work, but that feels out of scope for this patch
series.
I also noticed in lan743x_rx_close() the FIFO is already disabled before
checking DMAC channel state. This means we can leave the call to
lan743x_dmac_rx_reset() inside lan743x_rx_close() or I can remove it as
well if you prefer.
Thanks,
Chris