Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1359749imm; Sun, 8 Jul 2018 00:34:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd6WeT7g++HmaYQRKhqrdjA4GANcqHujVv0GlyuNBErcYGjKdYLm3flRfB9fLj6eji2LAJC X-Received: by 2002:a17:902:321:: with SMTP id 30-v6mr16498224pld.122.1531035248721; Sun, 08 Jul 2018 00:34:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531035248; cv=none; d=google.com; s=arc-20160816; b=HuqbkffdEkXyKELzW/jxZ94NrjwspP1cVMo5O+Y1GMIe3GFSeWrsg+pHMVMODlukpv 0S+nDmILWOz0ZUZwu9aTka9cmjLQLBohE4pIJ+o/2X6MuYmjdB5XsMi0bG3kt6cRLnIC YybMy9I8X1DWFEwlY9KN0X63i4SDSP2uerS671+wGnGPbjOUf4vzb0EUwbMtCSfey5Ew mdwM6UL6XoIh3nrKQecVGTwgXzt5Ky45prwAR1OCUnueacZ7NjiMxbAJc8KIEAl2pzqV rTqTXNMvcrIU7LNfLw+H+mXSBGvnQB5Ibf6yVO87BBq7eSX2d5BCoQlpGCakuQ3hMv2y f1dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=o13zV0YTcle0n9B3PZk3JVgJIUCrtMu7ycjrKvzFb0U=; b=UzalH8iWjDxHTPQJeVndGVOE76LaPYFQtzYyt6aFfmJeHoT9VelCT/Ol3nhGMLpUY9 hIk4IEYNCkoaGBcPj/kr2quVmWj8TSCmYzkZYJGCsaAW7n/4ehi6GEE79osOpWogVx0y d92yDUAzavrswj3IT9ScezCzodKsd5CR5FuQkYULtKVEvarvpVDpVbC2nbHKCO9iOIzW dBKCU4CyrgKhscRSCAvQHGiHzM/14+ZERlzC4Rgflt4d9hrTFz/pclF/08kkUb4k/MzL eYY4NLpWYOPUrCUslyz7UFA8q5nPK6lb0NsYT2phLM67qNVy4lOQN0mcCtWFWSmvGmRU 1teg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8-v6si11746986pfh.353.2018.07.08.00.33.19; Sun, 08 Jul 2018 00:34:08 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752951AbeGHHbg (ORCPT + 99 others); Sun, 8 Jul 2018 03:31:36 -0400 Received: from mga06.intel.com ([134.134.136.31]:31812 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752807AbeGHHbf (ORCPT ); Sun, 8 Jul 2018 03:31:35 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jul 2018 00:31:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,324,1526367600"; d="scan'208";a="54840710" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by orsmga007.jf.intel.com with SMTP; 08 Jul 2018 00:31:30 -0700 Received: by lahna (sSMTP sendmail emulation); Sun, 08 Jul 2018 10:31:30 +0300 Date: Sun, 8 Jul 2018 10:31:30 +0300 From: Mika Westerberg To: Lukas Wunner Cc: linux-kernel@vger.kernel.org, Andreas Noever , Michael Jamet , Yehezkel Bernat , "Rafael J. Wysocki" , Christian Kellner , Mario Limonciello Subject: Re: [PATCH 5/5] thunderbolt: Add support for runtime PM Message-ID: <20180708073130.GR2534@lahna.fi.intel.com> References: <20180618110731.57427-1-mika.westerberg@linux.intel.com> <20180618110731.57427-6-mika.westerberg@linux.intel.com> <20180707211401.GA13111@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180707211401.GA13111@wunner.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 07, 2018 at 11:14:01PM +0200, Lukas Wunner wrote: > On Mon, Jun 18, 2018 at 02:07:31PM +0300, Mika Westerberg wrote: > > Implement this using standard Linux runtime PM APIs so that when all the > > children devices are runtime suspended, the Thunderbolt host controller > > PCI device is runtime suspended as well. The ICM firmware then starts > > powering down power domains towards RTD3 but it can prevent this if it > > detects that there is an active Display Port stream (this is not visible > > to the software, though). > > > > The Thunderbolt host controller will be runtime resumed either when > > there is a remote wake event (device is connected or disconnected), or > > when there is access from userspace that requires hardware access. > > IIUC, if there is no xdomain, after 15 s all switch devices as well as > the domain device and the NHI will have runtime suspended. The control > channel is torn down as well, so you can no longer receive notifications > over it. Then how is wakeup of the NHI signalled on hotplug/unplug? > Do you get a PME for the NHI device? Yes, it sends PME. > Because I'm fairly certain that > I do not get a PME for the Light Ridge in my MacBook Pro, but I'll test > this once more and modify negotiate_os_control() to grant PME control > to the OS. I think in case of Apple hardware, they handle the in some different means than PME (possibly part of chipset driver or ACPI method/event).