From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B286C433B4 for ; Wed, 19 May 2021 15:53:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2BD2C6135C for ; Wed, 19 May 2021 15:53:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354034AbhESPzO (ORCPT ); Wed, 19 May 2021 11:55:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346825AbhESPzK (ORCPT ); Wed, 19 May 2021 11:55:10 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86A58C061760 for ; Wed, 19 May 2021 08:53:48 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id f12so16238345ljp.2 for ; Wed, 19 May 2021 08:53:48 -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=ay8cpvCQh4COhHmyrYqKjbwjEo8QIauh8L86AcmSgSONV0/RCL9vy0J7Ay4ut17Q/6 LkMby691vBZz7HEXbupsgDXLwHQxZPEzFq25UU1k/IBltAS3cTD8y6mZ3LN4L2lQcUXp uNyzSonl07zxvII/YDdsExfYV4rs0mYwr1GEhHUUAzT4cFkxepeOCvDAvn0IMQhovD1i M9ztHOkDTPWZVzRHDD/nwsJIqszjOU428vZlJH/JJZSgd5MQAvaS1h4rs6qySoJKbHKN TwBbcCGMjxOgxHkw3qKGoJWUpQx0ksl2UD1TbbJIbO/EnSARmJGjabVP2w0I9KiyLwTi Vb+w== X-Gm-Message-State: AOAM530OHnW1QIyobIyNMyzyUv33KU5P5DOSVGLafZr18IaV+a8foo3r 4LhWbuxw+XMzoR4LPbKMvHh44M6jOl32yCpPJn0s9Q== X-Google-Smtp-Source: ABdhPJzstoito5f6ig1I5Nm25wwkcDeVPsvWfkNlrovbdfFlE/8m1RtVJDkkMeKMpjcycWYhfwUlgpNCBUxdQbnJWaE= 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-clk@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