mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 03:11:11 -04:00
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 <yoshihiro.shimoda.uh@renesas.com> [Niklas: Rebase from BSP and reword commit message] Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Link: https://patch.msgid.link/20260401183608.1852225-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
48a5e77b49
commit
353d8e7989
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user