Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp681002ybz; Fri, 17 Apr 2020 08:10:36 -0700 (PDT) X-Google-Smtp-Source: APiQypKP4nPrhy00YMteabf4YBZ8w74kT0rSO1wWwtz6FqX24C7M8vl+fEItF7kMzGDhwyOH4QpA X-Received: by 2002:a17:906:5003:: with SMTP id s3mr3422450ejj.266.1587136235889; Fri, 17 Apr 2020 08:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587136235; cv=none; d=google.com; s=arc-20160816; b=yxpZOP0VDdntw69J7MDs/r/xddVPSfzFfecsz2xoqbVBFETMB5LKWPqPpXPPU7J0Lr cQr3e8zmfYmzwHEjMzDXQSRS/OnRYq5W9t6M9flchT9x1j665Xc6MDS6y7sdtcgZ9zty obEBcASDHVGhWGHJ7uxsl+Xk7Q/sNBdBs75ESESurAQb+qbb6KSgXhzeXfHUjwffPcRS NRZTTXqc1oDHLm2gLP3JMnDma+Cz3mJg+yIjPCTvvx5BVqHJo7GZgh/bU9hPrZ1Q+V01 Afhg/XSeKcDAZBcyj30ru6Tgbk7nG0HBAXwORVvCcSndpJaD53L97I+13LPIpYK6d31L Ej9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=07XE4Ll2DkTzkEYiQhbfm9B0GaqXh2RJx2imeWNHmsA=; b=azLwk0e6GgqxUUIDRTVU4tCibj8/KjEsDLw8aKmo12s/EA97PlXAR7E6BNayrer8Xn h2R6H+TIUIpF2TXHfc9RVeoI18iSAMkLiQZjajxGXpnGQPvBx4hXP2ZT+b9TLn/GxlWM F6rFmbzied9cwbWvjZKwMDL5YCcvvKhpHxG/UMs9/SGzXVIi4wc0PQItgYMnUVdHIUZ4 4RI5ex/fzNdG+m0LJK9ex8Q0UUATYmvT+d0WZ1lXr8p+AVcA1j2L6hBJw4pmYPA5rdu9 67JqXpJsLqfVZ8yebz+iNhSu0eUwSLr8ENAru/ORBojELiRlDZMqy2A6Ku6icOuf5FtO YGUQ== ARC-Authentication-Results: i=1; mx.google.com; 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 r17si7177826edl.558.2020.04.17.08.10.11; Fri, 17 Apr 2020 08:10:35 -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; 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 S1728425AbgDQPH0 (ORCPT + 99 others); Fri, 17 Apr 2020 11:07:26 -0400 Received: from muru.com ([72.249.23.125]:49880 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728114AbgDQPH0 (ORCPT ); Fri, 17 Apr 2020 11:07:26 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 6BBBB8047; Fri, 17 Apr 2020 15:08:12 +0000 (UTC) Date: Fri, 17 Apr 2020 08:07:21 -0700 From: Tony Lindgren To: "H. Nikolaus Schaller" Cc: Andreas Kemnade , Evgeniy Polyakov , Greg Kroah-Hartman , Linux Kernel Mailing List , linux-omap , Adam Ford , "Andrew F . Davis" , Vignesh R Subject: Re: [PATCHv3] w1: omap-hdq: Simplify driver with PM runtime autosuspend Message-ID: <20200417150721.GL37466@atomide.com> References: <20191217004048.46298-1-tony@atomide.com> <7B8C7DD9-095B-48FC-9642-695D07B79E97@goldelico.com> <20200416184638.GI37466@atomide.com> <3197C3F0-DEB9-4221-AFBD-4F2A08C84C4C@goldelico.com> <20200417164340.3d9043d1@aktux> <6430AF54-849E-456B-8DB0-B4478BBDB78D@goldelico.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6430AF54-849E-456B-8DB0-B4478BBDB78D@goldelico.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * H. Nikolaus Schaller [200417 14:53]: > > > Am 17.04.2020 um 16:43 schrieb Andreas Kemnade : > > > > On Fri, 17 Apr 2020 16:22:47 +0200 > > "H. Nikolaus Schaller" wrote: > > > >>> Am 16.04.2020 um 20:46 schrieb Tony Lindgren : > >>> Care to check if changing pm_runtime_set_autosuspend_delay value > >>> to -1 in probe makes the issue go away? Or change it manually > >>> to -1 via sysfs. > >>> > >>> If that helps, likely we have a missing pm_runtime_get_sync() > >>> somewhere in the driver. > >> > >> Yes, it does! It suffices to set it to -1 for one readout. > >> Aything else I can test? You could sprinkle dev_info(dev, "%s\n", __func__) to the omap_hdq_runtime_suspend() and omap_hdq_runtime_resume() functions. > > How does it depend on loaded drivers? > > Is it really mainline kernel + config + devicetree or something else? > > Well, I can revert the patch on the same > kernel (5.6 or 5.7-rc1) + config + devicetree + user-space > and the problem is gone. > > This means that something is different between the old and the new > version which makes the hdq access delayed and failing. Of course I > don't know the reason for it and what does influence it. > > > > > Can you reproduce the problem with init=/bin/bash > > and then mount sysfs and modprobe omap_hdq? > > I am not sure how quickly I can test such a setup. > > > Regarding pm_runtime stuff I thought I have the worst case scenario. > > What may make a difference is the sequence in which drivers are loaded. Well to me it seems that we have PM runtime handling properly implemented for all the functions in w1_bus_master omap_w1_master, so we should not have any consumers calling into the driver bypassing PM runtime. Maybe the PM runtime usecounts get unbalanced somewhere in the driver where we end up with driver permanently in disabled state? Regards, Tony