Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3622513pxb; Mon, 30 Aug 2021 06:51:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyYiK3jZ8knNBujSh2/HtJ2QE9RV9b6tmrAQ1UkbfRbnI6Db4KauW6uxBJqjK64OTJb9aZ X-Received: by 2002:a05:6638:50f:: with SMTP id i15mr4048823jar.79.1630331484185; Mon, 30 Aug 2021 06:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630331484; cv=none; d=google.com; s=arc-20160816; b=CzAB7A57+nn5xIXeM7zEDuoiBcmiG/3SJ/NLtEa8dsVdMznw4HQdKVf+VHpc6kThhf Nluouw82hNIn/KEVDTnNB8YncuKpGTN/7RAMXPMqy2UjhusMCsWEwfpC7lXZ9DHAZRHg du+reFQtMWd4pyqy46D5G3we6dWQbLik3QQp+OPyh00A0Cn1C8e4CBIWQk/pBYmaZnxn JHzCCk2NZuek3mK+KoG52mkPpAx4loUSEs+dwrun6cJSAImM/jNvjI8DsGINEbMstEox AjyYlXFt0JPgP5S3jChvxwLYYEpSLQ3/CYSiVV4Yh0ybwiTkqWc47UjeL1QNFgph08tx Dluw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=sEL6//skpXK4Qyqc8Jdde129w8xF3Lu6qgCZPjdrGcQ=; b=ZqTmDHs8ouj7cblBWc7IVTEHfAVU+DSb5pBU/gx3fUucL0C6S+Bvus7ilJ/z61KRxT qhR7g4EIOHXqDkMY4z+ODwCuvinaOK8J798ZUEFuzM6f/6H+JEzhHBFojSJKP20ZM3vG o7bKs5cUahE+L4LS6oLx3eNKBQS2gSTn/Y4qp6h5iL2boWEokMsTA3tWwYQj37qwj8yg LFoMH+zy+6+cFedrAFU+yYUf9I6I/MKQ6KJwl2oGicwrg90H/cgUYe+AP7SooVplalQS XQy7QZW/NI/+M6jFHcEAHOcS8LLfW0bXEOa7+wSvCrn5OvjV/xOieYb4qJQAUSLp7Ctz AM8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=smBI4VAx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si14251689ill.70.2021.08.30.06.51.11; Mon, 30 Aug 2021 06:51:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=smBI4VAx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236919AbhH3Nub (ORCPT + 99 others); Mon, 30 Aug 2021 09:50:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231669AbhH3Nua (ORCPT ); Mon, 30 Aug 2021 09:50:30 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FBADC061575; Mon, 30 Aug 2021 06:49:36 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id d5so3741367pjx.2; Mon, 30 Aug 2021 06:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=sEL6//skpXK4Qyqc8Jdde129w8xF3Lu6qgCZPjdrGcQ=; b=smBI4VAxUel1TB4Wlp0QPxXgQboRnJKcEpl4OcOuGH6xZJbVE2lKRCc966PDCx1U+C 5YImx8GxcydtlVg9a2PYyYmgTHqgHOWYJnvYvPMbzmw0KPBubmblPmwmZRZAQcDG7F6u qSnaBQ3yvDyt7fpMxbSiIYeN/q+WP4403Sn5v5eJo4C/i8r/0dh2PZPcbXgtQ08dwdia jaCHA8HR6W1cD4kuqgtdMObTvy5KG/odhgkhaDaTGTzm7NyTl/U6L6zDRRsIGNUvOgSD WSdWEt4Mr2BxHINBk4U4RzXhuZEPR3FaZyqj0k8ZoX7re2eGwbN82w8XulFV/mR//e0/ 2rRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=sEL6//skpXK4Qyqc8Jdde129w8xF3Lu6qgCZPjdrGcQ=; b=TAojoJnBsFqxT2eVvQF37sMw+YabrgLIXm1lJnIFiKB7kHsFFSUZWJtWStr6Nmv+vD 96v34Ta5cb60c7QtjDObDLse0BxwW+ESw7fHEma6W9bJMTrPjEGN5+/7dwfgEbgysG0u lXEyDVnrjfbPH/BMp+L+9sQzBdZg+graGzwdgg3QqZy+8XQ5X4gzKb9s5l8FgRNLdQmQ HAkOxVm0ulcQd1GvPW5aSRqHh3P+gQEHal6GJTj7ZU/qj3QuU1ofM9ALjCdM1hzgLjfG tTXU1mbiRu774OGr1QILN1PSJPq8nrF7T0mYGuzWqaGF6IzUUC1boLoVHNJdBo5Mh4KK xBsg== X-Gm-Message-State: AOAM532idiCGc/pe5tHGxHU7ETw6vU7byf8gP4DlXeeJgQRHdxycMKt0 YzYEyEPAV0i0Xdi0wI65hxg= X-Received: by 2002:a17:902:6a81:b0:12d:c933:6330 with SMTP id n1-20020a1709026a8100b0012dc9336330mr21632098plk.69.1630331376009; Mon, 30 Aug 2021 06:49:36 -0700 (PDT) Received: from localhost (122x211x248x161.ap122.ftth.ucom.ne.jp. [122.211.248.161]) by smtp.gmail.com with ESMTPSA id j6sm16585933pgh.17.2021.08.30.06.49.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Aug 2021 06:49:35 -0700 (PDT) From: Punit Agrawal To: Michael Riesch Cc: wens@kernel.org, netdev , "moderated list:ARM/STM32 ARCHITECTURE" , "open list:ARM/Rockchip SoC..." , linux-arm-kernel , linux-kernel , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin , sashal@kernel.org Subject: Re: [PATCH] net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings References: <20210823143754.14294-1-michael.riesch@wolfvision.net> <568a0825-ed65-58d7-9c9c-cecb481cf9d9@wolfvision.net> Date: Mon, 30 Aug 2021 22:49:32 +0900 In-Reply-To: <568a0825-ed65-58d7-9c9c-cecb481cf9d9@wolfvision.net> (Michael Riesch's message of "Mon, 30 Aug 2021 09:57:51 +0200") Message-ID: <87czpvcaab.fsf@stealth> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michael, Michael Riesch writes: > Hi ChenYu, > > On 8/29/21 7:48 PM, Chen-Yu Tsai wrote: >> Hi, >> >> On Mon, Aug 23, 2021 at 10:39 PM Michael Riesch >> wrote: >>> >>> This reverts commit 2c896fb02e7f65299646f295a007bda043e0f382 >>> "net: stmmac: dwmac-rk: add pd_gmac support for rk3399" and fixes >>> unbalanced pm_runtime_enable warnings. >>> >>> In the commit to be reverted, support for power management was >>> introduced to the Rockchip glue code. Later, power management support >>> was introduced to the stmmac core code, resulting in multiple >>> invocations of pm_runtime_{enable,disable,get_sync,put_sync}. >>> >>> The multiple invocations happen in rk_gmac_powerup and >>> stmmac_{dvr_probe, resume} as well as in rk_gmac_powerdown and >>> stmmac_{dvr_remove, suspend}, respectively, which are always called >>> in conjunction. >>> >>> Signed-off-by: Michael Riesch >> >> I just found that Ethernet stopped working on my RK3399 devices, >> and I bisected it down to this patch. > > Oh dear. First patch in a kernel release for a while and I already break > things. I am seeing the same failure symptoms reported by ChenYu on my RockPro64 with v5.14. Reverting the revert i.e., 2d26f6e39afb ("net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings") brings back the network. > Cc: Sasha as this patch has just been applied to 5.13-stable. > >> The symptom I see is no DHCP responses, either because the request >> isn't getting sent over the wire, or the response isn't getting >> received. The PHY seems to be working correctly. > > Unfortunately I don't have any RK3399 hardware. Is this a custom > board/special hardware or something that is readily available in the > shops? Maybe this is a good reason to buy a RK3399 based single-board > computer :-) Not sure about the other RK3399 boards but RockPro64 is easily available. > I am working on the RK3568 EVB1 and have not encountered faulty > behavior. DHCP works fine and I can boot via NFS. Therefore, not sure > whether I can be much of help in this matter, but in case you want to > discuss this further please do not hesitate to contact me off-list. I tried to look for the differences between RK3568 and RK3399 but the upstream device tree doesn't seem to carry a gmac node in the device tree for EK3568 EVB1. Do you have a pointer for the dts you're using? Also, other than the warning "Unbalanced pm_runtime_enable!" do you notice any other ill-effects without your patch? If this affects all RK3399 boards as ChenYu suggests quite a few users are going to miss the network once they upgrade. Punit [...]