From patchwork Thu Feb 15 18:27:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Chen X-Patchwork-Id: 201723 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp81594dyb; Thu, 15 Feb 2024 11:49:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUTWWzC8tatFLss9Tboia6SBb0lETlWe/++AUYv2SqmdF4TxxbP/q5ejEMGMYlSwRWeKXHvnpBmUcDgCXzANExvgGVpRQ== X-Google-Smtp-Source: AGHT+IHB0cr7jK7L/r8AgZIbo9sMYHmteIiFJZMMXVIEqgLwAK5K7nBhpw/LPCwm1+BGoKo8/9c7 X-Received: by 2002:a17:90a:bb89:b0:296:4c7d:8fca with SMTP id v9-20020a17090abb8900b002964c7d8fcamr2859065pjr.25.1708026585737; Thu, 15 Feb 2024 11:49:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708026585; cv=pass; d=google.com; s=arc-20160816; b=tYxiX4UUZ5EBEJi3fL8q4BjA4L9XSS5WZNQ+t/7aItyKrEA/OOTOARKsMPWUrQZ20c XeGAdKXOzEdPjCj+cjnbns0yIiwWKumy5tviJHMPmFIQ1uahzxuLPkJhOEyflCVAUBXj Xb5GlPl+2SX1t8DOXw959+/wlZ953A59ODwEGjuq01AfkMOQMntaY5zwqWm9mDf63Y+5 jcP4eO5UXYPNg/3WLcEj8IR/Bh8E7xh8CWd5EBuxEzYuwF5L5imfhkKYyZ4oUbgI+9fF m8c4g8up2yx+TVFHwcaKQiSoskP4685CXP4p9TNIAZ3/Xb0IrDTUKMXr763mzwudSu1Y gWNA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iWvamRPa010oDBPvLHGOQI7U/I1KkMGFzljSlQooH4c=; fh=l2OKHc1IbmjwtP84rQE5m+XX6I0z6uuk/Evrdgxq5/s=; b=xbIBjW9Sdy7cir4DvLVUKjzrllWywXTt95cPeURAglQYY45WtSpnulSHhnYOYRXvl/ 8S8N35/H/x4IUxeUPw6vkL99U4KtUq+mr3KHxKn51JZbWX5Y9JnyD93R8ejFgMYPBGCm WtLmkTwcbVvOg50TJHJ9spZQEQKEbjI3bbnjIO6AREC4zx28eRk8Bu4d7x/fMdIaf6rQ tosRqWAzdyMBROizD4vIX1cW6mYLAH9XA/ZzLNaumiJBIH7GrtRMx00gWu8AuxwBf4SD Z+SasNEblV4E0iaCM8FSW7gm+W/Vz83DuginafnOMJhWn9I3CVUQxE1c9Z/3Dbu7HSiB updQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=G0H340WL; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-67507-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67507-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id sh2-20020a17090b524200b00298d20b379bsi1695570pjb.68.2024.02.15.11.49.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 11:49:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67507-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=G0H340WL; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-67507-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67507-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.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 3A99428F7D8 for ; Thu, 15 Feb 2024 18:32:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9282E13AA4F; Thu, 15 Feb 2024 18:27:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="G0H340WL" Received: from mail-vk1-f171.google.com (mail-vk1-f171.google.com [209.85.221.171]) (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 1D71713A26F for ; Thu, 15 Feb 2024 18:27:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708021660; cv=none; b=oCbEigJS71gEfP6p8CkEqsPEa9aE9OKBdPTT/D3x88tzt06X6Kv7P0eWhdmHcHV7SzZmLC5Lfvf0igupQOwNgwTsAmBWElzXCygt2s7NhfnXDV5mc4eEqR13q1+HcB8Y2zoVFGcxJGYcfMLKXdtD0DtNiA6PccjiXaKmew1RvYY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708021660; c=relaxed/simple; bh=sf2J1R72NttaMwiXPSuml6mpSaVqcNW49OejKEyn4DY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=kSYpk8ay5eolMD03j4JWyd261HFosOYnpBAfUWEK3UMixUJ/bEV9SNZ+EN6dFOzSw/we1V8m6deaswjZk8gd1Szz3qIDC7SGHk5UngEjIIPfVZhPTZzQ87oyH4MkUFEoGnkDozFwJuXz+VEVN8feEbMIFKfbTrA3oesTDicUxGU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=G0H340WL; arc=none smtp.client-ip=209.85.221.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: by mail-vk1-f171.google.com with SMTP id 71dfb90a1353d-4c02af52a21so455606e0c.3 for ; Thu, 15 Feb 2024 10:27:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1708021658; x=1708626458; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=iWvamRPa010oDBPvLHGOQI7U/I1KkMGFzljSlQooH4c=; b=G0H340WLfqPwQtIdAQc5MFkoqvPzScd55OW7795IoV5QUCK88zXY2bGcA07d7WEgRH sSoUAjvV4GWuaXW/af5vcRosJO8jPshJEcchrq6K7+Ypg3iJjGBHp5YhSN6Hc9AjpF2s SMJliLZuw0cD2AB6QWL+6Odr6iIi1k0jjf7WU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708021658; x=1708626458; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iWvamRPa010oDBPvLHGOQI7U/I1KkMGFzljSlQooH4c=; b=KRuBuV+4x7YIPQ/MVHhXMKg1faVRTVqGBJ2sImSFCC0Bt7i76Nun0x4lrKyTE4g+ZO 2GA700Tm6CBmLnGVPAKCGqM3RIn4BSgGAZGTNayP8PFP/AYpdGApJTCr5siwX+36t1ZF wFILKxBQjBzgzro3Xir4x81P6LpWuizm844W5sTZQUJWtOfyHOY6Nuu2DDq2bR2qBHRS KQnKJVzdiqG8BMAiSUPic/jLxfp1Wx1I0XyNMc2LuwZxz4lZOkBka0lX1qO6yrZCjQO1 ZhvJbpCVash/NQznvMErCTU6LvZOwtybHDji+1diqjzydlVji72kJYw0zOFWZOpm55LD edUg== X-Forwarded-Encrypted: i=1; AJvYcCW6wtj+BQZJfLcPvHAhvKGSesylYl+fxgZPPVgQVgJQjq0r6VgkbrU9aaweTLksfheBGBwbn0qhjcA39ft640/nXA1GQ+94+KeCmo2N X-Gm-Message-State: AOJu0YzL4VLRdmg0qFxnE//mpq//4rweUQeIGumGSTqqkwLPFFDWGtlx hF0TA8v0ckOx/5y+grulho/kMsM6YRVHCjupPKoDdPT6D9nGwLFV6w/ry5rhkw== X-Received: by 2002:a1f:e042:0:b0:4c0:fda:7d8c with SMTP id x63-20020a1fe042000000b004c00fda7d8cmr2724538vkg.2.1708021657784; Thu, 15 Feb 2024 10:27:37 -0800 (PST) Received: from stbirv-lnx-1.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id mf4-20020a0562145d8400b0068f13038031sm901515qvb.5.2024.02.15.10.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 10:27:37 -0800 (PST) From: Justin Chen To: netdev@vger.kernel.org Cc: Florian Fainelli , Justin Chen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , bcm-kernel-feedback-list@broadcom.com (open list:BROADCOM ASP 2.0 ETHERNET DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] net: bcmasp: Indicate MAC is in charge of PHY PM Date: Thu, 15 Feb 2024 10:27:31 -0800 Message-Id: <20240215182732.1536941-2-justin.chen@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240215182732.1536941-1-justin.chen@broadcom.com> References: <20240215182732.1536941-1-justin.chen@broadcom.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790995685437438907 X-GMAIL-MSGID: 1790995685437438907 From: Florian Fainelli Avoid the PHY library call unnecessarily into the suspend/resume functions by setting phydev->mac_managed_pm to true. The ASP driver essentially does exactly what mdio_bus_phy_resume() does. Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller") Signed-off-by: Florian Fainelli Signed-off-by: Justin Chen --- drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c index f59557b0cd51..6ad1366270f7 100644 --- a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c @@ -1050,6 +1050,9 @@ static int bcmasp_netif_init(struct net_device *dev, bool phy_connect) netdev_err(dev, "could not attach to PHY\n"); goto err_phy_disable; } + + /* Indicate that the MAC is responsible for PHY PM */ + phydev->mac_managed_pm = true; } else if (!intf->wolopts) { ret = phy_resume(dev->phydev); if (ret)