Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3719900pxb; Mon, 30 Aug 2021 09:05:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAbKjaO6lkAVbuggRcoXKO2powwfTojdiyrtLIN8Ae4ysaK/MZ3pvI05KLaB17u9PkOcS8 X-Received: by 2002:a5d:8d1a:: with SMTP id p26mr4126826ioj.141.1630339503332; Mon, 30 Aug 2021 09:05:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630339503; cv=none; d=google.com; s=arc-20160816; b=mN+Ce7EtseUXMwhRx9RRFLDtoHUA0dnoN1RyvLLYLeUkgm/Nawi3/XG6lgNV7NvuZ4 BoXbg+nN8OSQuiietDgvkzbI+xr37SJ6+wt98trJlyU1vkGEsXw6SRxHF/KGC4O7pC+d g2jyJz1iz/BPHGJZRFMVWM6l37nngPcGfW3Cqo7jzjgDzjzqXNtkfezT2/mwze1uFBW9 ziRIv1722zDz2WSItfwnROEOdz0DX1TDneTSPhKgHBj77wN4Sh62OM3K4jwW8t+Sp71q kFYzWaDqqfDviA5qFoV4MaahhIXPxoKjTjPnJA00A+nFEIRQnRXlIHEh9yhnAXh/wvVP 8Ahw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=aFevs/gSxbU10OD2HhmBmIy8lmlTrmGWeunJfZ8GXV4=; b=fDUIg9q3Vohf35wHeHlUTsvFm97xLYwTs6tIjnHrayaP1Ev7WTUI3fEY5Bd9gvsh41 j4S4dRPQE17kGDGv4h45iulEbU7GFRfWYGhYNDLQ2KTm8+s9inGMJeLEM914+f3vys8q Az0FTdJDUHhpGD/X/3uZ4adl1+tecePyrEf6/N+GwmxYfPag9CO350pESA1xrpSEp1RW Wa0Mbx860VW0EdmGADaCLzXqYRKZ9oN53vBdwLEF8p//E+k082fNDv+PX8n4ASBFGQpD DRpWSHTQZAzUDDQQYx8GmkKFPlgqBZU2ej+/9PyDj3Kg7EI2KlWuIt/X8Zj7MQ5rXbXG NNSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m2lWo3rr; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v16si15742550jal.55.2021.08.30.09.04.51; Mon, 30 Aug 2021 09:05:03 -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=@kernel.org header.s=k20201202 header.b=m2lWo3rr; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237922AbhH3QEI (ORCPT + 99 others); Mon, 30 Aug 2021 12:04:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:43210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237882AbhH3QEH (ORCPT ); Mon, 30 Aug 2021 12:04:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0CA2261037; Mon, 30 Aug 2021 16:03:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630339394; bh=aFevs/gSxbU10OD2HhmBmIy8lmlTrmGWeunJfZ8GXV4=; h=References:In-Reply-To:Reply-To:From:Date:Subject:To:Cc:From; b=m2lWo3rrUt4CKtf+9F2RHi0LAvLDR2zr+nYw2qOLlFROMfazIHJUSBQ2RODMcrLCi pzQfitkSgwP1WJXPln2v8dn1uQJ2q+wfRUhgZJyRm18qEuds8+mYdqTboqvIdf+Gnc a4BTUmXO4/SkaUc8+GXU4aMi98MQ5kPd44a91lz4zWw+p2pitv8uVrAWtF7RFPapUA Eh/XkXZl59kLXE08NC8R2cnWZ8rufzCkM91fA3nPSBvo8tqYJDlSgUOZao+EXWjy15 EboYQuQ5LkUOuRCJeXe7cq3/kwZ4dIFQnaekndyfxpXBsHJR1xjP87pkNRjPJsdOjz 2AC5wSIaP7m9g== Received: by mail-lf1-f42.google.com with SMTP id z2so32295639lft.1; Mon, 30 Aug 2021 09:03:13 -0700 (PDT) X-Gm-Message-State: AOAM530AIEECWa4sha1mRNabH6UUM9RfFBmgWFKIFXKaRVwsTOnvsjxh VzR5n0eMCZOX6O73LaIpKXB/pvhPXSKcz/XOlBs= X-Received: by 2002:a05:6512:3f89:: with SMTP id x9mr18217622lfa.233.1630339392410; Mon, 30 Aug 2021 09:03:12 -0700 (PDT) MIME-Version: 1.0 References: <20210823143754.14294-1-michael.riesch@wolfvision.net> <568a0825-ed65-58d7-9c9c-cecb481cf9d9@wolfvision.net> In-Reply-To: <568a0825-ed65-58d7-9c9c-cecb481cf9d9@wolfvision.net> Reply-To: wens@kernel.org From: Chen-Yu Tsai Date: Tue, 31 Aug 2021 00:03:00 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings To: Michael Riesch Cc: 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 , Sasha Levin Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Aug 30, 2021 at 3:57 PM Michael Riesch wrote: > > 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. > > 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 :-) I hit this on an ROC-RK3399-PC first, then bisected it on a NanoPi M4V2. They both should be easy to get from their respective vendors. AFAIK all the RK3399 devices have pretty much the same setup for Ethernet. BTW, Don't get the Nanopi in the M4V2 variant. Get the original M4, or the M4B (but the WiFi on the M4B doesn't seem to work lately). > 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. My gut is telling me (without looking at the code) that maybe the GRF access was not going through, and so the RGMII delays and stuff weren't set properly, hence no traffic getting to/from the PHY. Otherwise there were no error messages. I don't think I'll be able to squeeze out more cycles to track down what actually went wrong though. Regards ChenYu