From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Westerberg Subject: Re: [PATCH v2 4/4] PCI: Add runtime PM support for PCIe ports Date: Wed, 13 Apr 2016 12:16:43 +0300 Message-ID: <20160413091643.GL1714@lahna.fi.intel.com> References: <1460111790-92836-1-git-send-email-mika.westerberg@linux.intel.com> <1460111790-92836-5-git-send-email-mika.westerberg@linux.intel.com> <20160412175203.GB13637@wunner.de> <20160413083352.GI1714@lahna.fi.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-pci-owner@vger.kernel.org To: Andreas Noever Cc: Lukas Wunner , Bjorn Helgaas , "Rafael J. Wysocki" , Qipeng Zha , Qi Zheng , Dave Airlie , Mathias Nyman , Greg Kroah-Hartman , "linux-pci@vger.kernel.org" , Linux PM list List-Id: linux-pm@vger.kernel.org On Wed, Apr 13, 2016 at 11:08:37AM +0200, Andreas Noever wrote: > > <- Now, my understanding is that Macs do not use ACPI hotplug but > > instead this is all native, correct? When you have the controller > > exposed all the time, of course you can get hotplug events and handle > > them in the driver. > > > > However, problem arises when enumeration and configuration is actually > > done in BIOS SMI handler, like in normal non-Mac PCs. If the port is in > > D3 the handler is not smart enough to move it back to D0 and then > > re-enumerate ports. It just gives up. > Is this issue specific to the "ACPI/SMI Thunderbolt" implementations > used in non-Mac PCs or is PCI hotplug in general done through SMI/ACPI > instead of the native pciehp port driver? Wouldn't it make more sense > to only disable runtime suspend on non-Mac thunderbolt ports (or ports > using ACPI hotplug, if that is detectable). I think it is specific to ACPI hotplug implementations (non-Mac PCs). We should be able to detect which one is used. ACPI _OSC method is used to allow/disallow native PCIe hotplug so I think we use that information along with the slot capabilities to decide whether we enable or disable runtime PM.