Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp672471pxf; Thu, 18 Mar 2021 09:04:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1lsTXUUSIhGD+NvKc8PxaZpGl6rlvjLuyofpDyXjyrclApwpEKfu3u92wg0ixYTC+UvYy X-Received: by 2002:a17:907:20e4:: with SMTP id rh4mr42285406ejb.369.1616083470480; Thu, 18 Mar 2021 09:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616083470; cv=none; d=google.com; s=arc-20160816; b=srmDzkxhlRHsTcVDXODbFVnPf9+R3mF+6H5mCVIeoi7pFKO7M2bXOK9SBKDRT55QVn mrudgt5a2fyrPtM/j7t9tRnNQUY0tldOBH+036+e0k+UkSVY3+/ZB325QBlxNZ1xrVeE lk6uQ1QBEJXvuYRAqPzuI7nN4AQmIU4MGqCnfc/KOh84uGrd/Aix4CRdDPVGtTJRg/FK Z42GaFrsorSZBu9j+le/2pXgGsHYubLvFV7nn8Pfb5ZD7G3VkeLlprGeYlhcS09pmSJ0 xsg8v1tSpXDqM1vLGbpW/G7f9PPhFGYcOYv7+Z3+lya+p2Kgn7o8zB2a7CaXg/ZsIyrA qQ2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=aWQn+KxpM+FCprE+s/1ErFCFT6wlwgu1cIOzSYiq34Y=; b=iFrGrGlf+cQqUGL9TrHQLVGmRf7p3vuHMxaZvMK19s8rI16lukWHovrNkULN6zaAFB bdFUJe6xzX7twuSrRKZusHhdoBi1TFajRI55va89PjRmMNSD+ztolm6haoxS4cVgd0Vt WxiMNZKChOG+6UCEzpI3PzJYAZizt79s3w+DhPwid1An/aeOAZXNSbllcn4YVab6YAvR /kpKCscRnA26UFHGbCygHrsejHFwdR03qGyyvgHPLPrmOmWyYrY92fwKusGJZ/wWcgSj rUOb2bfw6yuxccllfo6T90ShbBJIPNO8PSt0gOWAxk3Z7nCE80hwzw23u7JSu98RhS9H IsPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u31DHUD3; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k24si1888744ejk.354.2021.03.18.09.04.06; Thu, 18 Mar 2021 09:04:30 -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=@gmail.com header.s=20161025 header.b=u31DHUD3; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231225AbhCRQCe (ORCPT + 99 others); Thu, 18 Mar 2021 12:02:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231648AbhCRQC0 (ORCPT ); Thu, 18 Mar 2021 12:02:26 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D26BC06174A; Thu, 18 Mar 2021 09:02:26 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id e14so1524861plj.2; Thu, 18 Mar 2021 09:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aWQn+KxpM+FCprE+s/1ErFCFT6wlwgu1cIOzSYiq34Y=; b=u31DHUD3YRWEsDn0Z43UW1cYn93K/PmjgIvTE+lTPMdMdInO78dLV4meStrFBpNBia +yj+J/NkeZ6BmEBf7KyiOYfsR4kLouQ8FrARjm4Pxghft+FZVrSlThO/r7Ek5FCuZ0hF PTaUI04FhSoidQHK9/8LjkcSvwXgFXWhQxXBXDAexK+YN86zybl/Gim9fmUE2HXO3QO9 SzTBew4P5CJGmp5U2i5wkiIF7QvBrg20blmqWrxoLkWtP+ODGpU8cLH2EgHO288EGwnV iYuRGkiuzp7iey0gBxNPReZljW6FPOa7RxrAYt9mSefrl5d7tijdFzfJiIlt219GPF1H eutg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aWQn+KxpM+FCprE+s/1ErFCFT6wlwgu1cIOzSYiq34Y=; b=EETZrv5mvmqVn5dqAZjVnVIQpNAJC1DGT1MBFrKwAUVbd+fCn6MdjnCcHe7Jd84Kw2 my5BaWLDh5cnGosr0PQjvawjS32LhTnqNtu5UDsGQmzUBpKxUCvp7oVEQsnaaiBzZwH1 LMNINZaQ/Ey2pnu2gkGGyco9JgQO4DUv0qtb8QiJALPjFINdIeMFU6E+Cs/CnfItW4ff QxUZy6kv05nE3bP10hjjWW6pec1/CVmzprhnA7vluEEqFoLfDARMjT2VUNk0nc3tkCsf VzVgMIDlf+T++qfb/QXFKu8ULkprsbt7aSAxTSGhwOZYm1FI+Aje7mdIZxEjsLaOQFi4 /PYg== X-Gm-Message-State: AOAM531nXIjxwoQ90o8UNtGycX55ozrXfbVhiN1aUcxO9Odsi2+2oRxs XPbNUOaB1zxOsh8nKuZdgGQ= X-Received: by 2002:a17:90b:a0d:: with SMTP id gg13mr4978358pjb.29.1616083345573; Thu, 18 Mar 2021 09:02:25 -0700 (PDT) Received: from [10.230.29.202] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id q10sm2533948pgs.44.2021.03.18.09.02.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Mar 2021 09:02:25 -0700 (PDT) Subject: Re: [PATCH net V2 1/1] net: phy: fix invalid phy id when probe using C22 To: Heiner Kallweit , Wong Vee Khee , Andrew Lunn , Russell King , "David S . Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Voon Weifeng , Ong Boon Leong References: <20210318090937.26465-1-vee.khee.wong@intel.com> From: Florian Fainelli Message-ID: Date: Thu, 18 Mar 2021 09:02:22 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Florian