Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp2489121rdb; Fri, 18 Aug 2023 01:48:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEXUrVs654wX6AJNpcI5NC/otYDfxrBZM/yeU480e6sZRF1qibxirx3bcL7dQq31GeIGXDP X-Received: by 2002:aa7:c507:0:b0:521:e502:baf8 with SMTP id o7-20020aa7c507000000b00521e502baf8mr1708304edq.11.1692348514838; Fri, 18 Aug 2023 01:48:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692348514; cv=none; d=google.com; s=arc-20160816; b=0YLzNATYwLmTCnOQymuqwV8JxpOj3s82xpD01bgpZS8SC3Euu+hyhi3Kau/zC9CE9d YWlfggrtQi6QF/G10016rR22Pww5WSufqUvpwcMGZj5gkL2fCfzhVaLFgF1JWj7Eo9GJ tmyalHpssHc8suFINO1SAg0T3HukPntLMPsmSMBvXuZuWmpvXNJ9NfCFDORZfT8x7KML l7qf8dVMP55zNZBqsZdhpK7RHs9qVdV1ZxTbJ5NbUvM66X1bcSyqBpoQerhq/NUzd/j9 UcZAZhvXl/U10bMrLWthYwbnEd0y5BhC+lGWreY6Cm8fSMg5rIg6yXyKK1GCNv83CQAm sHEA== 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=++C5mPrnhtPQvW5Odc2sq6pdBeyMF55AXs3gpYqRfKw=; fh=UEVvRAFK6gmZxZNnJDUC7AmNk/iU78fiWA23OmiDi44=; b=Xep941IIonYbJpyYjWsmDclJ6+ZNzx2brf00r5iXEuhmXaLks+A/wBmsuX/BKEoMeB BIrorNbg2ex8stm3WRi1Pif+jbqt4C++FVuuCeWA1TBiBv6C4ur6mjSlouvlWjqnzWNN iqrolLgyY7vb7uCIERmrYu0HYDlNRp7izN6JqP14t9kgSk4RPVM7WIdeiJ3ASApTnY9N 4wynBpKNbmTyQzHc9gwwlNzOMR/IiLW0Rs/tYwd/PQcMauk6NJ4na+i0y2pHaSIrS5dJ sRqiPp0IPG6d7+MDAQep9+EzfpOWFgZ52j68EjHjPGNsV2dKrOG43QUY9FFY98le4v3q sHGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C9DDETRH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n20-20020aa7d054000000b005236a7804f7si1021204edo.633.2023.08.18.01.48.10; Fri, 18 Aug 2023 01:48:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C9DDETRH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344256AbjHPPln (ORCPT + 99 others); Wed, 16 Aug 2023 11:41:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344219AbjHPPlV (ORCPT ); Wed, 16 Aug 2023 11:41:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7042F26A6; Wed, 16 Aug 2023 08:41:20 -0700 (PDT) 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 0EB4D64577; 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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); -- 2.40.1