From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752788AbdIGBjg (ORCPT ); Wed, 6 Sep 2017 21:39:36 -0400 Received: from esa3.dell-outbound.iphmx.com ([68.232.153.94]:30925 "EHLO esa3.dell-outbound.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751267AbdIGBjf (ORCPT ); Wed, 6 Sep 2017 21:39:35 -0400 From: X-LoopCount0: from 10.170.28.40 X-IronPort-AV: E=Sophos;i="5.42,356,1500958800"; d="scan'208";a="145261003" X-DLP: DLP_GlobalPCIDSS To: , CC: , , , Subject: RE: Fwd: [PATCH] Add driver to force WMI Thunderbolt controller power status Thread-Topic: Fwd: [PATCH] Add driver to force WMI Thunderbolt controller power status Thread-Index: AQHTJ0YV8o1w6haZs0+qP3ceDgEFGaKoQZmAgAABehCAAFpmgIAABK+A///AEbCAAGGzAIAAAdMA///dP/A= Date: Thu, 7 Sep 2017 01:38:37 +0000 Message-ID: References: <1504720440-24423-1-git-send-email-mario.limonciello@dell.com> <1504726863.2677.154.camel@intel.com> <20170906200953.GA8298@fury> <1504729603.2677.167.camel@intel.com> <7edd73cbe3ba4d7b80a6614e93f4d538@ausx13mpc120.AMER.DELL.COM> <20170906222730.GB8298@fury> <1504737247.2677.170.camel@intel.com> In-Reply-To: <1504737247.2677.170.camel@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.143.18.86] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v871dg9Y014769 > -----Original Message----- > From: Bernat, Yehezkel [mailto:yehezkel.bernat@intel.com] > Sent: Wednesday, September 6, 2017 5:34 PM > To: dvhart@infradead.org; Limonciello, Mario > Cc: mika.westerberg@linux.intel.com; linux-kernel@vger.kernel.org; platform- > driver-x86@vger.kernel.org; hughsient@gmail.com > Subject: Re: Fwd: [PATCH] Add driver to force WMI Thunderbolt controller power > status > > On Wed, 2017-09-06 at 15:27 -0700, Darren Hart wrote: > > On Wed, Sep 06, 2017 at 09:40:02PM +0000, Mario.Limonciello@dell.com > > wrote: > > > > > > > > > > > -----Original Message----- > > > > From: Bernat, Yehezkel [mailto:yehezkel.bernat@intel.com] > > > > Sent: Wednesday, September 6, 2017 3:27 PM > > > > To: dvhart@infradead.org; Limonciello, Mario > > > ell.com> > > > > Cc: mika.westerberg@linux.intel.com; linux-kernel@vger.kernel.org > > > > ; platform- > > > > driver-x86@vger.kernel.org; hughsient@gmail.com > > > > Subject: Re: Fwd: [PATCH] Add driver to force WMI Thunderbolt > > > > controller power > > > > status > > > > > > > > On Wed, 2017-09-06 at 13:09 -0700, Darren Hart wrote: > > > > > > > > > > The other question I had about this was if the typical use case > > > > > involves the OS, > > > > > or if the firmware update (for example) would be performed as > > > > > part of > > > > > the > > > > > general platform firmware update (from the UEFI update > > > > > utility). > > > > First, there is the use-case of add-in card, where it's > > > > impossible to > > > > use UEFI-based update, as much as I understand, as the BIOS isn't > > > > expected to expose an ESRT entry for it. > > > > > > > > Even for built-in controller, my impression is that most OEMs use > > > > a FW > > > > update application (running on Windows) and are not publishing a > > > > UEFI- > > > > based solution. > > > Yeah I'd agree with that impression. > > > > > > Even if an OEM does choose to publish a UEFI based solution, it's > > > still > > > useful to present FW information for the TBT controller in fwupd > > > however too. > > > > > > Similar to how fwupd displays the information for the ME even > > > though > > > the ME is typically updated via UEFI. > > So this raises the question: can we come up with a mechanism as part > > of the tb > > driver that will work on both on-board controllers and add on cards? > > In it's > > current form, this driver will only address on-board controllers. > > Both this wmi driver and Thunderbolt driver are relevant for both on- > board controllers and add-in cards. > Maybe I'm missing something. Would you mind to elaborate? > What this WMI driver I submitted does is modifies a "platform" feature (a GPIO) that turns on the on-board controller to a forced power on state. It typically shouldn't remain in this state if not in use as that will waste power. If a separate TBT device is plugged in that would cause the TBT controller to also wake up. In that case you wouldn't need to use this WMI driver. That’s why I say this should really be a platform feature that makes the thunderbolt host controller behave as expected whether something is plugged in or not when queried from fwupd. >>From the userspace fwupd perspective the (unwritten patch) behavior would be: 1) fwupd starts up and does coldplug routine 2a) If any TBT devices are plugged in, enumerate everything up the chain from udev, don't use force power 2b) If no TBT devices are plugged in but the force power sysfs file is available, try to write 1 to force power the device 3) wait a few seconds. 4) If new devices show up after the waiting, enumerate. 5) Write 0 to the force power to turn off the TBT host device if nothing is plugged in > > > > The TB driver could use the WMI method if it exists, or some other > > method to > > power it up, but present the same sysfs interface to userspace... > >