From patchwork Mon Feb 19 16:46:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 13562909 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 D369BC48BC3 for ; Mon, 19 Feb 2024 16:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :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=mnKtXoJCTk5R2IFPxt2gPJzEd3sFOwxZuLGJ2tyN+eQ=; b=bO5IKvCZXq7yCz 5ThXPJ25Po5/FwANKquSONlcvcZ2l9lm73BYNuiDu2QWu0ZRlp0W9a/GcXVx3zNowljyAP236LmQV ak7hKVMTKwQBXp+eNtOp9cUIS7nBWkzSG47uFVo0fuGFaUhM43W490/A4p/ZLAIotRdGSWOiow4wa j6sLryy40XVs8QD2pvB1cy+QD4oJukYDQIjJOCCJ9nPHZ8AncLH8Uk22SQQdGM8GiroKiewTzxZmU yJY0QsPLES8P/+hDE7oWit4E17PJhaGTiMiVy+qpyWV63U37PSb504eblhiQs+5TUT+SOCoZbxPVP Luq4X4NUzA/InumO8ViA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rc6mc-0000000BPHp-3HcQ; Mon, 19 Feb 2024 16:46:22 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rc6mW-0000000BPEN-0rlI for linux-arm-kernel@lists.infradead.org; Mon, 19 Feb 2024 16:46:17 +0000 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-563c2b2bddbso6174430a12.1 for ; Mon, 19 Feb 2024 08:46:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708361174; x=1708965974; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RNjiIU+MnMIcoYvV35lNchbg525xkgaHmjWjHQnrgAI=; b=TetMuihMdeNRvZT/dwNw+RAi+Vaz1P4x2+ndmG+Y4UUqGzNm1nwi9NRneTzIm/0fgi jr9LESLhC9cv61S/OODFwh0PTNj7tQmFGPx7BHZzQx/cDtUPBA/gfxxcVaULmhpjpulH cLkx6a6r6/mH9i4eOYzXUImn2BBKmgX8vNwUJ9b6ve7QkgOWHfy0UDYhqI95muvqINid 18WIXybl0xAZh/duiST/HPcE41C86J17zCM5Qq4MUFUB7PuL5mUkNUVUHtiM49SGIlRP VmQE+SGoQuhGwDUsjKyRc0TPDRNJseSBPj0zx+fxZvQKininrTm92DEorlPnDbxRQ0R+ 5WLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708361174; x=1708965974; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RNjiIU+MnMIcoYvV35lNchbg525xkgaHmjWjHQnrgAI=; b=fZUh6cA+gQkglxFqcUIFn5Bdjw7RqR7KQTh0vFvKrDqkPOtZnXWi67MPqCTBKgKWs+ OqH3R+1Q+fT8rx5u2GffUOm9aU23NAbgMG9eEuTZdxKwfaqgjT+t8XihnoVEX2UAlRgy 8zDx2FIqZnLuRaTbE4J7Hp3JhCU3gPweHIQQKHW1fPWlOrsSHKE+vZBntpSpKL/ySjDd 1y9WHbHRY1X86kXz7OU33YfuvLD2UZvRDL9kmeEJEw42+EksZKShy2+z1CfUgFbid4lz 3gkYjhwfIV6GR0RbRYLZ2lotgpQ5/IyY67+Wj6VB6m6Jl8+L2aF/p4DR3Je3PQVgdEk1 A29w== X-Forwarded-Encrypted: i=1; AJvYcCWUB7+1iRVMiM654hFqYMZ1UZtSsuew/OtDjvRQ4YpmBMf27q9axJ7gCHhhY3oWPUUkMkB6DbRLolAWN6/0u+3obh6oKDU3ZOu8E+xZQHS9wm2NeMo= X-Gm-Message-State: AOJu0Yx/depFQMoA7NT1fisXvPIA+0J1fSmjPATLwayHW1VTjM4l0WJE tLaIdpAcF6P/xjnVH6VQXPni8we9UgUe8bggdWhip2S4HsZdMtW8 X-Google-Smtp-Source: AGHT+IFeILrgwOmdxu67ncHUZUE4nXhvuhlNOkspzkSZnFXnnQtvp7fWPgo27EPTD8QyCHtOOaECPw== X-Received: by 2002:a05:6402:2696:b0:564:15b:9f57 with SMTP id w22-20020a056402269600b00564015b9f57mr5925624edd.11.1708361173701; Mon, 19 Feb 2024 08:46:13 -0800 (PST) Received: from localhost (p200300e41f2d4600f22f74fffe1f3a53.dip0.t-ipconnect.de. [2003:e4:1f2d:4600:f22f:74ff:fe1f:3a53]) by smtp.gmail.com with ESMTPSA id fd11-20020a056402388b00b0056104738371sm2837765edb.65.2024.02.19.08.46.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 08:46:13 -0800 (PST) From: Thierry Reding Date: Mon, 19 Feb 2024 17:46:06 +0100 Subject: [PATCH net-next v3 3/3] net: stmmac: Configure AXI on Tegra234 MGBE MIME-Version: 1.0 Message-Id: <20240219-stmmac-axi-config-v3-3-fca7f046e6ee@nvidia.com> References: <20240219-stmmac-axi-config-v3-0-fca7f046e6ee@nvidia.com> In-Reply-To: <20240219-stmmac-axi-config-v3-0-fca7f046e6ee@nvidia.com> To: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Serge Semit , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, Thierry Reding X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1341; i=treding@nvidia.com; h=from:subject:message-id; bh=FahNwLbVWpd8t2eBaIzLF59MdYIoMLjB5FhApvU3UBw=; b=owEBbQKS/ZANAwAIAd0jrNd/PrOhAcsmYgBl04XQ/0uAEXnL2R0DFCkdbK7AgOwWu4oUXANiH 26R0FoU+QeJAjMEAAEIAB0WIQSI6sMIAUnM98CNyJ/dI6zXfz6zoQUCZdOF0AAKCRDdI6zXfz6z obeRD/0WpBZm0htLrSxWNAacexNdC3abLvhbs3ndyfACIDGwCU53kDkEqlMbz0gv3HT04VBGnie 9cn8oWrdmfouSWku3KZy0B13uPUOlZigCDOixje6BB+14wxnEDra8af9OGSLO+v0VjlG5rFs5Nk 0vMV2SH9hkJ0ArDHFp+9H3KSKRaBMIgkGn1ANcMDot8V44Lz03euWWGvbtcIyyxXo7vGSF8IObM tklx3v3obPjVPA1jyof873G2DD59ijCxSklfDDdBDvpev1lxeodCgDHV/kDZKDrCFrmiFIJTbJ0 TVG7qT/3/xoO1yC0ANtVm5Id8GxUD08oZggVpGmqC4yTWnGC05uzRdvugwgD1AX+zG4GNrx7YMD 5w0KO0faOnQxjv3H8zUDIKh1r4HlpDgSgTea8auvPSKMRhTJTbk9iNxO+jhumrSAQ4NctSnRFOV B89KrwJXZN/qxNYQCudhwmbGzzPg3w1Ii+CK/a6H1ZX3SEVjy0aaPFkiPkbMtHZNbOF6us+FDpD 6orf236g/m4kNRitVuG9Ss0pwjprbjcQL3NgzVnZP1TTVF4fFFIV6PvHAIMBPlxj/WdJZYPFzh+ gUgPfQeYNAH0UQrm3bWbEDlvjgskdXTPftihd8CBZUjkl3GvE0J2/678V9IpD/iQplM6l9LP6y0 kZKxN/nhE4NHGTg== X-Developer-Key: i=treding@nvidia.com; a=openpgp; fpr=88EAC3080149CCF7C08DC89FDD23ACD77F3EB3A1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240219_084616_320759_8B699CFA X-CRM114-Status: GOOD ( 13.16 ) 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 From: Thierry Reding Allow the device to use bursts and increase the maximum number of outstanding requests to improve performance. Measurements show an increase in throughput of around 5x on a 1 Gbps link. Signed-off-by: Thierry Reding --- drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c index bab57d1675df..b6bfa48f279d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c @@ -199,6 +199,12 @@ static void mgbe_uphy_lane_bringup_serdes_down(struct net_device *ndev, void *mg writel(value, mgbe->xpcs + XPCS_WRAP_UPHY_RX_CONTROL); } +static const struct stmmac_axi tegra234_mgbe_axi = { + .axi_wr_osr_lmt = 63, + .axi_rd_osr_lmt = 63, + .axi_blen = { 256, }, +}; + static int tegra_mgbe_probe(struct platform_device *pdev) { struct plat_stmmacenet_data *plat; @@ -284,6 +290,9 @@ static int tegra_mgbe_probe(struct platform_device *pdev) if (err < 0) goto disable_clks; + /* setup default AXI configuration */ + res.axi = &tegra234_mgbe_axi; + plat = devm_stmmac_probe_config_dt(pdev, &res); if (IS_ERR(plat)) { err = PTR_ERR(plat);