From patchwork Fri Apr 12 18:03:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 13628224 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 27AFCC04FF8 for ; Fri, 12 Apr 2024 18:04:24 +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:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=EZUlY0erKoQKtAT2c1AbIQ5ELXXZJ66o9WkpuD0l5og=; b=e/7CjH+D1/6rYL vJ88K80I0fkfQpsHaN8ZjvtVkgMkrNew80ZN9U3zCJUITKEb+c29Wj2wjXN/oKx3Wm9RIq1+F+Voz bC0yYQ0HuLB4uRTDYzNsk9B2vJ3btfxdrgo7wjrCI76s8V9fgHTKmLLSlWExt/13izBdhTzLwbF3Z XthCNvebbIw7Xt+SgrqV8uYPUJhyjhsJdAwHr7F8pnGMqUI7GctcigGdTQnBj0bQVfuYQldJedZ3B 1vknlAKHhlnbYF1cPA87rrw63pN2ghDmhP2WTuM/ywt8mTqCdoVGABr729saa2LwooLqO9+HbcK59 FiCLoxtBR9XOKZcqvdTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvLFx-00000000m3z-28Hp; Fri, 12 Apr 2024 18:04:09 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvLFu-00000000m1w-0FcU for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2024 18:04:07 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-516d264d0e4so2235788e87.0 for ; Fri, 12 Apr 2024 11:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712945042; x=1713549842; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CocCrXTkILxb+H292FlYFL20d7nBS8XixYwTUqYokkU=; b=SiyLNlJGw+M6bDPqE1SHjdXA/GAH2EifrBAuPqdc69ILLtbJwhDf23AeblsI+iEdvx 1WRGoboRc04nx4jxwVPX5dV+hr3z3y3fD7X5FD1LJTI9IWG9hQXccuLJmuN1YQjstdiA JGbXjnrowgeLHjrVfOWalJ85vWLUx2InajN8XMXj9fY1eyLTx85+luV4RPQUSqHzzrD1 OaChKKlI5vfLss7mRgqIc4au4gsBLtqxYLjoonRnNQ6g+bN/r3KXcwvpAFanuImhq+Sn q3jxBTjHmQoZl07CnWtJmX5C+YLi3LlqNs43KrrY+TTvXJhNqxweD8FmLgkk7YSpbsMS wz7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712945042; x=1713549842; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CocCrXTkILxb+H292FlYFL20d7nBS8XixYwTUqYokkU=; b=NQVC1COznVB9gyg+BlWivgXsS/u2/PQqZpJoKQlG5q10cTFdTi/7uQEgdoCLr8zmM5 OV3MaoomFw4ISxIStp38+9JXscA6jNPi1RUJ9dZxt2VHNKM0MCCBK9hIq4aI4Qk6zH2B ZsxuS9U/PuGrYqAqHRlFy0Ih5JwACcO8PonuqY+DIHvd+zCIYLXBRWbQtoEt3Lxu49sz rVo6Eb91brkhOiSy4CN8xiSMyUNJZrBZrvxLmBsKl2FidKsqbxqzvbtV7/4OEkj7No3U 76dSorwxq6r2r3kwkLZU1nZwZsJNuEfqIlUo4ENkxiVHGlQACwe0BGWI2Ixd2t8QwVIr uk5Q== X-Forwarded-Encrypted: i=1; AJvYcCXDxzUOvC2GBdKRwMzkQM6ae2NUEqmR9tqAqlqxB6Tls9eMcexPwSO6QpoTfbTGbrBSvIW86CP5gYtFTuCI9VqlRZdS+yUwKrwpeMd7HIKZV9wTlkM= X-Gm-Message-State: AOJu0YwYstTcUOKDUmazIeO952esJwY3W7l2r+AgTsIoC2TW1Pi51/+F J+1nVNyvJiQsJmOMQHEV6Q33HqNeO/8G9dbEN2Xn5bZyrU+/JqT2wfOCTw== X-Google-Smtp-Source: AGHT+IE+YdnghDsV0obcJRUikyE+vRG7Z625VF2VfIjNL7bgReRC31FSjtwU16I1XuF0ATXWLD1vaw== X-Received: by 2002:ac2:52a9:0:b0:515:c0cb:3ca2 with SMTP id r9-20020ac252a9000000b00515c0cb3ca2mr1979670lfm.16.1712945041542; Fri, 12 Apr 2024 11:04:01 -0700 (PDT) Received: from localhost ([95.79.241.172]) by smtp.gmail.com with ESMTPSA id s23-20020a197717000000b00516a25e9ce1sm576691lfc.294.2024.04.12.11.04.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 11:04:01 -0700 (PDT) From: Serge Semin To: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , Yanteng Si Cc: Serge Semin , Maxime Coquelin , Simon Horman , Huacai Chen , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH net 0/4] net: stmmac: Fix MAC-capabilities procedure Date: Fri, 12 Apr 2024 21:03:13 +0300 Message-ID: <20240412180340.7965-1-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240412_110406_138836_8C7B95C3 X-CRM114-Status: GOOD ( 11.96 ) 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 series got born as a result of the discussions around the recent Yanteng' series adding the Loongson LS7A1000, LS2K1000, LS7A2000, LS2K2000 MACs support: Link: https://lore.kernel.org/netdev/fu3f6uoakylnb6eijllakeu5i4okcyqq7sfafhp5efaocbsrwe@w74xe7gb6x7p In particular the Yanteng' patchset needed to implement the Loongson MAC-specific constraints applied to the link speed and link duplex mode. As a result of the discussion with Russel the next preliminary patch was born: Link: https://lore.kernel.org/netdev/df31e8bcf74b3b4ddb7ddf5a1c371390f16a2ad5.1712917541.git.siyanteng@loongson.cn The patch above was a temporal solution utilized by Yanteng for further developments and to move on with the on-going review. This patchset is a refactored version of that single patch with formatting required for the fixes patches. In particular the series starts with fixing the half-duplex-less constraint currently applied for all IP-cores. In fact it's specific for the DW QoS Eth only (DW GMAC v4.x/v5.x). The next patch fixes the MAC-capabilities setting up during the active Tx/Rx queues re-initialization procedure. Particularly the procedure missed the max-speed limit thus possibly activating speeds prohibited on the respective platforms. Third patch fixes the incorrect MAC-capabilities initialization for DW MAC100, DW XGMAC and DW XLGMAC devices by moving the correct initialization to the IP-core specific setup() methods. Final patch is just a cleanup moving the MAC-capabilities init/re-init to the phylink MAC-capabilities getter. That's it for now. Thanks for review and testing in advance. Signed-off-by: Serge Semin Cc: Maxime Coquelin Cc: Simon Horman Cc: Huacai Chen Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: Samuel Holland Cc: netdev@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-sunxi@lists.linux.dev Cc: linux-kernel@vger.kernel.org Serge Semin (4): net: stmmac: Apply half-duplex-less constraint for DW QoS Eth only net: stmmac: Fix max-speed being ignored on queue re-init net: stmmac: Fix IP-cores specific MAC capabilities net: stmmac: Move MAC caps init to phylink MAC caps getter drivers/net/ethernet/stmicro/stmmac/common.h | 1 + .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 + .../ethernet/stmicro/stmmac/dwmac1000_core.c | 2 + .../ethernet/stmicro/stmmac/dwmac100_core.c | 2 + .../net/ethernet/stmicro/stmmac/dwmac4_core.c | 7 ++- .../ethernet/stmicro/stmmac/dwxgmac2_core.c | 18 ++++---- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 43 ++++++++----------- 7 files changed, 38 insertions(+), 37 deletions(-)