Commit 353d8e79 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Jakub Kicinski
Browse files

net: ethernet: ravb: Suspend and resume the transmission flow



The current driver does not follow the latest datasheet and does not
suspend the flow when stopping DMA and resume it when starting. Update
the driver to do so.

Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
[Niklas: Rebase from BSP and reword commit message]
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://patch.msgid.link/20260401183608.1852225-1-niklas.soderlund+renesas@ragnatech.se


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 48a5e77b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -694,6 +694,9 @@ static int ravb_dmac_init(struct net_device *ndev)
	const struct ravb_hw_info *info = priv->info;
	int error;

	/* Clear transmission suspension */
	ravb_modify(ndev, CCC, CCC_DTSR, 0);

	/* Set CONFIG mode */
	error = ravb_set_opmode(ndev, CCC_OPC_CONFIG);
	if (error)
@@ -1103,6 +1106,12 @@ static int ravb_stop_dma(struct net_device *ndev)
	if (error)
		return error;

	/* Request for transmission suspension */
	ravb_modify(ndev, CCC, CCC_DTSR, CCC_DTSR);
	error = ravb_wait(ndev, CSR, CSR_DTS, CSR_DTS);
	if (error)
		netdev_err(ndev, "failed to stop AXI BUS\n");

	/* Stop AVB-DMAC process */
	return ravb_set_opmode(ndev, CCC_OPC_CONFIG);
}