Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2473506pxb; Fri, 17 Sep 2021 10:30:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz98+BfXZNuQY80p8Tog4t7EQ1t0nF+zavC1x4bmU/FklrrxFZKoPEhTnzaDbyTGoo4MCzU X-Received: by 2002:a17:906:8981:: with SMTP id gg1mr13591042ejc.95.1631899809418; Fri, 17 Sep 2021 10:30:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631899809; cv=none; d=google.com; s=arc-20160816; b=yre7c3MPlr1QCUn/1yHdaOZ/Tl0jotdlsxHIyY2JKV7zLR/cJeAHOQHtWxWUnEZgwW nQMjHSFfMunC7+2I0iR5y5rBajQ0ArcbD/SsjJWtaS1avVdpVCD9uJhBiueQyte5tdar JqNEq3px970VCKsNTbX6eDw0KlRzUmTOSuWvVeM2IQb0wbAWiOrn2uESinGZd+mrglsr ICMQbOpgNtgAWT8BZDJNeZwiczFHM159DCXO8gjo3qPmTre4W64Bn2YZjdbIP+bKA6JO 8vk/35T18N91kGOSOziYf8/qtLTRJwwMziKv9pD1kaZh+spZoZwxeoDOeAuZZruracgA Byvw== 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=KKt5AWTLK0tIOKcdr0XGkLxMl+Fod9jsU5NOqvL/LwY=; b=p24F4wY4BujPYD2/toZGTM1K2/aBfeulrx1mFdZ170LzxQRU4xhXKL67+CLMy93r5A 3SXzX9ZXqj+5vv8BhxlwhUn9Lv8OuXMi2xRcOOMlz/ZQKI+phOAQDC2mgGSLyuZt2xV+ ugxs7yR+evWB35KJr5Ozp2f4zcn6JBxTDC0E9+eF/VVl0hJPbLAxjKvPwYuQv3rGCmgQ VPZEgtjwdDKxsj0ajK4Bq5WTIAwxeWS1IpQSrwVsD/t4eh9adk/cIP9Pbel0b5mKIi7l kaWsNwcFbcNGT8P/lk7CKKvfbiuI7pi7QuuIOHPR8e8tJxfh3E+PDJzgleKW8sbIWETD VlvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OGNcv4U9; 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 g15si7704360eds.75.2021.09.17.10.29.41; Fri, 17 Sep 2021 10:30:09 -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=20210112 header.b=OGNcv4U9; 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 S239460AbhIQHUd (ORCPT + 99 others); Fri, 17 Sep 2021 03:20:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239196AbhIQHU0 (ORCPT ); Fri, 17 Sep 2021 03:20:26 -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 414F2C061764; Fri, 17 Sep 2021 00:19:01 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id me5-20020a17090b17c500b0019af76b7bb4so8705804pjb.2; Fri, 17 Sep 2021 00:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=KKt5AWTLK0tIOKcdr0XGkLxMl+Fod9jsU5NOqvL/LwY=; b=OGNcv4U9n6ABRlqOjeyYxj2m2dLT+GdPU3h8J90Fo/RDGo4LKnf6Sw8Zschlp+zyd5 8RwwSpbSUeQXDsZOaw4XlENYpT9wge5Ee0se75p3Ph/CODaSmXnWY9jlGaP8z87bTAum QsBe9jie20lsUrSZVSnSqXk5m7/TL1pwr2JXW3uCD0QSGY/thhd+h7eDqzPaebrgl43Z +Pu+gvepvhfM6tBXXZ44bEvuRgx0N7jz1AyYIxFy6jQc6mcZioxE5AMTuSAWV84IM/kV nE6GvoYICahyNUHrH8Nk85g7Hu0BHfQLOiNLpTJf9FKXL08Rz6g/73Yngdyh4gPbElou 8Dwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=KKt5AWTLK0tIOKcdr0XGkLxMl+Fod9jsU5NOqvL/LwY=; b=GcX+EuqaQmhRDT/zo932gNrymKjmL84jbBSyPuJjG1su9pgFkCQTP+30j04TBPVK2I oYcEo+kNj13qIKkhz2h2YvssdgPmvwMJ1J+bWh58pzMu5r/7P/i3uYRi5C/7hgNM0CGd Xri6h+ghkwP7N3kKet5ghhgiY/iJzj+pIKeRUQZ0YViQfDFktPMIYc4YhuBKtWn8fm28 A+n8lOPwYhUFvCiXc6miV5E4NBOZDjcnYlgFU1CJqMcA3P7zVliX+meaa51W7r1bkHAL T5bE/VqKgsYgjUaeJwmjP/ot0xiJc6RgIcZbjaHTzO2PwcYvLjdrWhcrrUeGaCRgiXzo IPZA== X-Gm-Message-State: AOAM530lAAn/7sWdc/rppwADHEYW3AhkomeXuPN0S0WrJn98csh23Haj ql+4sClgYJfHGCIXzEC3y1A= X-Received: by 2002:a17:90b:1642:: with SMTP id il2mr10681860pjb.167.1631863140606; Fri, 17 Sep 2021 00:19:00 -0700 (PDT) Received: from localhost (122x211x248x161.ap122.ftth.ucom.ne.jp. [122.211.248.161]) by smtp.gmail.com with ESMTPSA id u10sm4815419pjf.46.2021.09.17.00.18.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 00:18:59 -0700 (PDT) From: Punit Agrawal To: Qu Wenruo Cc: Michael Riesch , 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> <87czpvcaab.fsf@stealth> <2424d7da-7022-0b38-46ba-b48f43cda23d@suse.com> Date: Fri, 17 Sep 2021 16:18:57 +0900 In-Reply-To: <2424d7da-7022-0b38-46ba-b48f43cda23d@suse.com> (Qu Wenruo's message of "Fri, 17 Sep 2021 10:22:09 +0800") Message-ID: <877dff7jq6.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 Qu, Qu Wenruo writes: > On 2021/8/30 22:10, Michael Riesch wrote: >> Hi Punit, >> On 8/30/21 3:49 PM, Punit Agrawal wrote: >>> 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 was thinking to get one of those anyway ;-) >> >>>> 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? >> The gmac nodes have been added recently and should enter >> 5.15-rc1. Until >> then, you can check out the dts from linux-rockchip/for-next [0]. > > Do you have the upstream commit? > > As I compiled v5.15-rc1 and still can't get the ethernet work. > > Not sure if it's my Uboot->systemd-boot->customer kernel setup not > passing the device tree correctly or something else... For the RK3568 device tree changes, I think the pull request got delayed to the next cycle. So likely to land in v5.16. In case you're after ethernet on RK3399, there's no solution yet. Reverting 2d26f6e39afb ("net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings") gets you there in the meanwhile. [...]