All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Mario.Limonciello@dell.com>
To: <dvhart@infradead.org>
Cc: <yehezkel.bernat@intel.com>, <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
Date: Wed, 6 Sep 2017 21:43:36 +0000	[thread overview]
Message-ID: <77ca02732f5c4ac1a16c82bf7c893a9b@ausx13mpc120.AMER.DELL.COM> (raw)
In-Reply-To: <20170906200953.GA8298@fury>



> -----Original Message-----
> From: Darren Hart [mailto:dvhart@infradead.org]
> Sent: Wednesday, September 6, 2017 3:10 PM
> To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> Cc: yehezkel.bernat@intel.com; 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, Sep 06, 2017 at 07:49:32PM +0000, Mario.Limonciello@dell.com wrote:
> > > -----Original Message-----
> > > From: Bernat, Yehezkel [mailto:yehezkel.bernat@intel.com]
> > > Sent: Wednesday, September 6, 2017 2:41 PM
> > > To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> > > Cc: mika.westerberg@linux.intel.com; linux-kernel@vger.kernel.org; platform-
> > > driver-x86@vger.ke; dvhart@infradead.org; hughsient@gmail.com
> > > Subject: Re: Fwd: [PATCH] Add driver to force WMI Thunderbolt controller
> power
> > > status
> > >
> > >
> > > > Current implementations of Intel Thunderbolt controllers will go
> > > > into a low power mode when not in use.
> > > >
> > > > Many machines containing these controllers also have a GPIO wired up
> > > > that can force the controller awake.  This is offered via a ACPI-WMI
> > > > interface intended to be manipulated by a userspace utility.
> > >
> > >
> > > > This mechanism is provided by Intel to OEMs to include in BIOS.
> > > > It uses an industry wide GUID that is populated in a separate _WDG
> > > > entry with no binary MOF.
> > > >
> > > > This interface allow software such as fwupd to wake up thunderbolt
> > > > controllers to query the firmware version or flash new firmware.
> > >
> > > As this is a Thunderbolt specific function, maybe it's better to be
> > > exposed from the Thunderbolt driver?
> > >
> >
> > I thought about this too, but the thunderbolt driver won't load if the
> > controller doesn't exist in the first place, whereas this is a platform
> > BIOS feature.  I'll be interested to hear if Mika has a different perspective
> > on if this should live in the TBT driver and the proper way to do it.
> >
> 
> 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).
> 
> > >
> > > > +
> > > > +static DEVICE_ATTR_WO(force_power);
> > > > +
> > >
> > > I'm not sure what is the convention for permissions for this type of
> > > attributes but I feel like this worth being root-only writable, as it
> > > can be used to power-off the controller in the middle of a FW update,
> > > for example.
> >
> > Yeah I think you're right.  I'll adjust it in a follow up patch if this is the
> > correct way to go afterall.
> 
> 
> Ahhhrg, that was something I meant to follow up on as I was discussing using the
> macros with Mario previously, and I forgot. Sorry about that Mario.
> 

I double checked and with the way it's done right now, permissions are:
--w-------

Looks like the macro DTRT without me needing to override.

WARNING: multiple messages have this Message-ID (diff)
From: <Mario.Limonciello@dell.com>
To: dvhart@infradead.org
Cc: yehezkel.bernat@intel.com, 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
Date: Wed, 6 Sep 2017 21:43:36 +0000	[thread overview]
Message-ID: <77ca02732f5c4ac1a16c82bf7c893a9b@ausx13mpc120.AMER.DELL.COM> (raw)
In-Reply-To: <20170906200953.GA8298@fury>



