Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1385671pxb; Thu, 4 Mar 2021 09:59:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOmrlHPG7Xl6nj+QeKr90B/aVqWCjb4JsRJgFlIfZ9FlSBIOJuwMb6V7V7HlbL+aaUUnFh X-Received: by 2002:a17:906:6c93:: with SMTP id s19mr5526532ejr.151.1614880744357; Thu, 04 Mar 2021 09:59:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614880744; cv=none; d=google.com; s=arc-20160816; b=t+xQ5Mq7FYMiGc4OKOH0fK3q6f4yOFjAzyB3zywJ0EXJNUK+f0b49Jly4magBy3ARX IFAxTx97sYnmFsHcFvd96VHzpjryGeDf2PBvi5zeTzVwfEhLrIN0fgJViMqtWwHVGWLE pI2EpFqyHkTdJWv1ts++5J16yloE+1nVGT5HGrR1R+TNvQXd52exy4LesdUmkNxFIAw5 v+5uotLO/JndCoONs9nWap9yGfO86duq6IKm/VuNOUu+Ipge5frCKu07bpeNtfjaEovI DHwQPRX5LUQteM3U4zoCTpexPvmkwUM4u+NEgrn/0YdPF5+O7P7ln6oPnAh88Z0KHzOd iBog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:subject:cc:to :from:date; bh=eMOC5ISHX12aTs5j0RPK/yP2xuynS4cE0JZEvUabV9s=; b=zi9GzAKdO1T8pAFFXnhyLV/mvREKMk/WiXGZkpkvRHngnOwO2Q/OG+u6skX+NMa6nc 3Ps4c38ZROONcEYMQ6WCThh//knRqliw5vnEj9czpaoZ78fGIckVdIgaTPWIcPiUHC/V IXErsHSqbfvS5XvSn3qt6zoExa3U/2CAA/Rpj9vGWC0388cJthWYSp5K2e+0Fiy444+8 KpbsZeAJixfY08kmjGaT6lKJQmuMYIHs7UcG6+Ae8AFC1wuCk5YqPutiM8+KbS7LqY1r 1w/1ylf7umBBAHXMYQ2jsBlKvThhmF/eZLTlFF/e+Lr2kzEstg4RPO8arUzw/+RIp5UC zzrA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cf26si10299794ejb.702.2021.03.04.09.58.41; Thu, 04 Mar 2021 09:59:04 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235473AbhCDPnw (ORCPT + 99 others); Thu, 4 Mar 2021 10:43:52 -0500 Received: from mail.ispras.ru ([83.149.199.84]:50806 "EHLO mail.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235348AbhCDPnp (ORCPT ); Thu, 4 Mar 2021 10:43:45 -0500 X-Greylist: delayed 500 seconds by postgrey-1.27 at vger.kernel.org; Thu, 04 Mar 2021 10:43:44 EST Received: from monopod.intra.ispras.ru (unknown [10.10.3.121]) by mail.ispras.ru (Postfix) with ESMTPS id 4C99740D403E; Thu, 4 Mar 2021 15:34:43 +0000 (UTC) Date: Thu, 4 Mar 2021 18:34:43 +0300 (MSK) From: Alexander Monakov To: Hans de Goede cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Zhang Rui Subject: AHCI SATA Runtime PM Message-ID: User-Agent: Alpine 2.20.13 (LNX 116 2015-12-14) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Hans, Linux PM folks, I'm looking for clarification regarding this patch discussion: https://patchwork.kernel.org/project/linux-pm/patch/20180420101834.15783-2-0v3rdr0n3@gmail.com/ Hans said, > Ah, so the AHCI code has runtime pm enabled by default (so there > is another pm_runtime_allow() somewhere, but then disables it for > unused ports to make hotpluging something into those ports work. I have a laptop where two unused AHCI SATA controllers are present (but obviously nothing can be hotplugged into them). Apparently due to the above, they do not enter runtime autosuspend. The problem is, these "ATA port" nodes don't seem to participate in udev hierarchy, so it's unclear how I'm supposed to automatically re-enable runtime PM for them. For PCI device nodes, I have ACTION=="add", SUBSYSTEM=="pci", TEST=="power/control", ATTR{power/control}="auto" but ata1/uevent is empty, so there's no obvious way to write the corresponding UDev rule. Prior to discovering the above patch discussion, I have filed a bug: https://bugzilla.kernel.org/show_bug.cgi?id=211837 Does the above correctly reflect how AHCI PM is supposed to be? If so, what is the proper way to enable runtime PM for unused ATA ports? Thank you. Alexander