From: Yoshihiro Shimoda Date: Wed, 1 Apr 2026 18:36:08 +0000 (+0200) Subject: net: ethernet: ravb: Suspend and resume the transmission flow X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=353d8e7989b6babe8fe4ae06272230c7941c3f73;p=thirdparty%2Fkernel%2Flinux.git 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: Yoshihiro Shimoda [Niklas: Rebase from BSP and reword commit message] Signed-off-by: Niklas Söderlund Link: https://patch.msgid.link/20260401183608.1852225-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 2c725824b3488..1dbfadb2a8814 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -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); }