From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753101AbdK2IVa (ORCPT ); Wed, 29 Nov 2017 03:21:30 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:49690 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751744AbdK2IV1 (ORCPT ); Wed, 29 Nov 2017 03:21:27 -0500 X-IronPort-AV: E=Sophos;i="5.44,471,1505746800"; d="scan'208";a="264877796" From: Yoshihiro Shimoda To: Alan Stern CC: Geert Uytterhoeven , "Rafael J. Wysocki" , Linux PM , LKML , Ulf Hansson , "Greg Kroah-Hartman" , USB list , Linux-Renesas Subject: RE: [PATCH] PM / runtime: Drop children check from __pm_runtime_set_status() Thread-Topic: [PATCH] PM / runtime: Drop children check from __pm_runtime_set_status() Thread-Index: AQHTaDfS0q/eL1h6GUu734kOFriem6MpuB9wgAAsawCAARJ58A== Date: Wed, 29 Nov 2017 08:21:22 +0000 Message-ID: References: In-Reply-To: Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yoshihiro.shimoda.uh@renesas.com; x-originating-ip: [211.11.155.139] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;TY1PR06MB0991;20:if979pWNxnw/bmc7RU1/xROJjtIDGXog/o/xan/jgybCVWmpedy/FXKlH4Zba/hFBIrKXBvadVRk6DFLZOc5wutBqe1ocjcu4/0KZkHuO2qKF7kM9Rt+opDjbbbyMFtjeWigmYli7Lw7+5uMKxvUIBrXsCMBjNb7S/x7rD1hHwk= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: f0e1167c-e161-49fe-6c15-08d537022cca x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603267);SRVR:TY1PR06MB0991; x-ms-traffictypediagnostic: TY1PR06MB0991: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(84791874153150)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(5005006)(8121501046)(3002001)(3231022)(10201501046)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(6072148)(201708071742011);SRVR:TY1PR06MB0991;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:TY1PR06MB0991; x-forefront-prvs: 05066DEDBB x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(346002)(376002)(39860400002)(366004)(24454002)(199003)(189002)(74316002)(5660300001)(14454004)(2900100001)(55016002)(6246003)(2950100002)(6916009)(102836003)(6116002)(4326008)(54356999)(3846002)(50986999)(99286004)(76176999)(305945005)(189998001)(25786009)(101416001)(7736002)(9686003)(77096006)(33656002)(6306002)(229853002)(68736007)(105586002)(106356001)(316002)(2171002)(53546010)(6506006)(8936002)(66066001)(6436002)(8676002)(966005)(54906003)(86362001)(575784001)(7696005)(2906002)(3280700002)(81156014)(97736004)(81166006)(478600001)(3660700001)(345774005)(53936002);DIR:OUT;SFP:1102;SCL:1;SRVR:TY1PR06MB0991;H:TY1PR06MB0992.apcprd06.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0e1167c-e161-49fe-6c15-08d537022cca X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2017 08:21:22.1843 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR06MB0991 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id vAT8LZK7026730 Hi, > From: Alan Stern, Sent: Wednesday, November 29, 2017 12:07 AM > > On Tue, 28 Nov 2017, Yoshihiro Shimoda wrote: > > > Hi Geert-san, > > > > > From: Geert Uytterhoeven, Sent: Tuesday, November 28, 2017 7:58 PM > > > > > > Hi Rafael, Shimoda-san, > > > > > > On Sun, Nov 12, 2017 at 1:27 AM, Rafael J. Wysocki wrote: > > > > From: Rafael J. Wysocki > > > JFTR, this triggered before during system resume on e.g. Salvator-XS with > > > R-Car H3: > > > > > > ohci-platform ee080000.usb: runtime PM trying to suspend device > > > but active child > > > phy_rcar_gen3_usb2 ee080200.usb-phy: runtime PM trying to suspend > > > device but active child > > > ohci-platform ee0c0000.usb: runtime PM trying to suspend device > > > but active child > > > ohci-platform ee0a0000.usb: runtime PM trying to suspend device > > > but active child > > > phy_rcar_gen3_usb2 ee0c0200.usb-phy: runtime PM trying to suspend > > > device but active child > > > phy_rcar_gen3_usb2 ee0a0200.usb-phy: runtime PM trying to suspend > > > device but active child > > > > > > so this was an existing issue with USB before. > > > > Thank you for the report! > > I know that, but since this didn't cause any trouble until now, > > I postponed to investigate the issue... But, I investigate it today. > > I don't find the root cause yet. However, it seems related to usb host and/or usb core. > > --> USB host related devices' child_count will be 1 in suspend timing. > > --> I guess remote wakeup feature is enabled? But, I don't find the point yet. > > > > The renesas_usbhs also uses the phy_rcar_gen3_usb2 driver. I'm so sorry, but this is mistake. The renesas_usbhs doesn't use the phy_rcar_gen3_usb2 driver. So, > > --> If I only used the renesas_usbhs driver (in other words, I don't install > > [eo]hci-{hcd,platform} drivers), the issue disappeared. > > --> So, I think the phy_rcar_gen3_usb2 driver doesn't cause this issue. > > (But, it is possible to be related though.) They are also mistake. > > I'll continue to investigate this issue tomorrow. > > Does the phy_rcar_gen3_usb2 driver use runtime PM? Yes, the phy_rcar_gen3_usb2 uses runtime PM. > It looks like the > phy device somehow gets enabled for runtime PM when it shouldn't be. I also think that now. I don't find why for now, but the usage_count of a phy device was not 1 just before suspend. (This "a phy device" means the child of ee0a0200.usb-phy device.) > (And by the way, what device is the child of ee0a0200.usb-phy?) It's a phy device: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/phy/phy-core.c?h=v4.15-rc1#n773 Best regards, Yoshihiro Shimoda > Alan Stern