Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp6211225imd; Wed, 31 Oct 2018 08:23:31 -0700 (PDT) X-Google-Smtp-Source: AJdET5f8BgfwlFpu5QA/5twDkcOj/LCD5yg6XBnp8mWNz1hpUd5H7viEKPnqA5J0VeKl/vzJbN6F X-Received: by 2002:a17:902:2909:: with SMTP id g9-v6mr3787097plb.223.1540999410972; Wed, 31 Oct 2018 08:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540999410; cv=none; d=google.com; s=arc-20160816; b=QK3i9ECdlS8pQpRuOeRnvZFV7DsbVSSTKTWE/F8PfgS5ejuw1qGSfudeRIi/jgLliF Qe0SzQWJQjUPdQdpxXYJlJ/PZQD7QJddNaqXz2bTW0NYYUmhwCP9A1DkugeNIncRTTVL IDnBNvFKEMX3BjSDBliTPeLBt8wojMCPLbXQ3DK5i94qi7uY+Bmym54a3PdNN/zB92hK fZ6iPWAQnKe6A7lcZKKILhlg7qR/mhLZOQhKHKAUJm7AD9UUbonUoI8MFV+A5QQ6gHrD vEfFBHbzUXU1WGUlM5ztY4Zdzj8BMsm8vnOGO3W39htiWITRWwG10VU0VSw7sHbUM+Ie Boxg== 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=ibRZI6aIz4wh04r/1HxeYMbX3fZA+39uljlCWKlaFuI=; b=UfMex5qgVV7Y/xUsddiF0r3UJqFM1CnEXb1147hgcvbSQZABjsH79UYnIjo9RjckUB VjdMJJmyh2X0f5fbFIBh36yEMae/vqNK57WwRoGVT3uIr8DuhCmMyZ7OEhTK8+NmzA8K HweP3IvYtytG+J9XQzGSyaE5r1hchCPW86RAjOvST7zBn2NS+grlReuvriqexI3lErdq YIiqFK2dgEWhNbZ4tFntpbYhpHuaS4+DVutJmFlpZQ468hmVzosozZz6WPGMqpi0QY2y Dk+XxgfBcShtzeDAvYuWLr7neUJp2XLD9FU449a5TalTJUjwJO10yKNiMxJi2DzWcJrB mplg== 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 31-v6si18413456plj.36.2018.10.31.08.23.13; Wed, 31 Oct 2018 08:23:30 -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 S1729002AbeKAAAX (ORCPT + 99 others); Wed, 31 Oct 2018 20:00:23 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:45964 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728848AbeKAAAW (ORCPT ); Wed, 31 Oct 2018 20:00:22 -0400 Received: by mail-oi1-f196.google.com with SMTP id p144-v6so9967041oic.12; Wed, 31 Oct 2018 08:01:59 -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=ibRZI6aIz4wh04r/1HxeYMbX3fZA+39uljlCWKlaFuI=; b=XUIRRvPERL6sAdYu/klltGrd9ChSd/Iy/oz22WjbgNUJsnKh0+/WAEjuEqlOvLGpBa UUk5y8dwoUWC1Dyoi0KZQXTdhhjSgQfyiQM7LLe3HN5i1PafB3/pNH6rwoqKE8oIbO/X 8wlzgiknPEJVf4Q1Eq9lqlnvtaWPr71KOQElCbTN/TPfe96o7xUrVzFJfbxWQRe+9lmx LP1j/49mWRiOGER/lEePmEAzOH25D5ni2cUPjX4msDPPOPiJCzntkbybUP0+db3Gflpz /VbyfFeNv88Gk6aXXz8Krq77U1ZExqXX1L1bVzcppcx2VWyPKHtLa+ML32WqJB+e7/37 ZMyQ== X-Gm-Message-State: AGRZ1gJUcvn25AcVQRqirJrT6pjKR5YDcbjE5Zfcy3rJnpu5+d+yO3yp Higfqq8kTmn1HAqzGVJfQOjnmNG5t88yZvXMJRCI6g== X-Received: by 2002:aca:d694:: with SMTP id n142-v6mr828147oig.32.1540998118732; Wed, 31 Oct 2018 08:01:58 -0700 (PDT) MIME-Version: 1.0 References: <1540957223-30984-1-git-send-email-harini.katakam@xilinx.com> <1540957223-30984-5-git-send-email-harini.katakam@xilinx.com> <20181031145800.GI20889@lunn.ch> In-Reply-To: <20181031145800.GI20889@lunn.ch> From: Harini Katakam Date: Wed, 31 Oct 2018 20:31:48 +0530 Message-ID: Subject: Re: [PATCH 4/4] net: macb: Add support for suspend/resume with full power down To: Andrew Lunn Cc: Harini Katakam , Nicolas Ferre , David Miller , Claudiu Beznea , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Simek , appanad@xilinx.com 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:28 PM Andrew Lunn wrote: > > 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. Yes, I did. Plain up/down stress tests do not show any problems. Regards, Harini