Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp6197377imd; Wed, 31 Oct 2018 08:12:33 -0700 (PDT) X-Google-Smtp-Source: AJdET5c6xnsd9sHHPzdGQisNPBfXQ7RFlyj/eyef9AGbKqgtPWVFO577WMKFIC0dCqrSR/BtTDR/ X-Received: by 2002:a17:902:54d:: with SMTP id 71-v6mr3904574plf.80.1540998753151; Wed, 31 Oct 2018 08:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540998753; cv=none; d=google.com; s=arc-20160816; b=pdDVDb1oIgS8JOis+FQb1WP6vwiiOgmCQSOj3nrLCFLvYSUjpXaTUUsfFCBrrTnjDA FWSnm6IK2LRv1WlZhhB9+pqxjxTtV5mYLKURFASozjjLNFufU/QhmRlZmuRJAqTxoldR ThC3MN2/kDfKwH6gVS2CVvRtkWfWT2dp/CShsZcwJ69WiGiV9yGBTJozdkvtl/iqxN+f nEd8wLXouDIAaabT3mPpbiLuLspBdaHrqJGn2UN0zr5JnaYU0x/FiS9kO43hjXtx/y7F yIAarKqt42RG25AyoRVaNkYd7U0V58NKJe0LznauVcWSElOg0WNdmrDQG5m8Dw+r0egS XZvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=+y7oVs92NHV9Bxku2kYiguSBO3ZrYPcqTR8aIVbst+8=; b=KDll1Fbu2ZDAZmgLLf6cuytD6o9BwxEAc1gME04ba6m669Alg6skb3/7xopfF0cwhb SvUot4MCiXWrnl8+vMtoJE5JhHOD9MrPKYSSMrT237XQzYsAi4LkIT97qYw1Gdgespf4 +1BCcrhNqq7y7RaEPEMFyeCQz+LCiz38GRMXYKdurySbtVFLuM84X7svMrneGEYRw21e Rc3bZQ4ml0XknJCptOIiqPP8V2JlIYI2HHJidPHlzgtxYDbkgkNVMsMlUqXYLkDEPR2+ coRnZgB2B565Ma7/r0yzwEf1HQbwiD9Hc5Eu5Y3AF+NAdC91g3TBYeg70SEKkMa9OvnD kDUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y22-v6si25780762plp.371.2018.10.31.08.12.08; Wed, 31 Oct 2018 08:12:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729622AbeKAAJB (ORCPT + 99 others); Wed, 31 Oct 2018 20:09:01 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:36454 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728649AbeKAAJB (ORCPT ); Wed, 31 Oct 2018 20:09:01 -0400 Received: by mail-oi1-f196.google.com with SMTP id r127-v6so12159306oie.3; Wed, 31 Oct 2018 08:10:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+y7oVs92NHV9Bxku2kYiguSBO3ZrYPcqTR8aIVbst+8=; b=uEiBN8hChEGpnlXQ7OPrjOyVCIMa4jb5dieIv4tBnIrDviGURO27BlsOECarWOVfwW 8Kn2IPoFG1j0quCaTvBGmGRBWx0+ZrX3gNGLgKR7R0MmtKH+Qel+6Ss8FMq89VvGWZ1/ pDs65RpiOXgx+gxpooc0rZiqUTKBYYQD9VaSkP51ytfi3aGEPknlwxsu4YshCz7jLciK RQlCQqHZxlFqjakTYrImug/xS5GOJRLafHMNx/6hhWvcPHvoBGGXE8JxnQ/MGp9sogvQ +z+55yfMFo0U5pRa4JVDM1ar6u7ct3xGnp17uh6IgbUTeIwTy/4kDLypwuO6tte8deoo N5mA== X-Gm-Message-State: AGRZ1gLHhCPW3HnZgNDUdhmwyqso0iput+cZ6o/fjCYyJyRYlhj2+wBS hB6QYJIX8gUT7xK4LUF+VLqO2bYKhFE82pmNUS0= X-Received: by 2002:aca:6854:: with SMTP id d81-v6mr2069710oic.18.1540998636150; Wed, 31 Oct 2018 08:10:36 -0700 (PDT) MIME-Version: 1.0 References: <1540957223-30984-1-git-send-email-harini.katakam@xilinx.com> <1540957223-30984-4-git-send-email-harini.katakam@xilinx.com> <20181031145400.GH20889@lunn.ch> In-Reply-To: <20181031145400.GH20889@lunn.ch> From: Harini Katakam Date: Wed, 31 Oct 2018 20:40:25 +0530 Message-ID: Subject: Re: [PATCH 3/4] net: macb: Add pm runtime support To: Andrew Lunn Cc: Harini Katakam , Nicolas Ferre , David Miller , Claudiu Beznea , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Simek , Shubhrajyoti Datta Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, On Wed, Oct 31, 2018 at 8:24 PM Andrew Lunn wrote: > > On Wed, Oct 31, 2018 at 09:10:22AM +0530, Harini Katakam wrote: > > From: Harini Katakam > > > > Add runtime pm functions and move clock handling there. > > If device is suspended and not a wake device, then return from > > mdio read/write functions without performing any action because > > the clocks are not active. > > > > Signed-off-by: Shubhrajyoti Datta > > Signed-off-by: Harini Katakam > > --- > > Changes from RFC: > > Updated pm get sync/put sync calls. > > Removed unecessary clk up in mdio helpers. > > This last bit has me worried. > > The MDIO bus is a shared bus with a life of its own. You can have > multiple PHYs and switches on it. The PHYs can for a different > Ethernet MAC. Switch drivers will expect to be able to address the > switch when the interface is down. > > The FEC driver did something similar for a while. I had to make MDIO > read/write runtime PM aware, otherwise i could not access the Ethernet > switch hanging of its MDIO bus. Yes, I understand. But I thought I'd handle it when we have a separate MDIO bus driver. As of now, with macb, I do not see a way, for ex., for MAC1 to access MDIO0 when MAC0 is suspended. However, I will work a bit more on this solution. With the clk up, I've noticed that there is atleast one PHY status poll that ends up bringing the clock up after the MAC has been suspended. Of course phy is supended immediately after that but it just delays this full power down process. Regards, Harini