Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3819411rdh; Tue, 28 Nov 2023 05:00:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWUbNQSSzPCoqJUzre5ScSSOllYMrtpTOXq6qRyNPcU9cGg4B2gXmonBEYspwDaVrNMbwh X-Received: by 2002:a05:6a20:144a:b0:18c:548d:3d1a with SMTP id a10-20020a056a20144a00b0018c548d3d1amr10854129pzi.58.1701176415898; Tue, 28 Nov 2023 05:00:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701176415; cv=none; d=google.com; s=arc-20160816; b=N11AHdt73Ra5CIEtEBI5XY4K2wLoxLSsnDfPkJi+Qo/F5jTM9KDAVL7FqQMdEBSCDA qHBHhhwD3GHjAX/MXEwVsreefQxLl+SejLEdMtITe0N5cJIbxYpwPoeqbwcPohxZVvIU VWDGEUl84Ht2nk3b8r5T+hB+22yUYh7GL+XMNbn7uVbeY0JGb1Fb+tWtjiNrJ3urOZYY /OCNYN0K3MWRJeHiDLXRusQg1qJju1rVpNYBreaNdq7FvpL4HGY0pEFPWnliy+uT6HZS hbB9z2TLggQethsnXrwIK2iTJRbMdgz1tD5syuXWTU2ONdH3mrn96c2Rf3u8W1Yul5FI Iqtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mlwN1qAsHWca5scAvNLuwE5lxsRTiu67SGgg4R0r8Q0=; fh=+jwocpIEcpU4tee9Medy6FcgWbHkCjESAH5riVYuYu0=; b=UERjnH1F9aCZXSF96PYgIQB920fFOTZCHDsmbrNqscsQTN+YBFCkxLhjDp8hHFS1rv hwzAzC0ViW9Q6G6ZBXDfWfx8KE8cvzezyZsj7VivxEQjrmoYTQgAyj9ehIgR8ohp7rLY 5YNti/xvt3/eBJccCgLzmrMcm2jxrXRpRJzusv3EiFaW21YpYV58zbliZehKAqdI50H5 ZFDU+oJ2rxUWaZxIYI+WFN/Q+6mTnB+7nMntJUL5UGMi1A43gN1O4/3eFAtpZrcQ7C7+ ZqLw10sM8BfeeAHO0cXiOs8lInJg0KkI5+c3dst5e9ZBXXYn1ioKGatCaj4cbS05xasR 48tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=mK2+XRTf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id h5-20020a056a00218500b006cda14566f1si1927932pfi.150.2023.11.28.05.00.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 05:00:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=mK2+XRTf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 8B1CE807BEC1; Mon, 27 Nov 2023 01:05:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232775AbjK0JE7 (ORCPT + 99 others); Mon, 27 Nov 2023 04:04:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232716AbjK0JEr (ORCPT ); Mon, 27 Nov 2023 04:04:47 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0794D1BE for ; Mon, 27 Nov 2023 01:04:50 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5482df11e73so5234813a12.0 for ; Mon, 27 Nov 2023 01:04:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1701075888; x=1701680688; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mlwN1qAsHWca5scAvNLuwE5lxsRTiu67SGgg4R0r8Q0=; b=mK2+XRTfjLkVysJyfdFGzgvus2pb0IBOCv6sWeT19Po0xmWmXeF1fnURbwfgrXTZoh mXUzckH4CPLdA0SPT3d33BmXpCTqPx9tEeE4V3hKbwncMAmSCzd5N7dackSvibWFhtBU 777w/QINmqmeNPb0gMNzogDgRQjo3sxsyO0t8jic6+uJquqkoiy+eYw5MkEC/V3NO0fE S1PFx7PVKkA9FRhyof+DNq38cie0OWM1J7Iej1lxVWIBephtRBsUJebF+99rBkzDtCMh X8O/Nlib/4jFfj18+lHStyX2BDPEF14M6Zqaxh1LvA/8Icm2yUR0d+EFLahRGIidh9EF B/Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701075888; x=1701680688; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mlwN1qAsHWca5scAvNLuwE5lxsRTiu67SGgg4R0r8Q0=; b=TDBMNYckULDttP8g6Um0e8EnWS41DyF7X0h/TjCWO6n6KdeMu8FpulkKHv1AGQBoyx YVzJEaHjS8PqeCTBeAOZaYIKblM5WQS3qR/1kRy5ixCiJa8ZllpdRGVwSRD2PkwKQTbO bul+slCm1RWZ3ax4bqi9hqSviyY5i4c/gSDTqqPC9c80fg0tKCFSWR6qK+/CXap5DXxO OOvQV3stVh6x2rTnorne4k+Wx6zfy5bvJLb5v717kd0EXG06nzCx5vjDKSqQBzdBroKH dcR/kG2hfM6COheWZLZgmgW+4urX6WO3lvRn7clxbBc5TkqVmEIyWMcSDLrrnt2au26m K8ag== X-Gm-Message-State: AOJu0YyM1fd0/DK96RD+8ONYyGVXILj0tDmlycftPoDdzowPJL2nIPcw Tdp5QiB0FCPgJc6Ow4o1gotuaQ== X-Received: by 2002:a17:906:5817:b0:a00:aa23:34d0 with SMTP id m23-20020a170906581700b00a00aa2334d0mr7398772ejq.68.1701075888425; Mon, 27 Nov 2023 01:04:48 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.125]) by smtp.gmail.com with ESMTPSA id ay14-20020a170906d28e00b009fad1dfe472sm5456539ejb.153.2023.11.27.01.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 01:04:48 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: s.shtylyov@omp.ru, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, p.zabel@pengutronix.de, yoshihiro.shimoda.uh@renesas.com, geert+renesas@glider.be, wsa+renesas@sang-engineering.com, robh@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, mitsuhiro.kimura.kc@renesas.com, masaru.nagai.vx@renesas.com Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Claudiu Beznea Subject: [PATCH 5/6] net: ravb: Stop DMA in case of failures on ravb_open() Date: Mon, 27 Nov 2023 11:04:25 +0200 Message-Id: <20231127090426.3761729-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231127090426.3761729-1-claudiu.beznea.uj@bp.renesas.com> References: <20231127090426.3761729-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 27 Nov 2023 01:05:22 -0800 (PST) From: Claudiu Beznea In case ravb_phy_start() returns with error the settings applied in ravb_dmac_init() are not reverted (e.g. config mode). For this call ravb_stop_dma() on failure path of ravb_open(). Fixes: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver") Signed-off-by: Claudiu Beznea Reviewed-by: Sergey Shtylyov --- Changes since [1]: - s/ravb_dma_init/ravb_dmac_init in commit description - collected Rb tag [1] https://lore.kernel.org/all/20231120084606.4083194-1-claudiu.beznea.uj@bp.renesas.com/ drivers/net/ethernet/renesas/ravb_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index f7e62e6c9df9..805720166ef3 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -1825,6 +1825,7 @@ static int ravb_open(struct net_device *ndev) /* Stop PTP Clock driver */ if (info->gptp) ravb_ptp_stop(ndev); + ravb_stop_dma(ndev); out_free_irq_mgmta: if (!info->multi_irqs) goto out_free_irq; -- 2.39.2