Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4849178rwb; Tue, 17 Jan 2023 06:20:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXtCr8ieJI0D/yKMLnScXXifs5p85fKuU0kyn4n8bd2LGfqivF4JSWNo9l3L3Z+fw/SlhRmj X-Received: by 2002:a17:907:2129:b0:86f:ed46:c07f with SMTP id qo9-20020a170907212900b0086fed46c07fmr2969076ejb.75.1673965232380; Tue, 17 Jan 2023 06:20:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673965232; cv=none; d=google.com; s=arc-20160816; b=0POhursGZlZASFGsE1Ovr9fu7ggJTlDiK/dJtBIrDEELLzKONgLSweBC7BqvGCMyqi Aj+M2ubsx6YRIw1lavyYg1bhxd6Ge0QDepSkvQoXlj+mRJTWRv5pee9Rb5CvA5WQ1WN6 uQW5IDhNWef5ejjhp5bdiJNUG2q7ALZK9iY0AHD2M5r1bsWu1A9y1tV6S4DXdqFX/ESf 1OP7VVAHMdida+W8stg1w32wXYmcOFqpPMLngEumatOXJ4N3GtTk9MhmsXQdonXJW6A5 jgpU0IeleorlEE16k4eUZWvI3qmC1r/O49H7E7lVcyJ34NEE5lhUqeml2SHq6Efp1660 3dMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kkWpEbdhvO9/WJMoBB3MOxQsl6iaZufmOeTDARQQiuM=; b=T1H/5ZDDEHxDK3wEd957eUk/s+DFQBrqR3PiPjy3D+pKF5DoGggR4gjBOMwHKYrd2C eJcMiHscQEe43dk5Ul7unTdpyJzEuYekUoBxAn6LlkEYRKMW52wCagzl8KkRZzszLIQH 3K3PTnDIoV7knPKqo7SmQmEyz3G8X0oUXJFo/CLHrIeYY//26ygdbNwEwEeXn8NyefRQ K6RfqPt9K7AqwiG7I7RtyuNVeSwWGVLKkQBHrbqT+BeUv73hI/l/ZC60Aqby0dnswEs8 pHY01NRCY7twUu7/wFFCaqLZ/bLwmlwoyx7oqjB1vh75MfinLQ1+wBv9gA6NlUIiESIp Pjww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=RusiT9QT; 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=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji7-20020a170907980700b0084d33d87c45si33230225ejc.751.2023.01.17.06.20.19; Tue, 17 Jan 2023 06:20:32 -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=@lunn.ch header.s=20171124 header.b=RusiT9QT; 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=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231718AbjAQON6 (ORCPT + 48 others); Tue, 17 Jan 2023 09:13:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232250AbjAQONm (ORCPT ); Tue, 17 Jan 2023 09:13:42 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDF153BD86; Tue, 17 Jan 2023 06:13:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=kkWpEbdhvO9/WJMoBB3MOxQsl6iaZufmOeTDARQQiuM=; b=RusiT9QT2rv87W+fSdOaBIPtk2 dfGWgfX+1Hj73f0cxDv+9PxhuIwIVLCHIHmW0+ONwGfQztRC3+9fmE4hElqwowvjFw9gGmgNKYNMc z08s0j/mqLljUnuNUG+YnPaNb1V0FWPMWNdueaxC79cKZVFLLU4rGNw1pgS4kmPp/XXA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pHmiQ-002KUd-8i; Tue, 17 Jan 2023 15:13:30 +0100 Date: Tue, 17 Jan 2023 15:13:30 +0100 From: Andrew Lunn To: Lars-Peter Clausen Cc: Pierluigi Passaro , 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 Subject: Re: [PATCH] net: mdio: force deassert MDIO reset signal Message-ID: References: <20230115161006.16431-1-pierluigi.p@variscite.com> <54eb0ee4-7d9e-7025-f984-b1e026c18c3d@metafoo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54eb0ee4-7d9e-7025-f984-b1e026c18c3d@metafoo.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 > > > I think part of the problem is that for C45 there are a few other fields > > > that get populated by the ID detection, such as devices_in_package and > > > mmds_present. Is this something we can do after running the PHY drivers > > > probe function? Or is it too late at that point? > > As i hinted, it needs somebody to actually debug this and figure out > > why it does not work. > > > > I think what i did above is part of the solution. You need to actually > > read the ID from the DT, which if you never call fwnode_get_phy_id() > > you never do. > > > > You then need to look at phy_bus_match() and probably remove the > > > > return 0; > > } else { > > > > so that C22 style ID matching is performed if matching via > > c45_ids.device_ids fails. > > Sorry, I've should have been more clear. I did try your proposed change a > while ago. The problem why it does not work is that there are other fields > in the phy data structure that get initialized when reading the IDs for C45. > Such as which MMD addresses are valid. So lets take this one step at a time. Does this change at least get the driver loaded? There is some code in phy-c45.c which needs phydev->c45_ids.mmds_present. So maybe after the driver has probed, and the device should be accessible, we need to call get_phy_c45_ids() to fill in the missing IDs? Andrew