Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp2546212rdb; Fri, 18 Aug 2023 03:52:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYjcgQEoDGgm2UzWmhQDfuc8H3Y24A9mYwthQ1vPHM2875xYZ0nF/NRyriwiMQd+Lkx93x X-Received: by 2002:a17:90a:e547:b0:268:798:a28b with SMTP id ei7-20020a17090ae54700b002680798a28bmr7153296pjb.23.1692355919602; Fri, 18 Aug 2023 03:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692355919; cv=none; d=google.com; s=arc-20160816; b=ZaF47m8HNIsmE8E0j4LoFqySD6wqqdyXz+fivtzbR2p2y0btOkh5f3O1AVcNbtzVU2 gN+O4w/qi0mp7wdlO2Yz5VsiTzhXQMV+SNgdz9I3C2kMhgVwa+zEjswFbFeUd/cpR6ub 7Qox9tYrOcOlNptRCcj2Ro4JjmtoGDitSM7XEhtcMrOBikp12iHL2MVdUma4hPx3wz8j wBRQM42JuD2Zb2SYO+ti8pd3ZbsO77DIJ+aBiLqssZxV+L0tL8Td2dDISJhOUbKoyqiK sYzXF0PIslYNb7tYd/jMsZdvjaVtplCyeMisu1EB9hl8GtsazCON2goh4w6vA+jQiO33 V/zA== 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=MAfM4inTRNOpuR1AKcSyqti3Od2l5SQuCrCQyaiaTpEV1yq5XJ86otuwvwctDC7awe 8zwyBQdOKkTW4gtu1PNkc5E1pttbudA8b1tqkRM/sBUjSjDszv6nzjxMRN3950m4ZnF4 ormQ4So2tyu7lmmROw/e9RXuhX6MhrI8YX2KnligGqDQr2TzEY3s50VxlPaLroWH8vlm llzKkVKCSZX2fOAdhN5wDXxtqfBxYpdLYKfb4t4FlYUJ2+BYbc8kySbaPwZSusng4Nu4 ViuVCXvEadOL4/GcOwsgyVLkH0+ZVhCLUBATzwOKNAlNTLWohgaHjETUXl2T1hcA/FBI SURQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fqfCowDB; 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 ob5-20020a17090b390500b002694ae34910si1422190pjb.66.2023.08.18.03.51.46; Fri, 18 Aug 2023 03:51:59 -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=fqfCowDB; 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 S1353860AbjHQRKC (ORCPT + 99 others); Thu, 17 Aug 2023 13:10:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353882AbjHQRJs (ORCPT ); Thu, 17 Aug 2023 13:09:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D88E30D1; Thu, 17 Aug 2023 10:09:41 -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 EB095675A8; Thu, 17 Aug 2023 17:09:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 918D7C433CC; Thu, 17 Aug 2023 17:09:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692292180; bh=nrZBBHIvwoY7+NGVTUVo+wQxGv/rQfcOhG+8CHuUfbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fqfCowDBfSqLcVFjlD11GFJSUH0EMWxlBxuC4kwhPdNDkLiKR0O6jOv0xZTf62WnD ZVIrCBskydJV8vy56PW6FFBvq0cgiCXysSwL2NsKI6T3LCl3EqiARFrhRlFDel3q/H cX8DEnsTqwPxIg2MvmM+0FMqZIa4gb34YemcxM1qXptwCQP4g0ZKeOH1qGfLwL7qxc IAOMRahGFT1GeOIUHyE5RaHiXUzIEeQnlX5kGc+fqE+e+NNj1HlX1qV2SF1ILg11Iv D5SmzcZnnRMJ4K7l0sHH8qy2k1i6BK/JRJZvk1uO3QzCZHe9brEn9vs9EffWhy0yV4 5O2iuhBRfHMqw== 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 v5 2/9] net: stmmac: xgmac: add more feature parsing from hw cap Date: Fri, 18 Aug 2023 00:57:42 +0800 Message-Id: <20230817165749.672-3-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230817165749.672-1-jszhang@kernel.org> References: <20230817165749.672-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