From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38479C433EF for ; Thu, 21 Apr 2022 11:41:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385009AbiDULoI (ORCPT ); Thu, 21 Apr 2022 07:44:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231752AbiDULoE (ORCPT ); Thu, 21 Apr 2022 07:44:04 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A920D222A3; Thu, 21 Apr 2022 04:41:13 -0700 (PDT) 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=iXYVGbF3ixeNyAq4kutRGrMygWxyhM6LeblM6gz0/Sk=; b=ytbKjW0ri609Ivn6UdOLdYEJRA hefxttXa9YRcq6mDgqruzU8i+8xjtNoR19zaN/MrfmcLAmSZoqD5JpzA+bQ49KVCuGPqTew/0z7M2 w2Q1ok9zjURaNMIoJ5k3RBYnx410I7bI0VE43C4EpbbsV7Ftz/ld6q2+QafJC1mgJb5Y=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nhVB8-00GnGX-Mf; Thu, 21 Apr 2022 13:40:54 +0200 Date: Thu, 21 Apr 2022 13:40:54 +0200 From: Andrew Lunn To: Kai-Heng Feng Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] net: mdio: Mask PHY only when its ACPI node is present Message-ID: References: <20220420124053.853891-1-kai.heng.feng@canonical.com> <20220420124053.853891-2-kai.heng.feng@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 21, 2022 at 10:58:40AM +0800, Kai-Heng Feng wrote: > On Wed, Apr 20, 2022 at 10:47 PM Andrew Lunn wrote: > > > > On Wed, Apr 20, 2022 at 08:40:48PM +0800, Kai-Heng Feng wrote: > > > Not all PHY has an ACPI node, for those nodes auto probing is still > > > needed. > > > > Why do you need this? > > > > Documentation/firmware-guide/acpi/dsd/phy.rst > > > > There is nothing here about there being PHYs which are not listed in > > ACPI. If you have decided to go the ACPI route, you need to list the > > PHYs. > > This is for backward-compatibility. MAC can have ACPI node but PHY may > not have one. And if the PHY does not have an ACPI node, fall back to mdiobus_register(). This is what of_mdiobus_register() does. If np=NULL, it calls mdiobus_register() and skips all the OF stuff. Andrew