Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp99900rdb; Wed, 29 Nov 2023 22:20:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IEDYF2bAYPMI5aVrgfE5otjq19DPZEm4AJW/6+7tCznJmDtVSltHq+xI+tqkTo6zAEtlwmm X-Received: by 2002:a05:6a00:1a8c:b0:6be:4e6e:2a85 with SMTP id e12-20020a056a001a8c00b006be4e6e2a85mr23498394pfv.30.1701325259557; Wed, 29 Nov 2023 22:20:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701325259; cv=none; d=google.com; s=arc-20160816; b=ifbz5lOf3ENP1TuX+/Ng0F40alvdQNto9Z50EdUPlXO51eZ7M78FQlcaL+weJRyAOH ls+DW1UZiOPrAmnymCRMs/EtMWUvPIROpfCj2E0dhNWfHPU92K0kjk6S0zx70FMU40X5 3IWgi1Md+J7H0OfHKtK+nlANoBKbbIfvivqdMjcqSE0Gph5G/XH8J1Q/9AS1PWqIAe5V ttfHlFEfklQ+thavR1QsbUbXjvVy+G/UhVvvAjsqXh7CJH9Xuoqz3gdGPrB7oFT0akT2 5UfnlnxRC+2IomDe/AV2Mo+0Y3eDYnIJKqUGaOxLzigBYPqgPtzUSg3oM62rRPkI5uwH RXEg== 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=7UUIFtQDzSDtAn0+xL/a4rToHREO/z6KIZ1fp0e9QBw=; fh=0TmBxb3iK+HPjRlYDVXDLy5dPQUGD9gLiQry0et3j2E=; b=EpFxYPHMldrl3h1eTnRMbZPZN3u2nr1wxW0yZ/79GzFec9FmdxtBP5fUDz1nSfwqFw GczHrtuWxVJuTXeyH1tT7kNaIDA4ln/aLTLvX5QUrO6cC6RGFTRTJI83rZFAQnleunEA 2IHSE6ItO4QBiPLo8EJEG2GaERb08WUCZUE/FHsI8UwVlXyiPEYX0hBS90MSZ3C98Woa rEt1jHTckgVqXrKGfl4/HmF4dPbvitWJRlpY7SQ52hyvxdJh7ssxt5Ir+QdPz04MaMUv JkufDFYRu7CLUH9Ptp9ivmwVWhDYxF4yUV+85+Pg282n9WUIe748eYpfrRyo760gCtex stXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=NTru99EY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id o186-20020a62cdc3000000b006cd9f3d387asi534032pfg.277.2023.11.29.22.20.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 22:20:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=NTru99EY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id A1ADA807783C; Tue, 28 Nov 2023 00:05:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344048AbjK1IFG (ORCPT + 99 others); Tue, 28 Nov 2023 03:05:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343983AbjK1IEp (ORCPT ); Tue, 28 Nov 2023 03:04:45 -0500 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D87BC1 for ; Tue, 28 Nov 2023 00:04:50 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40b399a6529so21770705e9.1 for ; Tue, 28 Nov 2023 00:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1701158689; x=1701763489; 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=7UUIFtQDzSDtAn0+xL/a4rToHREO/z6KIZ1fp0e9QBw=; b=NTru99EYPWeI2IZS/ZDXNx/2q9s804lRjP4j4Kgs3Bj9vAiCsUpHBQhvORI30Xg+F/ nlpuAp8hrQb3tncaeBk8Xf6FIBlipXk0hoFAywPHFlEVZvh600BeBxoO0/Pp2XWIvAHK r2hw0yBpBcf3dubMAOqG1p2h2wcR8RV5fnSvcBP/vGp2Hfuq55Yq8+I1D+a5rusT9qCJ XdF/ti3gINrjlH+OJoEw7sNR7NgFL2d5oPIMm2jxZMaR/zB98G0u2w3Vm2IAtZrzB//S IdvtiSnp1J9qJV2B6NOf0IhajygZT/dq4GdIV4k6+B1gJ/BxNg+k8JWQNPV1QTK2WzeT AHtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701158689; x=1701763489; 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=7UUIFtQDzSDtAn0+xL/a4rToHREO/z6KIZ1fp0e9QBw=; b=pSlf9VfZOvG+kEPRBwuhnZGywy0DZrA5VF4SPE0dJ6owyyW4BJrKRGX+6x9UiNd6Tc HXKBACQiTzilYN41h2XX1cfDiV7v3MVrEFBmeJu2kSoUrSrar9kEvVgG23v+G20N39lM FRlXLIOmMqa0N2+iQz28g6Eilitp+usitKAEU7fayoGluTD81IbkjVvvvNuUxR+X2mYv Sz6S6sddsUEG7MUF475X7oxHUhddKmV0lvWj60cPdIAyFLTsgRYHDpJOqH/Fu0DAGnMq 7Db/d2FJr5+fOc2YL3coMFwXJ1BuevT7UgqBQOiYcpHpqhVzjmN25vWT/rwfE6NcXsxX ZRaw== X-Gm-Message-State: AOJu0YzfkeIMB8aeVLrgfx123zfwdyOHZ2prBBeZ78zwd5tGwtRoM00s cV03DxqbzLz2rL7+YC3Xn2LYMJwU134JIXP/TSM= X-Received: by 2002:a05:600c:35c7:b0:40b:3322:2af6 with SMTP id r7-20020a05600c35c700b0040b33222af6mr12528814wmq.5.1701158689281; Tue, 28 Nov 2023 00:04:49 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.125]) by smtp.gmail.com with ESMTPSA id g18-20020a05600c4ed200b0040b4ccdcffbsm1127534wmq.2.2023.11.28.00.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 00: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, 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 Subject: [PATCH v2 5/6] net: ravb: Stop DMA in case of failures on ravb_open() Date: Tue, 28 Nov 2023 10:04:38 +0200 Message-Id: <20231128080439.852467-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231128080439.852467-1-claudiu.beznea.uj@bp.renesas.com> References: <20231128080439.852467-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 fry.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 (fry.vger.email [0.0.0.0]); Tue, 28 Nov 2023 00:05:31 -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") Reviewed-by: Sergey Shtylyov Signed-off-by: Claudiu Beznea --- Changes in v2: - none 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 2ef46c71f2bb..2396fab3f608 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