> -----Original Message-----
> From: Darren Hart [mailto:dvhart@infradead.org]
> Sent: Wednesday, September 6, 2017 3:10 PM
> To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> Cc: yehezkel.bernat@intel.com; 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, Sep 06, 2017 at 07:49:32PM +0000, Mario.Limonciello@dell.com wrote:
> > > -----Original Message-----
> > > From: Bernat, Yehezkel [mailto:yehezkel.bernat@intel.com]
> > > Sent: Wednesday, September 6, 2017 2:41 PM
> > > To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> > > Cc: mika.westerberg@linux.intel.com; linux-kernel@vger.kernel.org; platform-
> > > driver-x86@vger.ke; dvhart@infradead.org; hughsient@gmail.com
> > > Subject: Re: Fwd: [PATCH] Add driver to force WMI Thunderbolt controller
> power
> > > status
> > >
> > >
> > > > Current implementations of Intel Thunderbolt controllers will go
> > > > into a low power mode when not in use.
> > > >
> > > > Many machines containing these controllers also have a GPIO wired up
> > > > that can force the controller awake.  This is offered via a ACPI-WMI
> > > > interface intended to be manipulated by a userspace utility.
> > >
> > >
> > > > This mechanism is provided by Intel to OEMs to include in BIOS.
> > > > It uses an industry wide GUID that is populated in a separate _WDG
> > > > entry with no binary MOF.
> > > >
> > > > This interface allow software such as fwupd to wake up thunderbolt
> > > > controllers to query the firmware version or flash new firmware.
> > >
> > > As this is a Thunderbolt specific function, maybe it's better to be
> > > exposed from the Thunderbolt driver?
> > >
> >
> > I thought about this too, but the thunderbolt driver won't load if the
> > controller doesn't exist in the first place, whereas this is a platform
> > BIOS feature.  I'll be interested to hear if Mika has a different perspective
> > on if this should live in the TBT driver and the proper way to do it.
> >
> 
> 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).
> 
> > >
> > > > +
> > > > +static DEVICE_ATTR_WO(force_power);
> > > > +
> > >
> > > I'm not sure what is the convention for permissions for this type of
> > > attributes but I feel like this worth being root-only writable, as it
> > > can be used to power-off the controller in the middle of a FW update,
> > > for example.
> >
> > Yeah I think you're right.  I'll adjust it in a follow up patch if this is the
> > correct way to go afterall.
> 
> 
> Ahhhrg, that was something I meant to follow up on as I was discussing using the
> macros with Mario previously, and I forgot. Sorry about that Mario.
> 

I double checked and with the way it's done right now, permissions are:
--w-------

Looks like the macro DTRT without me needing to override.

  parent reply	other threads:[~2017-09-06 21:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-06 17:54 [PATCH] Add driver to force WMI Thunderbolt controller power status Mario Limonciello
     [not found] ` <CA+CmpXt9EtzObijHT3gmm=xUwFDF3Ec=SFbNnPAk+oRdzAUADQ@mail.gmail.com>
2017-09-06 19:40   ` Fwd: " Bernat, Yehezkel
2017-09-06 19:46     ` Bernat, Yehezkel
2017-09-06 19:46       ` Bernat, Yehezkel
2017-09-06 19:49     ` Fwd: " Mario.Limonciello
2017-09-06 19:49       ` Mario.Limonciello
2017-09-06 20:09       ` Darren Hart
2017-09-06 20:26         ` Bernat, Yehezkel
2017-09-06 20:26           ` Bernat, Yehezkel
2017-09-06 21:40           ` Mario.Limonciello
2017-09-06 21:40             ` Mario.Limonciello
2017-09-06 22:27             ` Darren Hart
2017-09-06 22:34               ` Bernat, Yehezkel
2017-09-06 22:34                 ` Bernat, Yehezkel
2017-09-07  1:38                 ` Mario.Limonciello
2017-09-07  1:38                   ` Mario.Limonciello
2017-09-06 21:43         ` Mario.Limonciello [this message]
2017-09-06 21:43           ` Mario.Limonciello
2017-09-07  6:36       ` Mika Westerberg
2017-09-07  6:50 ` Mika Westerberg
2017-09-07 18:47   ` Mario.Limonciello
2017-09-07 18:47     ` Mario.Limonciello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=77ca02732f5c4ac1a16c82bf7c893a9b@ausx13mpc120.AMER.DELL.COM \
    --to=mario.limonciello@dell.com \
    --cc=dvhart@infradead.org \
    --cc=hughsient@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=yehezkel.bernat@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.