Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp774340rdb; Sun, 18 Feb 2024 11:03:22 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXkDMB5Gm+pItFCdUW5mv+tjZ4LLsV5OcId91hOJAYGGThpore9//5pjqsmpnU1O1o6NL2BXgZGqt/jEcD13EeL/9p/JuLelQrwIw6Wjg== X-Google-Smtp-Source: AGHT+IH6oWo7poMYI+bakYn5M4tfCAIo3jeVFkr9dbbEriM/OCIiZL8M7muS5wHsGr0H2Ma27USw X-Received: by 2002:a17:903:245:b0:1da:22d9:e7fd with SMTP id j5-20020a170903024500b001da22d9e7fdmr9111552plh.20.1708283002244; Sun, 18 Feb 2024 11:03:22 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j1-20020a170902da8100b001d8ceaa1a4csi3234428plx.427.2024.02.18.11.03.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Feb 2024 11:03:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70523-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=blQQNtMw; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-70523-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E2B89281FAC for ; Sun, 18 Feb 2024 19:03:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E7D171B58; Sun, 18 Feb 2024 19:00:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="blQQNtMw" Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D2236F503; Sun, 18 Feb 2024 19:00:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708282849; cv=none; b=EFgCmRkW2emJXiv5M7RriLnaCr91CpXEL4nQph8X2JB69xhi9rzdzt1n51Seg4XuSmEQcd2yZtnO7yrVUnG26bR5v9NFEv8xp/1YHi1yPCZX3MknjII8gUaLegcKQAdlmKJerQjVuiFP/Sw+uBAfrNDtaUDwjywlrx5PSstLAIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708282849; c=relaxed/simple; bh=haKYsHp4CkJD0gLwDin3HMHYGes9vTGE16+z/nBaGT4=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ojKA2/7R901SRg/G7yRRL2Is8PvbRGoQFk3hLaThO6z3zO9GLAZfdc9am9N50oQBcGHbNZ6eM84i3FYY2LZ+xjuxBklm9ZZPzeJzRvdvqcN2W84Sp5Ofe8DnELmDUbYhF90ecC5Pa/WMpuk36loQwfm7VqLqGwK2mqLpQbdObI0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=blQQNtMw; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4126144d931so6064135e9.2; Sun, 18 Feb 2024 11:00:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708282846; x=1708887646; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=RlNoi7vy5vrkW9XYEYtxG7NDJi03n4jp5ZDDUFrxYTc=; b=blQQNtMwegXV0YkExG+ho3A2LXoKry1KOMIMmwxvSq2zdkKRClfI2h+m+tfdgBVOSl shVP7BE2hECjIF8BvUZNVBD9v1WeNVC6G1w5D+WaxNUEqIkIrlDxCsLOMUBsPqNP4j25 B50E+26+NuBJla1zpGNJfjEVcXdy3pRsZ+f7UONWUt/2MttLjg/WK/RpznSja4oYzVTJ NtZs4y0sPvKUMPWaoGQSQUraXtt6I0fTUqqW0wc80OrYeu3zlgMmFXlPGaUG7DltwvPn NC/5/2K1ZbFFfqUD/NMEXsfKz4olDfg9FhOn/c5/jADXZGFZn//I7e41U9+VNIalP2B0 domA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708282846; x=1708887646; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RlNoi7vy5vrkW9XYEYtxG7NDJi03n4jp5ZDDUFrxYTc=; b=dT1DR1bKOPOYLjPIx4OPKiNABQ9MV5pemM9lebfurhCkyptu8IuLV8V4m8ibUt+YTC /aA6Ypk1M5yZIeufyWGPLXDoIj3eda0fLxFo1wXFOBNXljZrYkHhEo1yBBjecy9l8TiD ACMudy2QdexUp9HGWvrVJwa1JVApgIJ7nwWyNMYInWj8U/K8UJVRrWdXuVYICbg7q3np K4JPzH9mcLgqnO99FuwDD1pXhNlqEE37Sz/qHDfWQPkjU3DuGUeZNF46WmNv/GSiYICc FsBMZZsDSAV8b/Du6JaSbKWipWaTlgpvsOJfPyGZZ+gRaLI/NxVIFveI5/l+kGH+YH5B zvGQ== X-Forwarded-Encrypted: i=1; AJvYcCWKhEeM0l1xdTXFIr0ujXsRukk3Fz/OKSm2flGp5bVMOxY8rclu1Pp5M6EvtPZa9GODGJPeuLo9BCAaqfCCOXNvmbor78jiBTgFM+Or4BII4Um7nBigo5efgCrygTmBNEd3adac X-Gm-Message-State: AOJu0Yzfbg7Efdax6snobG/xo8bkhNsHmIp0a2mx98UCyNgiJIwIP36m YJ/JRVL+fFRuS0+6eIe6W6p01HJ43B9fTKnrrOIUMRYuWIYieiCV X-Received: by 2002:a5d:5487:0:b0:33d:3ee3:cc0c with SMTP id h7-20020a5d5487000000b0033d3ee3cc0cmr1403020wrv.48.1708282845633; Sun, 18 Feb 2024 11:00:45 -0800 (PST) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id m15-20020a056000008f00b0033b728190c1sm8115762wrx.79.2024.02.18.11.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Feb 2024 11:00:45 -0800 (PST) From: Christian Marangi To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Broadcom internal kernel review list , Christian Marangi , Robert Marko , "Russell King (Oracle)" , Greg Kroah-Hartman , Pieter Jansen van Vuuren , Nipun Gupta , Andy Shevchenko , Puneet Gupta , Abhijit Gangurde , Umang Jain , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [net-next RFC PATCH 2/6] net: phy: fill phy_id with C45 PHY Date: Sun, 18 Feb 2024 20:00:28 +0100 Message-ID: <20240218190034.15447-3-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240218190034.15447-1-ansuelsmth@gmail.com> References: <20240218190034.15447-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit With C45 PHYs that provide PHY ID in C45 Package regs, PHY device phy_id is not filled. Correctly fill .phy_id from matching dev_id or phy_driver info. Signed-off-by: Christian Marangi --- drivers/net/phy/phy_device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 9b96357e4de8..60a60f182729 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -3476,6 +3476,10 @@ static int phy_probe(struct device *dev) phy_dev_id->phy_id_mask = phydrv->phy_id_mask; } + /* Fill PHY ID with dev_id if empty and PHY is C45 */ + if (!phydev->phy_id && phydev->is_c45) + phydev->phy_id = phy_dev_id->phy_id; + /* Disable the interrupt if the PHY doesn't support it * but the interrupt is still a valid one */ -- 2.43.0