Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1758826pxj; Wed, 19 May 2021 13:14:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5Q614aIZXHK3vg9oVpwgbjQVpzS4ePgh/g/rJHlyitUme+jY7gLtbWkSs/Ojm+Sv76cqO X-Received: by 2002:a05:6638:635:: with SMTP id h21mr972026jar.135.1621455281479; Wed, 19 May 2021 13:14:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621455281; cv=none; d=google.com; s=arc-20160816; b=BgdvH5l/3NU/xwL7hluiSDHmCB3kB7hD1qV3+RzYbKfCl3j6ODN9txdJ52kHd8/KSP xSgxx0gjdJPkClaH0huE7ih/LN0RnAuEsjrXOkHWL6yNCPxrOu5F7KJg1OY5gaY1FauC Gah2WmpAjJ7pRy46Y6Lh/p1QC745LmaIW5kDodEpUCs+Q0kzeNJe740qiqruGzqoCd+C 0tCwUehplcB7lPg9vAvCYxhOxe8FaBfKSyDv+HV12446ofVPBTOKxjm1dIg4epRHtdDj Ji+3FudEvZOueobNnHJ5luyKTROe8C3mvHgI0W3zlyatgml9jScc4H97yl7PyoW0mDNa sOQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+h7qBn31/XdOKJhJupPMTX05eKZyP5qewLWYYYVaOa4=; b=TVTkQfS0Kxj3E265YZKysyHJjP4x8ciXKpghgemN5rBhILxgzdqT8Oq+26Gxyom3jY xG8B5aL9mOeyxjguJKhpUhzwT4wheDGD4byYyOsiOMb/GB1SfpI8MkfQ1JdfcJzXNyPW 2j5UdFvWu075X1KrGqOmePpAzkhEnCzAvco7jVKJhDP9vOexTiNQaG+IFYehlYuj5qjS MI7oYeawkJswpJ2GGE5sYkMmS/9JOq7xiLFg9NmOKExLSHivh7Z/tiruvJmPE+W7vWkP GFxzATt4JmvWuTep0yJIi3O98fF/Ru8aVjqW456LsOAyI1b2b31suaIko7VydA90zzH9 /zMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=gKAxLopm; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r18si619607ilm.131.2021.05.19.13.14.29; Wed, 19 May 2021 13:14:41 -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=@sifive.com header.s=google header.b=gKAxLopm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346899AbhESPzI (ORCPT + 99 others); Wed, 19 May 2021 11:55:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346825AbhESPzI (ORCPT ); Wed, 19 May 2021 11:55:08 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AA5BC06175F for ; Wed, 19 May 2021 08:53:48 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id 131so16229412ljj.3 for ; Wed, 19 May 2021 08:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=+h7qBn31/XdOKJhJupPMTX05eKZyP5qewLWYYYVaOa4=; b=gKAxLopmId1irlMMaOBYM3XHjyy4rHKldUhIsjxpaOh9yF9PBe6/8DOnOcJXOhSxtL PRmQH/6/tIZrJJS3wFonduNEGuEv9Ii602QKjuPmttmSXX5fDNq9ra4edMdO5My3eJSw JD1SwaSsm+0yuudPCgmJRpSORU8xHb0guqz0Dh5HjW4D8axJBJYR+O5siDmC8qR3n/vG dyC0ksMpziDxYgH2Hc1z6f/xmCKdEbGCW0K6EryBUD5+oQ9ZVG8CNFF5MGLzQXIkuuni 1xKxAFQPNxtkYAvbkMLcV9DtXl2z4wGunp+DxMHQQO7rc0OVmymqJhzuy27+e+A1jzwz 2Itg== 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:content-transfer-encoding; bh=+h7qBn31/XdOKJhJupPMTX05eKZyP5qewLWYYYVaOa4=; b=rgSu7Kv5tjY7TDD7Kn0CzdicfOsrEJHpbIU+g/RRxg1dUkMuzRXHXvDjU2HHu/D3R1 OSyZonkHpyHyMpsVk51y8LL7LIUlnyXpOUVAPL5gcKEobec3Vt89Mftm5qEe1ppq4sSB U7cdv+dKwmWQHgkyuiEuioU0JzWtVczc5j67PiE2UtnbrlD29Q6ctbEK3GQbgTBWPjAp qEvlBIkDiiLSIpIEwwdg/1GkovB2gxnLzOxbQA+qVLplGh1kJ3ElCyPUcecFEQlkYFs4 Z+aMHtUSmb4Hdgbsx/8QM2vJJikRZZaYVSypCctugqKOIw4Cuw8GeEyeBSbTaB1bKzx3 iMDQ== X-Gm-Message-State: AOAM530igqhQp80GGx9txeyB2X3Nk2+yuwyGFwAMVrSNXRgBOQsdOGzz XT/l8kM1jnI0WyQD9UUXeapL6oiNylACQIpIFjeBxA== X-Received: by 2002:a2e:82c5:: with SMTP id n5mr9289881ljh.191.1621439626369; Wed, 19 May 2021 08:53:46 -0700 (PDT) MIME-Version: 1.0 References: <20201209094916.17383-1-zong.li@sifive.com> <87v99qyjaz.fsf@igel.home> <87lfaj7cki.fsf@igel.home> <871rc4on36.fsf@igel.home> <87a6qrk2pw.fsf@igel.home> <874kgyfetu.fsf@igel.home> <87h7kukzy4.fsf@igel.home> <87tuob7n8g.fsf@igel.home> In-Reply-To: From: Zong Li Date: Wed, 19 May 2021 23:53:33 +0800 Message-ID: Subject: Re: [PATCH v7 0/5] clk: add driver for the SiFive FU740 To: Yixun Lan Cc: Andreas Schwab , Paul Walmsley , Palmer Dabbelt , Stephen Boyd , Pragnesh Patel , Albert Ou , Michael Turquette , "linux-kernel@vger.kernel.org List" , linux-clk@vger.kernel.org, linux-riscv Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 11, 2021 at 4:57 PM Yixun Lan wrote: > > On Wed, Apr 14, 2021 at 2:25 PM Zong Li wrote: > > > > On Mon, Apr 12, 2021 at 7:31 PM Andreas Schwab = wrote: > > > > > > On M=C3=A4r 31 2021, Zong Li wrote: > > > > > > > I found that the gemgxlpll was disabled immediately by power > > > > management after macb driver install. The mainline's defconfig does= n't > > > > enable CONFIG_PM, so the network is fine on it. The opensuse defcon= fig > > > > enables CONFIG_PM, and the patch > > > > 732374a0b440d9a79c8412f318a25cd37ba6f4e2 added the enable/disable > > > > callback functions, so the gemgxlpll PLL, I have no idea why power > > > > management disable it, I would keep trace it. > > > > > > Does that mean that CONFIG_PM also affects the FU740? > > > > > > > Yes, we got the same problem on the FU740. We are checking the issue. > > > Just a mild ping, any progress regarding this issue? Currently, if runtime power management is enabled, macb driver would go to sleep at the end of macb_probe, then the gigabit ethernet PLL would be disabled. During this period of time, the system would hang up if we try to access GEMGXL control registers, it means that we can't access GEMGXL control registers before the gigabit ethernet PLL is resumed again. There are some cases, for example, if we execute the 'ifconfig' command, it would eventually go to the macb_get_status to access GEMGXL control registers and cause the system to hang up. Give more example here, if we execute 'ip link set lo up & ip addr add 127.0.0.1/8 dev lo', it would cause the system to hang up, because these commands would try to query the interfaces and eventually go to macb_get_status as well. However, if we can resume the gigabit ethernet PLL first, such as 'ip link set eth0 up' or 'udhcpc', then everything goes well. I'm trying to figure out if there are some hooks that we can check the PLL status in the macb driver before it actually touches the control registers. If anyone has an idea about that, please feel free to point it out to me, thanks. > > Yxun