Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp375417rwi; Wed, 19 Oct 2022 23:09:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM49ykWeSbwtukNC4MkDqLWQGB1fRkwufAuNPk2oT9liOUTQh9IOFX8+yuFiRlcYZgQMDwWL X-Received: by 2002:a17:906:9c82:b0:781:5752:4f2b with SMTP id fj2-20020a1709069c8200b0078157524f2bmr9313596ejc.561.1666246195865; Wed, 19 Oct 2022 23:09:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666246195; cv=none; d=google.com; s=arc-20160816; b=cPlufkiEep4XoMF8hLetliOCUaNQfhEXn2V2/4mTcMZ/tFDUvngG33EXH2/OYhNzJJ cdNrY/bSccHFH26DETq11N6V8r6Kbvi2QwnK8IHwKiCSDVRWSb0lwpK89gQMlv2UATdq koVJPqP86HMaBHlWxjgp277i3w1VQoNPP308cgrSXMqh/6VFxkGh2FYguBDCufq1LoC9 eeRmWs9kb+BV2vBMFdGnL2FD25DziNHr146dA2rjw9p09bGNvAX580FLYvGwykzMo2Lh 8tw04WiRqVpYpL4zG5AUmNeljSdH+9LStcmvwMVgdRqDRFTECtOs4isUZmhxOupQec26 L/dg== 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 :message-id:references:in-reply-to:reply-to:user-agent:subject:cc:to :from:date:dkim-signature; bh=WmQuwKBWTimCndR3nC++in8cypH3ZEm+MiDheyuj4O8=; b=mDZWLTWNZbHBA35ywm74Hx/iWNB2av+2KHDEOK2SYKXY/yyO85abZ9F5CdPH2EEdCq Z1Jn7xJKCcvzELDbtSPnLkkzSjhZwI/jKQNQ2vgyLi+gqt77vPjDUVFHWnRWxsaF9TtH DB0Dx41LiHIUgEQwwonRihV96bTrazLK5K8Ux+2lvyMCbczxCCtu7Y8QweyL/JA0xBOm k6I3ZWpIptjmrXf0pRMvl3UhGkQgrH2ZxeJLUrcx57hgwSLYrBwPN/uQUhOiR8cjairc Mf8rM9VvPPvG4jv1fC3ZgXBmi+3D7xl8TowhOV1fFpjqaq31tMfXPYCUjIUC4/PhRr0i xdwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=GNaxmdC3; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n7-20020a509347000000b0045440929f87si1496446eda.86.2022.10.19.23.09.29; Wed, 19 Oct 2022 23:09:55 -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=@gmx.net header.s=badeba3b8450 header.b=GNaxmdC3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbiJTFzl (ORCPT + 99 others); Thu, 20 Oct 2022 01:55:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229692AbiJTFzj (ORCPT ); Thu, 20 Oct 2022 01:55:39 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 746F5162528; Wed, 19 Oct 2022 22:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1666245299; bh=eYfIfwKZVAPHWPdUZhZS++LaFuPSNaUX5JkNXjlgyig=; h=X-UI-Sender-Class:Date:From:To:CC:Subject:Reply-to:In-Reply-To: References; b=GNaxmdC3RMACnIFIqOSr/dnCILu/l3sJaLLfRaN96waBuLoYrvyD3+jxnH/aOQsYv EKIGV/imtM7zerR4fK+LTzeXOIWj/P3AMUrxLl4TkGsixmJnerPzWG38Q5bcjfQX8I 8a88jG9z9Rlu012ZTRu36YxGaTtE+MuM1sqga8sQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [127.0.0.1] ([217.61.146.75]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MUowV-1oclgR3QXJ-00Qm59; Thu, 20 Oct 2022 07:54:58 +0200 Date: Thu, 20 Oct 2022 07:54:49 +0200 From: Frank Wunderlich To: "Russell King (Oracle)" , Frank Wunderlich CC: linux-mediatek@lists.infradead.org, Alexander Couzens , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: mtk_sgmii: implement mtk_pcs_ops User-Agent: K-9 Mail for Android Reply-to: frank-w@public-files.de In-Reply-To: References: <20221018153506.60944-1-linux@fw-web.de> Message-ID: <949F5EE5-B22D-40E2-9783-0F75ACFE2C1F@public-files.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:soS9ZlfzVGHMnYNJViC28AeLChMiaM1aVARhkc8HuzudRHY7DPZ EKNlvaxU2vEqCTOvtcyYn8vBZVkN843XxDk+coA0TWxjhhZ796HxvyVRoDWefNVzxzh9G2u 8yxmLx3eNnREm9NTb0ADlutsSMwcLdMOeOu0pQfqHuczoTNHbvuQmsGyufZK7hszK2nk3lK FsqEhBo632zluJ3l3S1RQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:97lpaLYe6Os=:zunmQz9114/K9zjoMonKLW eEiEXvyiCu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vPZaP3Q8f1YEnF2eQkUvMVaOzsNf S6135R8WhkjsCnqdTM/ImNpC8aSjA+em98hA7ljXuk2J2A1/F/dhHiSlZa4lkEckbeFeraGDZ 3GSAoLUYFItFc36NxXgNMm1Z4OjwK9090KLH3m91bZbhi0KIYT71BBRmNNJ2SRg8Na4x8nyju osvd6tYvj8Zk/VHO9hdtW5IlXPmbevI6sgYtCuo4n1jFOuwQq8bTx93Bcxo/429TkXq/OUWhN uJDw6vV8wyT2S2MY4Wm+NxNjnajJCJ7PMOFX/v6MQBO2A2dBR9yekvAu7AUwR1xUD7ttPQknj eCsuvIec9A4D9du4hwlQcVe97SSVw0UEjIpUSbt35uO1mHXon7LpTvHMYCKelQ4+GxMUbWjaH C5Nymt8vodxeAobYi6BuhcVMOIwIhCnCoob0u867OQPmJ/cklNySti7m9WG1jGMfaaNa3Sgfg 9waD8JDGO8K9qVj5g3brshTfhQ51/LziWJnXAELokMwe1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,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 Am 18=2E Oktober 2022 18:39:01 MESZ schrieb "Russell King (Oracle)" : >Hi, > >A couple of points: > >On Tue, Oct 18, 2022 at 05:35:06PM +0200, Frank Wunderlich wrote: >> + regmap_read(mpcs->regmap, SGMSYS_PCS_CONTROL_1, &val); >> + state->an_complete =3D !!(val & SGMII_AN_COMPLETE); >> + state->link =3D !!(val & SGMII_LINK_STATYS); >> + state->pause =3D 0; > >Finally, something approaching a reasonable implementation for this! >Two points however: >1) There's no need to set state->pause if there is no way to get that > state=2E >2) There should also be a setting for state->pause=2E Currently it looks like pause cannot be controlled in sgmii-mode so we dis= abled it here to not leave it undefined=2E Should i drop assignment here? >> +} >> + >> static const struct phylink_pcs_ops mtk_pcs_ops =3D { >> =2Epcs_config =3D mtk_pcs_config, >> =2Epcs_an_restart =3D mtk_pcs_restart_an, >> =2Epcs_link_up =3D mtk_pcs_link_up, >> + =2Epcs_get_state =3D mtk_pcs_get_state, > >Please keep this in order - pcs_get_state should be just before >pcs_config=2E Ok,will change order regards Frank