Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2317897rwb; Sun, 15 Jan 2023 13:07:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXt8NWfyV3g9r+f5pdKj6OlBOUKee7UDswyX5l5SRsklXUrfr5JLNPsqtG3uFJtsj20uZdgq X-Received: by 2002:a17:90a:f8c:b0:229:2427:532f with SMTP id 12-20020a17090a0f8c00b002292427532fmr10654471pjz.40.1673816858332; Sun, 15 Jan 2023 13:07:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673816858; cv=none; d=google.com; s=arc-20160816; b=J4OK4LchMTfyBrODBuDWFWmX3bm3A7ga4HV2F2VCDqYjRL67fqnMIwHkK/jlWabykb y+dRsopH1WX/7zzd1zknRENBa39NB/LMl11nFMzQ9Tro7OscJlzM/0O+mLSVMYjEstrJ 3Vfd8fNsM/RVULOUkFwwnJfS+9G+H9nbxPiJChPda1UBSykRpMuRBbp0dn42z+Ke9hgV /x/QUiPozovsuiGfvtS6PxGJpnusR7DTHbuahlcfBne4ow2NRR1U6aOOWeV2Ys+iqgVQ KSXMFshb17At7Hfkh+rt3ifxFCr2yzNF0j5YIsBuWSzR/kK2+hDI0aftu2epBCUR5Jwh Qvlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=YsO2LsRKgK20s4o7iDJGIbwEqRob1KRtlORzs1GZn9Y=; b=lCPpCX7r+UVsOTd19pwx1oqYnB+9n2HwKzJNL0poWFbqjDFgWK3hCoDOqjdk9/RSCD 9aDlFRyAS51KlxtiOhrAvXs2RT86uAIu88Sp3YM1AfXSF6FwInNKUirJzHh4gxr+DXYi iVVKxV12cBqXUl16xsDfO17qEnr+Atn0MrZhwYG34ogzXiSEnY9Z7l3HlbKanJF9Vyo5 I0fCaqrCSWCNZ2hkRm31mC1VJfVdH+JZhJJzCYDcb5/EKzr4/EesDvTE3/LYfbWVuqxA gaJdJMTtxc/Tfl+kCcmbfQEftvmRIJ6F8r2cEgnO7H5xRXqfglrYV81NyOp2eu5aYfo6 zbjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cJ7CkpaY; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ls13-20020a17090b350d00b00212e2e1b626si10463605pjb.164.2023.01.15.13.07.31; Sun, 15 Jan 2023 13:07:38 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=cJ7CkpaY; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231639AbjAOUfQ (ORCPT + 52 others); Sun, 15 Jan 2023 15:35:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231610AbjAOUfL (ORCPT ); Sun, 15 Jan 2023 15:35:11 -0500 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DFFE12F2C; Sun, 15 Jan 2023 12:35:09 -0800 (PST) Received: by mail-qv1-xf33.google.com with SMTP id y8so18444944qvn.11; Sun, 15 Jan 2023 12:35:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YsO2LsRKgK20s4o7iDJGIbwEqRob1KRtlORzs1GZn9Y=; b=cJ7CkpaYEy1CX51VQAht4bwOyTMWHAFV5pbq17NYUDnUDmOVPeDZe46oE/uXPxln1A FETGmutcmVcUYqeVQOgDtKdWRxhqr2jBMyQgFaiFqQbFcXKSU21jTaT3zobeW3bq6uPz G+7lweSH7jetI64CxbUSivNMTVXEm4tW43Ceh7ANFldQR+XMksWc4lSm8TMI1T2vXbSN tyi/BTGtFneyfa0JQQUW3DA3JLzzgw0Kszu+g+/XnS1r2Bu4zw3xx0vHVbFD/3Twgt5V 3iHYjQyQDEmF70snRx4+TvBzJx7pvg94lhalY8YoSLe7fUUoBqnCp94pwfkFc6jdIg4D 94cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YsO2LsRKgK20s4o7iDJGIbwEqRob1KRtlORzs1GZn9Y=; b=00jITPn2CH7R/+6AhzPTXSZmfoxvV8+DTzIQFhBaPm3iiSCdLQTYqPU1aHwvJwgXL9 NsS3GOUdn0/WtCtF5BEiK7htPHiRskgY8ftwxGuZVZHmkCwYYnfeMfETPFuAh56FcrH1 irtwm9cRI6sIak54LQp2LeKR+2ZjKEPf1gvO+r7BDCfqhIUtOVRtLhA/pzPt5IhPsp04 dLcFyWdFriiZKih+eKeu6QfR3+9jGrvQpNnRgz42/O8p/r0Igjh81p/GVGtIgAx0K0rb TqWfInm3SqKXflVsShowM0XYpTbwbeMjlyfZvJN6v5LGWOEO3QzKr5GZEC9BF5qWvhWc wR7w== X-Gm-Message-State: AFqh2kp6rgYZ11PQGsB+JrhI8eL/ri4KQNVoJov1ZcFc4zvUPsyYYduJ rDcrk/n6dY0ho/omyPgYqGWsmpkaEONq+GoPTZU= X-Received: by 2002:a05:6214:184f:b0:534:1fe5:6060 with SMTP id d15-20020a056214184f00b005341fe56060mr1117452qvy.71.1673814908543; Sun, 15 Jan 2023 12:35:08 -0800 (PST) MIME-Version: 1.0 References: <20230115161006.16431-1-pierluigi.p@variscite.com> In-Reply-To: From: Pierluigi Passaro Date: Sun, 15 Jan 2023 21:34:57 +0100 Message-ID: Subject: Re: [PATCH] net: mdio: force deassert MDIO reset signal To: Andrew Lunn Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, eran.m@variscite.com, nate.d@variscite.com, francesco.f@variscite.com, pierluigi.p@variscite.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 On Sun, Jan 15, 2023 at 8:02 PM Andrew Lunn wrote: > > This behaviour is generally not visible, but easily reproducible with all NXP > > platforms with dual fec (iMX28, iMX6UL, iMX7, iMX8QM, iMX8QXP) > > where the MDIO bus is owned by the 1st interface but shared with the 2nd. > > When the 1st interface is probed, this causes the probe of the MDIO bus > > when the 2nd interface is not yet set up. > > This sounds like a different issue. > > We need to split the problem up into two. > > 1) Does probing the MDIO bus find both PHYs? > > 2) Do the MACs get linked to the PHYs. > > If the reset is asserted at the point the MDIO bus is probed, you > probably don't find the PHY because it does not respond to register > reads. Your patch probably ensures it is out of reset so it is > enumerated. > You are perfectly right: this patch fixes only the 1st problem. For the 2nd problem, I've already sent a dedicated patch: https://lore.kernel.org/all/20230115174910.18353-1-pierluigi.p@variscite.com/ > > For fec1, if the PHY is found during probe, connecting to the PHY will > work without issues. However, fec2 can potentially have ordering > issues. Has the MDIO bus finished being probed by the time fec2 looks > for it? If it is not there you want to return -EPROBE_DEFERED so that > the driver code will try again later. > > There have been patches to do with ordering recently, but they have > been more to do with suspend/resume. So please make sure you are > testing net-next, if ordering is your real problem. You also appear to > be missing a lot of stable patches, so please bring you kernel up to > date on the 5.15 branch, you are way out of date. > > Andrew