Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp777383pxf; Thu, 18 Mar 2021 11:16:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxOlXXgWU4wSgP005aVuoXqve1xSyJJRVUEXSB7vRskgsWI/4hpAyU6opcGzTzEHjAsCoL X-Received: by 2002:a17:906:26c9:: with SMTP id u9mr21190822ejc.520.1616091360042; Thu, 18 Mar 2021 11:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616091360; cv=none; d=google.com; s=arc-20160816; b=gJFojo5F5nxOTxe2KvCZfNboGk1wZUhqY/iNiSzUA4se0kUGwu1b49Z/zr/opaLUcZ r+lAEWPYKUoYqXXiAAj/5TAxpZjfLDxfowFFoz4atDZVUNc+7nqWlNsgu0nWh/xT3bpj PnMe9lKA5Ll85JXQ7HBnivaIp3odF6NL5bHuI6ZvgIAZCOr17SU0eqQNB3R31aybSiS2 uc6+RukcXkPPwExoh+vXzOLinHc9z3wTszlCLOIAIy4WdnDI1rwmsksoT0ChMOt1t/dt E9Ze3iap2J/Ovysb6ANmnFac4ZRM2Q1rI+lG63AIUDNRrmZZAfOA5HQRUYPc67Og6Ye3 vnHw== 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=I9X8R2n4bJmwiZ49n6IbHj5RlpxdsCHJscTIMIg2eek=; b=RAxRBiqBs9g30TWkW8F98E1luvLpbAxPq0evXuN6wfiLq+IJSf+LgJp75QG7Z+iORm 8kfgMKCPHhnEVusd+yMUnj3v2NjnKBgG0NZ1zebOs1F0FW7cMdZjuP1ff/CRNf/7cPRG ZJJL1lIi+dEyD8JkrU7GQU6ONMuOIk5YFQA5FTRB0vfFCBCZ9JAILrgmJruOqmMvSj2Q wDMm7C5OhWvAE5GyXpiivRgBdJrHvtREhqtqSinpynJMsinWWJfvbakmyazzfuqDwUso pKP7bu7qkLFmkUMBU++yC6FcucR6Ii7VEXAwxS5Q9GJ33SA7ZnajwTNV8a+E91I2munP TwBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0CdMRYcT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id go37si2160768ejc.406.2021.03.18.11.15.36; Thu, 18 Mar 2021 11:16:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0CdMRYcT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232528AbhCRSOi (ORCPT + 99 others); Thu, 18 Mar 2021 14:14:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:38580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230442AbhCRSON (ORCPT ); Thu, 18 Mar 2021 14:14:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BFCD364F1D; Thu, 18 Mar 2021 18:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616091253; bh=WJXaBc1cx6NHSgO4bTyGgYj1KQJ1lQp91QwR6cje2b8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0CdMRYcTVzwIzuvqKX7REkGrA7lLw6QB9kaqCtYe8SQmyisxQLhEGAAI6jtNPhS6x k5u7m0E2kXjDtPzgV3rFCfo0gTglUgfKrjbqolTtAOyBsKnVSdxQ2Dnlt64BkOJdI7 qvpKf+QjCpQRo/er2C7inkYOG8LK+tF1KIbEEW6w= Date: Thu, 18 Mar 2021 19:14:10 +0100 From: Greg KH To: Florian Fainelli Cc: Heiner Kallweit , Wong Vee Khee , Andrew Lunn , Russell King , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Voon Weifeng , Ong Boon Leong Subject: Re: [PATCH net V2 1/1] net: phy: fix invalid phy id when probe using C22 Message-ID: References: <20210318090937.26465-1-vee.khee.wong@intel.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, Mar 18, 2021 at 09:02:22AM -0700, Florian Fainelli wrote: > > > On 3/18/2021 6:25 AM, Heiner Kallweit wrote: > > On 18.03.2021 10:09, Wong Vee Khee wrote: > >> When using Clause-22 to probe for PHY devices such as the Marvell > >> 88E2110, PHY ID with value 0 is read from the MII PHYID registers > >> which caused the PHY framework failed to attach the Marvell PHY > >> driver. > >> > >> Fixed this by adding a check of PHY ID equals to all zeroes. > >> > > > > I was wondering whether we have, and may break, use cases where a PHY, > > for whatever reason, reports PHY ID 0, but works with the genphy > > driver. And indeed in swphy_read_reg() we return PHY ID 0, therefore > > the patch may break the fixed phy. > > Having said that I think your patch is ok, but we need a change of > > the PHY ID reported by swphy_read_reg() first. > > At a first glance changing the PHY ID to 0x00000001 in swphy_read_reg() > > should be sufficient. This value shouldn't collide with any real world > > PHY ID. > > It most likely would not, but it could be considered an ABI breakage, > unless we filter out what we report to user-space via SIOGCMIIREG and > /sys/class/mdio_bus/*/*/phy_id > > Ideally we would have assigned an unique PHY OUI to the fixed PHY but > that would have required registering Linux as a vendor, and the process > is not entirely clear to me about how to go about doing that. If you need me to do that under the umbrella of the Linux Foundation, I'll be glad to do so if you point me at the proper group to do that with. We did this for a few years with the USB-IF and have a vendor id assigned to us for Linux through them, until they kicked us out because. But as the number is in a global namespace, it can't be reused so we keep it :) thanks, greg k-h