Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp780272pxf; Thu, 18 Mar 2021 11:20:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxd+nrSo7d9yPp7chBk9/hKYhFPQbRCrbIVNoIvWpc61996tBZJZJ5JUBfut2REQe9HwJOx X-Received: by 2002:a17:906:3648:: with SMTP id r8mr43449414ejb.58.1616091605042; Thu, 18 Mar 2021 11:20:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616091605; cv=none; d=google.com; s=arc-20160816; b=fLMJYwcgzKx59hx76LWfOZ1DroLA3caA8RwrofMd6rrqiHnz73WycjCUjiGFR5wpzk /JMx7KCzIYxDQQ4TEYJ7UETBApjogg3cn9Zi31cEt77CMlWgn4LkyLlt6ND5W1dSuhCQ iUqQPFg8byShKtgavLOnKIJbRxMQugOYTXHwglwApVdQDakDc75oDk1FsPbd+U36kfB1 U1auFyv7DpvYZtcLaprlrBdC/9tbmJUrKjhatzlBsZglOdO/y0rLZYy4+LvsCmyMpzTV bQgmjCcn7DnJeM41A9Pa4SVmTcFRn2NsvaAWe+EpbLONvnQPCrFQb0RU0ZvqAcaZW+1b M1TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=E68gTpg/ZFyh3Ay1yHeT+sjAIOl5bKrGd3L1U5Pw9f0=; b=d1ShMDm1E+9A1ES6z+5UU+BNU1MiZ3hmpgDx0iGVlqutWGhbFZpRkQUtI6qaSAKSvZ lm8IPTqsEKrFD/UMMd65En4XCFw36wJc1HHUnravdRqxMxdYSGNCQMyWarjrXi1bQn/6 UXMA+PlkGzrWPOaODydN6Pcd/loL2SeS/v2Oy03qGtWwN7dozBceIt5U5SrCl0U7Tkpv zP5Ku2PpKXRmsEIevHHM7kJpDATb1Cztukge5ERZVJzPDtaS2v7ZDgARiwvZixbPsFiI MLdZp8AJOgU4ROOMQlRqPWT17KNydlZKJEd0IqeQADPCpxOdTLItmvxAtP+smRYoi626 WcWg== 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 x11si2163265ejv.267.2021.03.18.11.19.41; Thu, 18 Mar 2021 11:20:05 -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 S232565AbhCRSQR (ORCPT + 99 others); Thu, 18 Mar 2021 14:16:17 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:59472 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232481AbhCRSPr (ORCPT ); Thu, 18 Mar 2021 14:15:47 -0400 Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 2.0.3) id 2e1ede1bc371b531; Thu, 18 Mar 2021 19:15:46 +0100 Received: from kreacher.localnet (89-64-80-250.dynamic.chello.pl [89.64.80.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 4B4CC668FA9; Thu, 18 Mar 2021 19:15:45 +0100 (CET) From: "Rafael J. Wysocki" To: Linux PM , "elaine.zhang" Cc: LKML , Ulf Hansson Subject: [PATCH v1 0/2] PM: runtime: Update device status before letting suppliers suspend (another take) Date: Thu, 18 Mar 2021 19:06:54 +0100 Message-ID: <5448054.DvuYhMxLoT@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduledrudefiedguddufecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgggfgtsehtufertddttddvnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvedufefggeeutdejvdfhteevgeeludevueevvdejkeelfefhudfhfeehkefffeevnecukfhppeekledrieegrdektddrvdehtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeekledrieegrdektddrvdehtddphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopeiihhgrnhhgqhhinhhgsehrohgtkhdqtghhihhpshdrtghomhdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehulhhfrdhhrghnshhsohhnsehlihhnrghrohdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=4 Fuz1=4 Fuz2=4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, The previous attempt to address the issue tackled by this series, commit 44cc89f76464 ("PM: runtime: Update device status before letting suppliers suspend") was incorrect, because it introduced a rather nasty race condition into __rpm_callback(), so let's revert it (patch [1/2]). Instead, let's avoid suspending the suppliers immediately after dropping the PM-runtime references to them and do that later, when the status of the consumer has changed to RPM_SUSPENDED. Please see the patch changelogs for details. Elaine, please test this series on the system where you saw the original problem. Thanks!