From patchwork Mon Sep 2 14:54:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Machon X-Patchwork-Id: 13787412 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DDFF9CA0ED3 for ; Mon, 2 Sep 2024 15:06:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DxNBQ6vB+9sukU91JBrV/aQukNnFGdJ/SV6UNS5hCpQ=; b=Ql0SPe06A//GD+03zvv8H3qCSS B3SFE07AfG2z0Gn6E5E/DMXZb3JZ4+XoPGxp31tvd342Jnf6o4gY6xa600I4YrEh0WNHCAyRX7ivL zkujCbMLNiqTyCUzLSQQCRIDObF7qlEKJrX7ayJzWSaxKwt9XXAqPmxBqQkhqoBKu0seid+6sJjxd 2g+OvrCPeeYDktPXZexfAztk/wfgYIxxvGkr+rwgXcdoIF4g3Zer40riXZ2AblJy/j/x0mvR3J/sN o71DtRtQNFqCiSxgG6DQ478Jx/JO5TrdkYQ8WWxJxLxz11yQ3XRXfy+jmeqqJiiqx2hZi1Bb8n5O8 DgBI1E4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sl8cx-0000000Emrh-0Ykl; Mon, 02 Sep 2024 15:05:59 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sl8Sq-0000000EkJT-1SiU for linux-arm-kernel@lists.infradead.org; Mon, 02 Sep 2024 14:55:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1725288932; x=1756824932; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=VYuqsn82TNwXeOl9I4ZpMCH1VasU3oB3NNclgLdbMJo=; b=P4FtW9Htm54NrIKwk0Wpe8uE5vu7E6ybYBxLTc5I01vsqC7rR/2IQlDc LxyFMq64dMUDbT73p59b2+JNdZI+QipUFINbhheTnN8GQ3Bfq2PHgVBSM x6YtalCy9E//4c0LpVcQBlUXMkKRbbTXiEtkKaOW4iOdwvU5Ujj+sPsbM EDpFkqdMWMfZY9G+bxa1rEfX+4rZXzTtJHYoH6QTzdiyJa+qOUZoWtjDt vKG7/W0RNxhpqd5HT+MC8cEm265M2zFSqr2I5wbc+lT/Ul9VrC02+UwGH RgX4sHR13a7RGx0qOIGHUv/uN+akzIblIbY9I6+M0EY+qrJcjw8dxf3x4 g==; X-CSE-ConnectionGUID: 6WD2x+lUSXKxeZe2mffqQA== X-CSE-MsgGUID: LG5Q+ssUT9Cg0tqABrHfGA== X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="31128331" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 02 Sep 2024 07:55:31 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 2 Sep 2024 07:55:03 -0700 Received: from [10.205.21.108] (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Mon, 2 Sep 2024 07:55:00 -0700 From: Daniel Machon Date: Mon, 2 Sep 2024 16:54:15 +0200 Subject: [PATCH net-next 10/12] net: sparx5: use library helper for freeing tx buffers MIME-Version: 1.0 Message-ID: <20240902-fdma-sparx5-v1-10-1e7d5e5a9f34@microchip.com> References: <20240902-fdma-sparx5-v1-0-1e7d5e5a9f34@microchip.com> In-Reply-To: <20240902-fdma-sparx5-v1-0-1e7d5e5a9f34@microchip.com> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lars Povlsen , "Steen Hegelund" , Horatiu Vultur , , , CC: , , , =?utf-8?q?Jens_Emil_Schulz_=C3=98st?= =?utf-8?q?ergaard?= X-Mailer: b4 0.14-dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240902_075532_535381_31BF1B13 X-CRM114-Status: UNSURE ( 8.48 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The library has the helper fdma_free_phys() for freeing physical FDMA memory. Use it in the exit path. Signed-off-by: Daniel Machon Reviewed-by: Steen Hegelund Reviewed-by: Jens Emil Schulz Østergaard Reviewed-by: Horatiu Vultur --- drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c b/drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c index 4fc52140752a..38735bac6482 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c @@ -494,5 +494,6 @@ int sparx5_fdma_stop(struct sparx5 *sparx5) FDMA_PORT_CTRL_XTR_BUF_IS_EMPTY_GET(val) == 0, 500, 10000, 0, sparx5); fdma_free_phys(&sparx5->rx.fdma); + fdma_free_phys(&sparx5->tx.fdma); return 0; }