Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp6180874imd; Wed, 31 Oct 2018 08:01:13 -0700 (PDT) X-Google-Smtp-Source: AJdET5da0ihfaTXBhlYRwoSumg3cU76JECB3lBPqgWyP1XrTMNc0WW6jNAAmEkiUuti1glFI8oR7 X-Received: by 2002:a63:40c2:: with SMTP id n185-v6mr3571203pga.116.1540998073604; Wed, 31 Oct 2018 08:01:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540998073; cv=none; d=google.com; s=arc-20160816; b=ZD+5EdIx5PGYpA6IgpQ3FlQ3ZQ5sR1DUv3pm/+RyYPMVxgXIkOKsyIQcG8XEVcRvB3 XRMGm8NMIAAo9D6D7URfpAz0TyftnJza7CGM74IZJBQ+46AvenF8OnfPXZB1Ojj6Irjw tBuXncmKz/vLK4Cb8Q71/Rg5j3pEiDOwWXxWxpQSrQa9a1bf+J3rU1fPFaiY3fkro5sl GWaECHFSl/68tm5Sm8M3YWdxPkucZ0pCg6eJCl2yZ9/0SfLDy36tIx5y8Oe+zjzdl87X 829NH6+kLoBwE6sljzXncevz6D5RqpmajDF984b2XOaMx7572pnqJ4AYSuOiiIZKEVQG SFFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PHtXs5RrCdqdohthCGtPhzGQ5zxPl+YDYwFG1xdprL0=; b=YqUmSNg2gfZ3IGxSSwhnm4YqKuOgJ19gLv7O7EpC9f8h7atvvPQ2SyH2hOWBOXnoAq fPv7uO7LQ4s29Sih00eO1v/wO0veHJJKTBmmyfsT0rIkiaAKC0yvbYNN/0ExO1cKSWoX SG3AOgFrCEnguVLmD4iOgqvMxp/66w6h6FDCgzjE0Jn7NaoOUucX5reStq4jiXYCSlIk aWEaNgHygH+w89k7NIA/9YzVYETp51bnYdXxLGnfZJ8Rh2xYJJoYBhEf4vXsL84uXoYp vrBVR5jVDwb6FAldtOP+cMyCCSOINU2w1G7VsMLtSWViBIR73NeKZNZW05nbvg1SeOIi OJjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=3CC3vR6v; 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 31-v6si18413456plj.36.2018.10.31.08.00.56; Wed, 31 Oct 2018 08:01:13 -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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=3CC3vR6v; 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 S1729409AbeJaX40 (ORCPT + 99 others); Wed, 31 Oct 2018 19:56:26 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:47266 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729020AbeJaX40 (ORCPT ); Wed, 31 Oct 2018 19:56:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=PHtXs5RrCdqdohthCGtPhzGQ5zxPl+YDYwFG1xdprL0=; b=3CC3vR6vzwVQ+Syyo/8+9SJY7pVc1r6c+jxUW7Ejy7mI1qhBWWGKC8wlGV01G5Y3GjlBCO6t/tQHlaJjWDg1c4DYxvLpjrG8aKrLdn9aI28yVNjFOY1mjjNHsENtaBzlUmgXjywM240QyZkLPLRVewlSvy91OY+lwqYS7dXmUEs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1gHrwW-0006M7-KT; Wed, 31 Oct 2018 15:58:00 +0100 Date: Wed, 31 Oct 2018 15:58:00 +0100 From: Andrew Lunn To: Harini Katakam Cc: nicolas.ferre@microchip.com, davem@davemloft.net, claudiu.beznea@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, harinikatakamlinux@gmail.com, Kedareswara rao Appana Subject: Re: [PATCH 4/4] net: macb: Add support for suspend/resume with full power down Message-ID: <20181031145800.GI20889@lunn.ch> References: <1540957223-30984-1-git-send-email-harini.katakam@xilinx.com> <1540957223-30984-5-git-send-email-harini.katakam@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1540957223-30984-5-git-send-email-harini.katakam@xilinx.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 31, 2018 at 09:10:23AM +0530, Harini Katakam wrote: > When macb device is suspended and system is powered down, the clocks > are removed and hence macb should be closed gracefully and restored > upon resume. This patch does the same by switching off the net device, > suspending phy and performing necessary cleanup of interrupts and BDs. > Upon resume, all these are reinitialized again. > > Reset of macb device is done only when GEM is not a wake device. > Even when gem is a wake device, tx queues can be stopped and ptp device > can be closed (tsu clock will be disabled in pm_runtime_suspend) as > wake event detection has no dependency on this. > > Signed-off-by: Kedareswara rao Appana > Signed-off-by: Harini Katakam > --- > Notes: > I was unable to do a full macb_close/open in this patch as suggested > because it was freeing and allocating the full RX/TX buffers and > this time consuming, also leading to a crash when done continuously > in stress tests. Hi Harini Did you try stress testing just plain up/down, which will call macb_open/macb_close? It could be it is broken already, and suspend/resume just makes it more obvious it is broken. Andrew