Commit f5b2772d authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Jakub Kicinski
Browse files

net: ethernet: ravb: Do not check URAM suspension when WoL is active



When updating the driver to match latest datasheet to suspend access to
URAM when suspending DMA transfers a corner-case was missed, URAM access
will not be suspended if WoL is enabled. This lead to the error message
(correctly) being triggered as URAM access is not suspended even tho
it's requested as part of stopping DMA.

Avoid checking if URAM access is suspended and printing the error
message if WoL is enabled when we suspend the system, as we know it will
not be.

Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Closes: https://lore.kernel.org/all/CAMuHMdWnjV%3DHGE1o08zLhUfTgOSene5fYx1J5GG10mB%2BToq8qg@mail.gmail.com/


Fixes: 353d8e79 ("net: ethernet: ravb: Suspend and resume the transmission flow")
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarSai Krishna <saikrishnag@marvell.com>
Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 3d042592
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1108,9 +1108,12 @@ static int ravb_stop_dma(struct net_device *ndev)

	/* Request for transmission suspension */
	ravb_modify(ndev, CCC, CCC_DTSR, CCC_DTSR);
	/* Access to URAM will not be suspended if WoL is enabled. */
	if (!priv->wol_enabled) {
		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);