Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp327466imu; Mon, 26 Nov 2018 22:27:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/WsVuQsk78MZ9rxtPIiZFmWYS43Y/RmmyljuUPrwIFkgE1qJyNymbteAnzDQPn7VsS/CxVe X-Received: by 2002:a63:2054:: with SMTP id r20mr27969140pgm.328.1543300061647; Mon, 26 Nov 2018 22:27:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543300061; cv=none; d=google.com; s=arc-20160816; b=p0i8CevERS0cK1zSSAyErzlKj78AMtQFQeidZd8Wq1vpASMVko1y5BYc/q3jKIxbbI ysaGwgKi8AzHZJU53wbko47ShadOjs3cE7HwfhTB9+S3MSadLx9dRlr6AI/miTZzG4c/ V4t6qeO5WjEPKPhDjhQAjfnh4bwiw5zd8/Uw1Yn6zHAOE93U2d8IFdZ85amFVUshc38L dKpMp/lDq2KNufU50FFbJM3/d3qMeAWxIsuiCbPC6k9qfLpT/1TgEK7hKW4U19fgHVoy iKNLF2MbTTE6xYm9bPzobEuSOa8INA54ArBZ3EMnTW6gm+n50o3CwfygASqYf4FUC2Th h13A== 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=xBGZS2iSGQKOpLGh4MPzN1VqDyg0NeZrjdJ7gFacL9k=; b=KofpzAuViuCjryMbeMraJlNpwQDRekIhdLuuNyeJgbhSNzEQDOKyjqN07UE/K9CvSM jrbxl/TSkCJfuZvKSyTRiJOqQpHthEyXzK04OtfZ5KFrBB1ZNjTsbmsdgaNnq99IoK+P e1eegEdm4NxLup6/hNRObQLMBPFpbgCiW+jFqkYV0mezmDX4LaiIUfnbTKTZIGpwd4/u D3xyoSRLTDDvVr/b16VZMNyhVogQcgTjVmQ0L9sHVKouGq+FZb2ZAQyn847ErAxXmgOU 0/96APrCSiZfvz+uCeulTRo1AC+5/ac+WHZqvKOXkScC5IQVIJ7WkTtCpjUduuwFsoHq Pf3w== 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 q17si3369595pfc.198.2018.11.26.22.27.25; Mon, 26 Nov 2018 22:27:41 -0800 (PST) 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 S1728896AbeK0RWr (ORCPT + 99 others); Tue, 27 Nov 2018 12:22:47 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:46254 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728870AbeK0RWq (ORCPT ); Tue, 27 Nov 2018 12:22:46 -0500 Received: by mail-ot1-f66.google.com with SMTP id w25so19091908otm.13; Mon, 26 Nov 2018 22:25:58 -0800 (PST) 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=xBGZS2iSGQKOpLGh4MPzN1VqDyg0NeZrjdJ7gFacL9k=; b=IPR1LoWJkzbJ357wjycXfmBIdl6isd6pnPcELgtos346jIsmzNAV+pmd3J9Ofk7Yi2 atnyzy2+LL2Uqn/8ulZv5ozQ+ej2RL4TUgxI2ONBHNBT4Ezk8+UxlTxGwHoSxjmQVXCU /gTBAlLXpwHNsh9lzhbcF28wuojDUVWDGF5VYHi/zi4lMFyBTyfy9pRBdjkqTfT8Yk4u e5Alc0KraxCtG2tQP0r/Ej+hg9/t1phQ9RWpIuQbW4newwpKzQx/w9TDNTLU86d926W2 Y+F8lAhiBCVi7t6rDxtaRPhrD35kihuwPmNROfFDbSTm+JZXvbMXJu4Fp05o/Fiomy1M FrMw== X-Gm-Message-State: AA+aEWah70w+VQ5ZtYuFu1Yn7fwgEE8swUaVyhpxBSjBL5iwwVmmASHY xMyBvMg/qBZN0bQi6UkFS1xilNcxBGPLliySJiQ= X-Received: by 2002:a9d:1421:: with SMTP id h30mr1812025oth.321.1543299957895; Mon, 26 Nov 2018 22:25:57 -0800 (PST) MIME-Version: 1.0 References: <1543216072-9623-1-git-send-email-harini.katakam@xilinx.com> <1543216072-9623-5-git-send-email-harini.katakam@xilinx.com> In-Reply-To: From: Harini Katakam Date: Tue, 27 Nov 2018 11:55:47 +0530 Message-ID: Subject: Re: [PATCH v2 4/4] net: macb: Add support for suspend/resume with full power down To: Claudiu Beznea Cc: Harini Katakam , Nicolas Ferre , David Miller , 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 Claudiu, On Mon, Nov 26, 2018 at 8:16 PM wrote: > > > > On 26.11.2018 09:07, Harini Katakam wrote: > > In the previous version you said you encountered some crashes while > stressing this part if macb_open()/macb_close() was used in here. Could you > share the tests so that I can debug it on my side? Sure, my tests include doing a series of suspend/resume -- it is done as part of a random regression script. On ZynqMP, it includes the following to do an FPD off suspend and then use either UART or WOL as a wake source and repeat the same, sometimes pinging in between: echo pm_request_wakeup 8 1 0 1 > /sys/kernel/debug/zynqmp-firmware/pm echo pm_force_powerdown 6 > /sys/kernel/debug/zynqmp-firmware/pm echo enabled > /sys/devices/platform/amba/ff000000.serial/tty/ttyPS0/power/wakeup echo enabled > /sys/devices/platform/amba/ff0e0000.ethernet/net/eth0/power/wakeup echo mem > /sys/power/state ping does not work sometimes and after a few iterations (sometimes 20), a crash can be observed tracing from "kfree_skb_list" to "macb_free_consistent". From the flow, the only explanation I could come up with was that there was an attempt to free buffers that may not have been allocated. Also, this was time consuming in the suspend/resume path. > > + } else { > > + macb_writel(bp, NCR, MACB_BIT(MPE)); > > Just asking... shouldn't other registers be restored here after SoC power > is cut off? Ideally yes. But in this series, I'm just attempting to re-initialize to a working state. I can try context save/restore later. Regards, Harini