Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp825112rwi; Thu, 20 Oct 2022 05:50:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6SV1BVBFagQB5QCoGH+23b89xDfA+22GRmirrPfrQM5nmeyFoQfufKBb8vphZPpJVY2leR X-Received: by 2002:a05:6402:5c9:b0:446:fb0:56bb with SMTP id n9-20020a05640205c900b004460fb056bbmr12315837edx.173.1666270195579; Thu, 20 Oct 2022 05:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666270195; cv=none; d=google.com; s=arc-20160816; b=OeCsqbfG4EG+03AOmM7QHwB+CcEVCQRjjp3Drl957schWAjsRD+PPgda6hwaLdCp8F b0n5fnzpZ2GQz1Nlj1jvIzzZXWIn0EyHFpM1ePKVLh0Sku041qEDsoWQRJREc7rqsO/j JAvKJveDljOtWkDz4mdHEa/bWmMJTlGFzRUDhkQTI2jWN/c3/Vtm1J9fRPSybSDYET+q wtysqKl0nLcgzRdK39wRKcRnZQxgn/iOsw2w2cfgwU4NeXpoysWXbih7aUIDuaxePQb4 NNjqo2oywAmgRRC19WjnuyB9fma3Jsp32nZGhk0i+Wbv8VERt6E+q8oc/d6vvKwnuLQA iLyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:references:in-reply-to :sensitivity:importance:date:subject:cc:to:from:message-id :mime-version:dkim-signature; bh=IhKecFpHgL5Jix1YZMVIIkbDaep03M/C2zU3FeqEniU=; b=T7iFdbPwhu6YxPTwmKrO40uNUNHEonu1oYDhTy6w3mqLRlMUK1UmZlEbDPW2LREgL0 yrpCBjqyXwSmTee/IUEG/bdNBqNU1SNiCoieRZX7IVierhYCbgiPZ6lg5JVNQkYLVXHi Jh30/lQXQpC8ynMGrwp3pViB7og79MsmVZUfRema4Q4rp3c9Ew/wBQvri8gl5tdYlpR3 4XDk6dvQgiuxOcogWnY2U95TAaXSW70+oQUZw3kz83f+L4dMq8NpN7O6l0y0QDZh4wD9 5gH62ppKva/OfzmVETOvfJfO6dx9IT6QjPytOskmGgcLxotz+G5EgJ+Z14/KDiHQCfy9 RmLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=Q54MWZ6I; 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 ne14-20020a1709077b8e00b00783c4625944si16294049ejc.508.2022.10.20.05.49.29; Thu, 20 Oct 2022 05:49: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=Q54MWZ6I; 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 S229902AbiJTMDm (ORCPT + 99 others); Thu, 20 Oct 2022 08:03:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229784AbiJTMDk (ORCPT ); Thu, 20 Oct 2022 08:03:40 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B7091843D8; Thu, 20 Oct 2022 05:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1666267368; bh=D+hEsIZ5MqHmy/cfeQgHzMHMoHuUmID1yqX63F16548=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Q54MWZ6IspGF/8DRWgMHHIJIFKtF3tD+rr3I5AVF5LbgcvaYEvX4BowHjP4rYPQBh sB99yt0XiUetkey1MrQzSPgZhhq+nVx1hoKad3Jl8PiPj2EvbGUGHGGt6aFhy43syh vfB4Uo9VfeMdLbXw2w74Pu/Xz21aOownn1KNWj44= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [217.61.146.75] ([217.61.146.75]) by web-mail.gmx.net (3c-app-gmx-bs65.server.lan [172.19.170.209]) (via HTTP); Thu, 20 Oct 2022 14:02:48 +0200 MIME-Version: 1.0 Message-ID: From: Frank Wunderlich To: "Russell King (Oracle)" Cc: Frank Wunderlich , 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: Aw: Re: [PATCH] net: mtk_sgmii: implement mtk_pcs_ops Content-Type: text/plain; charset=UTF-8 Date: Thu, 20 Oct 2022 14:02:48 +0200 Importance: normal Sensitivity: Normal In-Reply-To: References: <20221018153506.60944-1-linux@fw-web.de> <949F5EE5-B22D-40E2-9783-0F75ACFE2C1F@public-files.de> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:mNvPlxKiBmdiWAYpi/kJ+DODyjnMKBtEVLi/DReg3FWYbWdKOBqmfXkS53KdL3KT8Wc58 3qPYbsjwEfQ8WieLv/R5DqfyAWUtUkJlFZVOntWOLj2HG/nLCuxieEg6wxeB8sB0ekyVUA0CsQ4+ +10XX+CqhswsZjMw1jD0n/tc+s16+ssb1tCD+z1Nuowh14LuyQrrB8Bt3TPkGmLxXQFib5RSb3Rn GbGdVQj5PkpNvDPmMn4FRXS9SAcuW7UJ3saXQwKgeDOu983RqtiRm71sI8nehUuC+YrfjqvIq3lW 9M=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NBy6S2u7IXHyGbTeCOdcRenx+1 mAAQZJGDY4BZ1+VqE4R8wybNfIH3uPTwVnUhNIn4fuQAEYDqQrZryFvz7JJLx0KmDD/n/b4kS 1X4FaIvxjf8wozW2NQagad1Y3s8LA51MFZyID3NqYQeQR2oEVQ7VLn16fdy3ykckb2KEL0cuT Dl3G2tpgxxzFj+oudmG2YBaj4SsclHIRbPS9NZJu+yTPzzNy946316JIzxcYOTmxfTzXuX0CC 8gYco+EqtjMsxKxCqgUlvFkVBkt+HzCtM6hM+yd7iB73yrDZCdRzSPXm3HlDcVtrZo66yEyWk cKYphK3I Content-Transfer-Encoding: quoted-printable 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 > Gesendet: Donnerstag, 20. Oktober 2022 um 10:33 Uhr > Von: "Russell King (Oracle)" > An: "Frank Wunderlich" > Cc: "Frank Wunderlich" , 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 > Betreff: Re: [PATCH] net: mtk_sgmii: implement mtk_pcs_ops > > On Thu, Oct 20, 2022 at 07:54:49AM +0200, Frank Wunderlich wrote: > > Am 18. 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. > > >2) There should also be a setting for state->pause. > > > > Currently it looks like pause cannot be controlled in sgmii-mode so we= disabled it here to not leave it undefined. Should i drop assignment here= ? > > Why do you think it would be undefined? > > static void phylink_mac_pcs_get_state(struct phylink *pl, > struct phylink_link_state *state) > { > ... > if (state->an_enabled) { > ... > state->pause =3D MLO_PAUSE_NONE; > } else { > ,,, > state->pause =3D pl->link_config.pause; > } > ... > if (pl->pcs) > pl->pcs->ops->pcs_get_state(pl->pcs, state); > > So, phylink will call your pcs_get_state() function having initialised > it to something sensible. ok, then i drop the pause setting for now regards Frank