All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Mario Limonciello <mario.limonciello@dell.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] platform/x86: dell-smbios-wmi: Disable userspace interface if missing hotfix
Date: Thu, 16 Nov 2017 18:00:23 -0800	[thread overview]
Message-ID: <20171117020023.GB22250@fury> (raw)
In-Reply-To: <1510865310-19893-1-git-send-email-mario.limonciello@dell.com>

On Thu, Nov 16, 2017 at 02:48:30PM -0600, Mario Limonciello wrote:
> The Dell SMBIOS WMI interface will fail for some more complex calls unless
> a WMI hotfix has been included.  Most platforms have this fix available in
> a maintenance BIOS release.  In the case the driver is loaded on a
> platform without this fix, disable the userspace interface.
> 
> A hotfix indicator is present in the dell-wmi-descriptor that represents
> whether or not more complex calls will work properly.

Is this "hotfix" the same thing as "having the latest firmware
installed" ?

If so, making that clear in the dev_warn messages would be more useful
to the person reading the log.

> 
> "Simple" calls such as those used by dell-laptop and dell-wmi will continue
> to work properly so dell-smbios-wmi should not be blocked from binding and
> being used as the dell-smbios dispatcher.
> 
> Suggested-by: Girish Prakash <girish.prakash@dell.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
> ---
>  drivers/platform/x86/dell-smbios-wmi.c     | 14 ++++++++++++++
>  drivers/platform/x86/dell-wmi-descriptor.c | 26 ++++++++++++++++++++++++--
>  drivers/platform/x86/dell-wmi-descriptor.h |  1 +
>  3 files changed, 39 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/dell-smbios-wmi.c b/drivers/platform/x86/dell-smbios-wmi.c
> index 8ad11ef..a296551 100644
> --- a/drivers/platform/x86/dell-smbios-wmi.c
> +++ b/drivers/platform/x86/dell-smbios-wmi.c
> @@ -147,9 +147,12 @@ static long dell_smbios_wmi_filter(struct wmi_device *wdev, unsigned int cmd,
>  
>  static int dell_smbios_wmi_probe(struct wmi_device *wdev)
>  {
> +	struct wmi_driver *wdriver =
> +		container_of(wdev->dev.driver, struct wmi_driver, driver);
>  	struct wmi_smbios_priv *priv;
>  	int count;
>  	int ret;
> +	u32 hotfix;

Nit. Please keep local variables in descending order by length.
-- 
Darren Hart
VMware Open Source Technology Center

  reply	other threads:[~2017-11-17  2:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 20:48 [PATCH] platform/x86: dell-smbios-wmi: Disable userspace interface if missing hotfix Mario Limonciello
2017-11-17  2:00 ` Darren Hart [this message]
2017-11-17  4:11   ` Mario.Limonciello
2017-11-17  4:11     ` 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=20171117020023.GB22250@fury \
    --to=dvhart@infradead.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@dell.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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.