Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3923188rwb; Mon, 16 Jan 2023 15:18:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXtbzekxRgaTpJ6iR8TcRXzK973irPYT1mvprjOzN5V2KhIRuWU4cdV+ffkksH0XomEqTsgr X-Received: by 2002:a50:ed91:0:b0:48e:c073:9453 with SMTP id h17-20020a50ed91000000b0048ec0739453mr13946698edr.15.1673911089506; Mon, 16 Jan 2023 15:18:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673911089; cv=none; d=google.com; s=arc-20160816; b=VyMhgVT04IDgmrNJxxy/TUYmDP5fVPrP+jmIXfv4q+0U0Tio+smdpIOIH8PCx2K+/p GpdvRfUxB8G0p6kr//oWn1MOVVYuT+Rb3Mq1SbMCru6/jfCqPFOekzlFdy/PRtKuiWFw fXatTGP1+1+TcEawj+iQ3c5Zxp1wdIRxP/7d74VgolW1RQ8kyPnTSW+ajPjMNuti7pfT vOKxJbmn5DH2nV26kLEZwx58saDKtuj2k66Lh3rppdRFp1RdVuPr0MmOaqrzhbMH0Vo1 JY0eeEjTHn91d0BwWJ6RpZ7u5GnZyiQJXgsZbpyViZk+SX90nf8bst47kyk2ZSxTEGoG CiWA== 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=YJdSP6ajWattA/UAQ8BmtbdhHG1VfxlJKOf4GW8dgMw=; b=fr5uS2agcPFrHLjmoyVKMHOxh+9nfPz8+HFltAvUMYfZkp6dvoxKKrvN3USe+bSDXO yb3dZRRMKne7z5hwHoPsoHW7yJaaKql8mf+cNpBEM7wOa5BIeqkGkUK6tfod6JxeyjvI 7taGW2unbz+2EkbVOYV7UP3rwslYKzQJO91YdN39WobCTL6dasGayzweMILDlkH30lK+ qVMWYoiOE0p7ns2aUcO1s9W5dOAAeC4s4dqihEMinVJ608dw10VYYVg2D4UO+/OxJ5gd atxn2mH0MeXLhoJB/y6kfJrUxVLvJfAggUoPPP9jLV6HjsrU7PIgYBiL+GecPVoY7mBA /xrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=uEDh8oJ9; 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 t5-20020aa7d4c5000000b00497326c9e1csi28071675edr.594.2023.01.16.15.17.57; Mon, 16 Jan 2023 15:18:09 -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=uEDh8oJ9; 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 S235037AbjAPWPj (ORCPT + 50 others); Mon, 16 Jan 2023 17:15:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234562AbjAPWPf (ORCPT ); Mon, 16 Jan 2023 17:15:35 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A673610A95; Mon, 16 Jan 2023 14:15:34 -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=YJdSP6ajWattA/UAQ8BmtbdhHG1VfxlJKOf4GW8dgMw=; b=uEDh8oJ9HS6v+2ZzWzV3Wjaf8t kiivbrhcgMn9WltPkFhpqLF6oByGKlvD2UwpzvVYo8om22flSZUPMetaJlH/NR37iZo38iDiS93Ij yrJWXZ11jYqxFbYhtA6QWCtyDYYhqe4BA4bDc6/rvigTTmF5b+kg3zfyrfTZV6Hjg4IA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pHXj6-002Gfb-A5; Mon, 16 Jan 2023 23:13:12 +0100 Date: Mon, 16 Jan 2023 23:13:12 +0100 From: Andrew Lunn To: Marcin Wojtas Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, netdev@vger.kernel.org, rafael@kernel.org, andriy.shevchenko@linux.intel.com, sean.wang@mediatek.com, Landen.Chao@mediatek.com, linus.walleij@linaro.org, vivien.didelot@gmail.com, f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, hkallweit1@gmail.com, jaz@semihalf.com, tn@semihalf.com, Samer.El-Haj-Mahmoud@arm.com Subject: Re: [net-next: PATCH v4 2/8] net: mdio: switch fixed-link PHYs API to fwnode_ Message-ID: References: <20230116173420.1278704-1-mw@semihalf.com> <20230116173420.1278704-3-mw@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230116173420.1278704-3-mw@semihalf.com> 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 > +int fwnode_phy_register_fixed_link(struct fwnode_handle *fwnode) > +{ > + struct fixed_phy_status status = {}; > + struct fwnode_handle *fixed_link_node; > + u32 fixed_link_prop[5]; > + const char *managed; > + int rc; > + > + if (fwnode_property_read_string(fwnode, "managed", &managed) == 0 && > + strcmp(managed, "in-band-status") == 0) { > + /* status is zeroed, namely its .link member */ > + goto register_phy; > + } > + > + /* New binding */ > + fixed_link_node = fwnode_get_named_child_node(fwnode, "fixed-link"); > + if (fixed_link_node) { > + status.link = 1; > + status.duplex = fwnode_property_present(fixed_link_node, > + "full-duplex"); > + rc = fwnode_property_read_u32(fixed_link_node, "speed", > + &status.speed); > + if (rc) { > + fwnode_handle_put(fixed_link_node); > + return rc; > + } > + status.pause = fwnode_property_present(fixed_link_node, "pause"); > + status.asym_pause = fwnode_property_present(fixed_link_node, > + "asym-pause"); > + fwnode_handle_put(fixed_link_node); > + > + goto register_phy; > + } > + > + /* Old binding */ > + rc = fwnode_property_read_u32_array(fwnode, "fixed-link", fixed_link_prop, > + ARRAY_SIZE(fixed_link_prop)); > + if (rc) > + return rc; > + > + status.link = 1; > + status.duplex = fixed_link_prop[1]; > + status.speed = fixed_link_prop[2]; > + status.pause = fixed_link_prop[3]; > + status.asym_pause = fixed_link_prop[4]; This is one example of the issue i just pointed out. The "Old binding" has been deprecated for years. Maybe a decade? There is no reason it should be used in ACPI. Andrew