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: 13559055 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-vk1-f170.google.com (mail-vk1-f170.google.com [209.85.221.170]) (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 3D56E13A86F for ; Thu, 15 Feb 2024 18:27:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708021660; cv=none; b=OzKq9P5F91QVElNgNBX266DdhxLEpCW8P0zGFIUcEM+h4gB/aFXqCcQJVL7cMVfR0uQ0DNLd1els9JThP8aM6WuhMR2lqITWE9VQqqrT58As3pXQVhSp2Q2bR4XVeFzIbmuAqTOO9Za2dJVBC53ZBz+1vtQ9uch97pGCtJqV8es= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708021660; c=relaxed/simple; bh=uojcWBOoSn7XqblZfDYnYRLq8qK0Q8wxNU53TgQOzMg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=Bc4F+J0iRJAIT2/hlU0dKV06VnpqzGpCiqQ/GZ1tmyq1JK6asPBgj5UEtXTTSfKX3jSpxSxXYBkYKnYp2TSSCxxoJW2J9zzmx9pFPwtjISdY+JWjP+vY53/MtsOpfx+BLXnWZHtL0ymrC8DLRMqV4ZtDboCGsfeyHfcXzK4q/+4= 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=BT8i8J9b; arc=none smtp.client-ip=209.85.221.170 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="BT8i8J9b" Received: by mail-vk1-f170.google.com with SMTP id 71dfb90a1353d-4c0375d438eso447742e0c.0 for ; Thu, 15 Feb 2024 10:27:39 -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=Dm9N87hfmQQHAIvjJyt050gbg8DpzraaCt9t68u+Ocw=; b=BT8i8J9bmhC96ME4+BZ9JgShGt+MvMXBO4b4y1e7HTlwPrQqQJWAk4+OVYK64JFSkm OUPBLw7VHRf15aHubpGzqt1AabHmnnuFnlcG3N6ghdM7jpSZ4s8z6qB35uBmw5aYOhwg XfCdN4CxWfV4sbl0b2a0BBtTr2bA1BOkZAkaI= 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=Dm9N87hfmQQHAIvjJyt050gbg8DpzraaCt9t68u+Ocw=; b=HLzS8mqx++ve5okqrzrL/Az2n2+IyOj2ZzDJ/QcPFZj1DeNf2QUpcj0QR+8kCAYsXk WkBK0fF15zUMokeizcmdnWRmyT9E8kKSx2Y5PSKPpvz5UrJjBYknKUL0hJ2n/VbQz4Ig VuDB1p6pRJRp8jiPiNWLE/vCVLr6BoEoSX040AiyEXMn7S/nV6BLMl/3aC4W/0yVD3Qo IGNa+4BVH5rHIkxHZ4JncOWb4OJAyAIb4mOW212ty7GKZFW4TjCEVCJ6IVQgcgOZBs+i uz7y2HZtqWkeFXtdxuS4zvnM3MF3Rcq+aFOBWW1eq2XJyOXH3QK39IhJyoTLFgjLP8t+ U86g== X-Gm-Message-State: AOJu0YwWDAnSZoNvor5J0xY9Ut3NUKHvjIGZkoqvecKNwT8Vt9Cv2roR FvBvqyvBaQuQqGvk18POwlDtkBb3c3YZilSYzd6sYZ765ADT82/olnKSLseLLGGgtj80M9ZE5Gu C88Agog73Lb6mnKzpUq1HzKy/k3OGP9+bZ6f4BtrTsyVb/62YH5y49HUcPY5QpxKBl7TvJR4Rjx DQiY5GlPfWJmRf2EeTHl7Y0y/Qcn9W35WJKYpsyl8r/w== X-Google-Smtp-Source: AGHT+IEJrb2s5dSVNf4U1V5s6hi41ipLrWEX6HPDvSozHkleaielqpnvAD2/Ofm/m/mdGTo5JNzabw== 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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org 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)