From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH 4/4] net: macb: Add support for suspend/resume with full power down Date: Wed, 31 Oct 2018 15:58:00 +0100 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 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 To: Harini Katakam Return-path: Content-Disposition: inline In-Reply-To: <1540957223-30984-5-git-send-email-harini.katakam@xilinx.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.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