Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6399362ybi; Wed, 5 Jun 2019 00:06:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGFN8YDZeSNU7dFGxvqfObSkKQYZRUt0MC9dIktlqmkMut6YBGE5YqHGhwuSHRoPYvt3WS X-Received: by 2002:a63:8dc4:: with SMTP id z187mr2451480pgd.337.1559718377440; Wed, 05 Jun 2019 00:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559718377; cv=none; d=google.com; s=arc-20160816; b=Q2HMQ2zaNbMfqMZ1wAH/qZzJe2Tj3nuNTiRLRPJcAIo+xuA0/q1qGbtU9ii+hTKWdm pebE6dgEFk4IF69cCMLjvH8vnD76vnir1Q/stSwY+ajWFhMsQ5EJva8BqdDV7mcpGifp 0T5XqYvGft+QaBZ5T+VsNqjP+/j4i5I0Zeeo4rSD6ZPwEJppoDqylBDuWAIxrYaUa1rG hSkZJN5N+QbniROGHoJcFIqrDcnqUupTkmf8u2cf3aAczoMCiUUn5hO+boxrHi6gleuh EIh63HuQHVY8sHS3Gh9ar40DL0ZIVFYWj5LVIuecydlYfSzQV1Rvh+PJmym7NMoFBqyI lFLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=osYzYbwPlOcKrG/PC8H8GWv1Nj5R7QK9wL1yUwsonBc=; b=eE2Hms8JrbGhqZnyOVF0S9V3fBXGZLIcUqQsizBnvHDCnccx0qIePqqJJkTzz+62Nt Ktap8TLzYcuejJEpp3iKt2cyq4YxKvMgbeMuSd96BxMWjYDZAMdp3ZxdJF26BRyrNxeT NfTYWDPkNJ/FhLeCWsX7gpKkZif7BTG0gJHwNmGwYidinU5EmJFtB0M+CslpWPeVRtz0 svIgBs87YukgL/PolVlqgbdLMuszMCNHUcmElOq3K9V3rxjUpc6dC8XbKZsdDg/BGgjU QtYsEjrH3KYmL8V662mHSooR18hImrSpEyE5nfIRAVvPDp+fqrha+fCouAotwVOYyxqR IACw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f59si27646252plb.107.2019.06.05.00.05.59; Wed, 05 Jun 2019 00:06:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726684AbfFEHDX (ORCPT + 99 others); Wed, 5 Jun 2019 03:03:23 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:41036 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbfFEHDW (ORCPT ); Wed, 5 Jun 2019 03:03:22 -0400 Received: by mail-lj1-f194.google.com with SMTP id s21so11480494lji.8; Wed, 05 Jun 2019 00:03:20 -0700 (PDT) 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; bh=osYzYbwPlOcKrG/PC8H8GWv1Nj5R7QK9wL1yUwsonBc=; b=YT9K87TS1L+r1EFiLLaUcKL8P/rkxIMlZ93iEwCfuAYiJnvNDcEs2wA2ZNyUqgCIVd nEayUOWpuRmJzTs1Z8ua2vVuPkX5iPqZ+o/d9pCD5a4sZ+3sWiZQOTtaEjSQHFLLvPGb Pcuv2hy2c/4qckaFv6e1SjjkRG0gUfwwTF/2+QbB1BWziPFmZ6H0OYsw7DB+/ZE0VUnI d2nyjwOw1Bm5s5RCcZiS2QjRmyDS9eqtg+TnQ9BNqARq/p5dlJSQ6n28jZdurULaNTsK ZqAio89WnFnkskA1tjPJCcG4jZcyeui7DwWZF2uc/XA+vQV6r9cP8vfvzHqd8rhQsvnB rvtA== X-Gm-Message-State: APjAAAXM+1p2medbe9z2hpTbwWXCIR3N+4L3s9m558Agz+nYqPbufqZK YNdLlhAp9O92ecGR47b051a011brEq7mjYvLW6KbAzwDfrI= X-Received: by 2002:a2e:6e01:: with SMTP id j1mr19452629ljc.135.1559718199961; Wed, 05 Jun 2019 00:03:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Geert Uytterhoeven Date: Wed, 5 Jun 2019 09:03:07 +0200 Message-ID: Subject: Re: rcar_gen3_phy_usb2: unbalanced disables for USB20_VBUS0 To: Yoshihiro Shimoda Cc: Linux-Renesas , USB list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shimoda-san, On Wed, Jun 5, 2019 at 6:06 AM Yoshihiro Shimoda wrote: > > From: Geert Uytterhoeven, Sent: Wednesday, June 5, 2019 3:06 AM > > Using a tree based on renesas-drivers-2019-06-04-v5.2-rc3, I started seeing > > the following warning during a second system suspend (s2idle): > > > So far I've seen this on Salvator-X with R-Car H3 ES1.0 or M3-W, and > > on Salvator-XS with R-Car M3-N, but not (yet?) on H3 ES2.0. > > I could reproduce this issue on R-Car H3 ES3.0 with Suspend-to-RAM. > # I'm silly but I could not use s2idle that didn't wake up by ravb. > # https://elinux.org/R-Car/Boards/Salvator-X#Suspend-to-Idle With CONFIG_PM_DEBUG=y and CONFIG_PM_TEST_SUSPEND=y, you can use echo platform > /sys/power/pm_test to configure the system to wake up from s2idle after 5 seconds. This allows to loop s2idle without user intervention. > Thank you for trying it. I have investigated this issue and then I found the root cause. > > After the following patch was applied, multiple phy devices are generated. > https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/commit/drivers/phy/renesas/phy-rcar-gen3-usb2.c?h=renesas-drivers-2019-06-04-v5.2-rc3&id=549b6b55b00558183cef4af2c2bb61d4f2ffe508 > > But, on the power_on function, it should set the "powered" flag for any other phys anyway. > Otherwise, such a strange imbalance behavior happened. > The powered flag is needed to avoid multiple "PLL_RST" register setting. > # I think regulator_{en,dis}able() don't need such a condition though. > > I'll submit a bugfix patch with your Reported-by tag later. Thank you very much! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds