From patchwork Wed Aug 16 15:29:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 13355424 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 EC041C001B0 for ; Wed, 16 Aug 2023 15:41:56 +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:References:In-Reply-To: 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: List-Owner; bh=DgKV3nhyv8vFgbHRVYBSl7d1XTRLhicJcL0/gutIQCk=; b=A+eAEZJg4BwZmn EBpo9SvaLQdACn9tZjcx79CCTizOBvDpcEar7HIwAbgSNXChFgidpFWGrIft4xGgXbIV7WqLETt2U bDCj+n8e4iwxGM3QS8nGHBufZ+15diCrNMNTHyh4voWRhTAieq/6IMylKVPNVBXW16HxTDLz8JL6v Fi6Ea4GzZFOrPbbPCVdCvdVrz7Qq9I3vaQk7o00U91Whj+smpaHF12YO79/AJ7KZex9FaCclqCuFD f3onj4BvuZB3tyO8EJYPBcVdin/8XY/gLTbqO/Iv3UcH8R+6t2KpToKUmstAMd0AwxD5XO9xAZZDy VcYEx1slVUx7zdSeb0JA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWIeH-004VkW-30; Wed, 16 Aug 2023 15:41:29 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWIe8-004Vi7-1e for linux-arm-kernel@lists.infradead.org; Wed, 16 Aug 2023 15:41:21 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0F37564768; Wed, 16 Aug 2023 15:41:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EDDAC433C8; Wed, 16 Aug 2023 15:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692200479; bh=nrZBBHIvwoY7+NGVTUVo+wQxGv/rQfcOhG+8CHuUfbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C9DDETRHcmDn3/sjpx52V0ObTTzXJ88g3duA+PD4y0N2+ENXQpaqYfP1KCUg6CsQF cd8lPDX80SN4yQo5cc/HQ7ZK+j4MTYNyGi66qcc2R/WLTn7oIgUGEMGOF3EB4ZFBNd hTYzpuggcWcvg6SUX8PL2M8sMTDpciHjTHKn1WtclbXgkaavZ2E3lF/6pJIZWD+Zfi WBpgcapVp6pEypxnImqKGbudMs8zBd2UuFuLmW5vSLBtK6x/VNjxzNhhOvJ8AsF7ha G9VE0inA/4S1/mB+/Df5yxPCtXI1iD9jPQ61ur3FKetxVOCRUaeXtS7kWWRncwj/MV NuImxW7m1C9RA== From: Jisheng Zhang To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next v4 2/9] net: stmmac: xgmac: add more feature parsing from hw cap Date: Wed, 16 Aug 2023 23:29:19 +0800 Message-Id: <20230816152926.4093-3-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230816152926.4093-1-jszhang@kernel.org> References: <20230816152926.4093-1-jszhang@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230816_084120_589595_34D53061 X-CRM114-Status: UNSURE ( 9.57 ) 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 XGMAC_HWFEAT_GMIISEL bit also indicates whether support 10/100Mbps or not. Signed-off-by: Jisheng Zhang Acked-by: Alexandre TORGUE --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c index 3aacf791efeb..1ef8fc132c2d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c @@ -410,6 +410,7 @@ static int dwxgmac2_get_hw_feature(void __iomem *ioaddr, dma_cap->vlhash = (hw_cap & XGMAC_HWFEAT_VLHASH) >> 4; dma_cap->half_duplex = (hw_cap & XGMAC_HWFEAT_HDSEL) >> 3; dma_cap->mbps_1000 = (hw_cap & XGMAC_HWFEAT_GMIISEL) >> 1; + dma_cap->mbps_10_100 = (hw_cap & XGMAC_HWFEAT_GMIISEL) >> 1; /* MAC HW feature 1 */ hw_cap = readl(ioaddr + XGMAC_HW_FEATURE1);