RE: dell_smbios in 4.15 and keyboard backlight

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Andy Shevchenko [mailto:andriy.shevchenko@xxxxxxxxxxxxxxx]
> Sent: Friday, February 23, 2018 1:41 PM
> To: Limonciello, Mario <Mario_Limonciello@xxxxxxxx>; md@xxxxxxxx;
> dvhart@xxxxxxxxxxxxx
> Cc: pali.rohar@xxxxxxxxx; platform-driver-x86@xxxxxxxxxxxxxxx
> Subject: Re: dell_smbios in 4.15 and keyboard backlight
> 
> On Fri, 2018-02-23 at 19:19 +0000, Mario.Limonciello@xxxxxxxx wrote:
> > > -----Original Message-----
> > > From: Marco d'Itri [mailto:md@xxxxxxxx]
> > > Sent: Friday, February 23, 2018 1:06 PM
> > > To: Limonciello, Mario <Mario_Limonciello@xxxxxxxx>
> > > Cc: pali.rohar@xxxxxxxxx
> > > Subject: Re: dell_smbios in 4.15 and keyboard backlight
> > >
> > > On Feb 23, Mario Limonciello <superm1@xxxxxxxxx> wrote:
> > >
> > > > Can you please email me on mario.limonciello@xxxxxxxx for this
> > > > topic?
> > > >
> > > > I would be interested to know do you have dell-smbios-smm or
> > > > dell-smbios-wmi not loading or compiling?
> > >
> > > Oops... The new modules have not been enabled yet by the Debian
> > > kernel
> > > team, so this explains why I could not find them.
> > > Thank you for your help, I will get back to you if I will still have
> > > troubles with the new kernel.
> > >
> >
> > If you don't mind I'm going to CC this to the mailing list for
> > discussion.  I think
> > you identified a valid config problem.
> >
> > Andy, Darren,
> >
> > Marco (CC'ed) privately emailed Pali and I to discuss an issue that
> > dell-laptop
> > wasn't working properly for him and dell-smbios couldn't find a
> > backend.
> >
> > I thought at first it was an issue of the race condition recently
> > discussed but
> > it's actually a case that the distro kernel he's using compiled:
> >
> > DELL_SMBIOS
> > DELL_LAPTOP
> >
> > But didn't select DELL_SMBIOS_WMI or DELL_SMBIOS_SMM.
> 
> Distros have to enable whatever they want to.
At least in this instance I'd hypothesize it's because these are new config
options that default to off.

They probably had DELL_SMBIOS enabled before and carried that forward
But there was nothing to transition them to make them turn on 
DELL_SMBIOS_WMI or DELL_SMBIOS_SMM.

> 
> Can it be the Dell model, that survives w/o one of above or even both?

The design as it exists to day is that dell-laptop needs dell-smbios but
dell-smbios won't run unless it has a backend selected.

> 
> > I remember hypothesizing about this with one of the earlier versions
> > of the
> > patch series but the decision was to just hide config DELL_SMBIOS as
> > an invisible
> > tristate.
> 
> 
> > Because this is a real problem happening I think we need something
> > like this:
> >
> > diff --git a/drivers/platform/x86/Kconfig
> > b/drivers/platform/x86/Kconfig
> > index 9a8f964..f2f548b 100644
> > --- a/drivers/platform/x86/Kconfig
> > +++ b/drivers/platform/x86/Kconfig
> > @@ -107,6 +107,7 @@ config ASUS_LAPTOP
> >
> >  config DELL_SMBIOS
> >         tristate
> > +       depends on DELL_SMBIOS_WMI || DELL_SMBIOS_SMM
> 
> This will simple not work.
You're right, I tried it and got this:
warning: (DELL_SMBIOS_WMI && DELL_SMBIOS_SMM && DELL_LAPTOP && DELL_WMI) selects DELL_SMBIOS which has unmet direct dependencies (X86 && X86_PLATFORM_DEVICES && (DELL_SMBIOS_WMI || DELL_SMBIOS_SMM))
warning: (DELL_SMBIOS_WMI && DELL_SMBIOS_SMM && DELL_LAPTOP && DELL_WMI) selects DELL_SMBIOS which has unmet direct dependencies (X86 && X86_PLATFORM_DEVICES && (DELL_SMBIOS_WMI || DELL_SMBIOS_SMM))

but it still let me go forward.

Something like this maybe then to not let them even try to run dell-smbios?

diff --git a/drivers/platform/x86/dell-smbios.c b/drivers/platform/x86/dell-smbios.c
index 8541cde..71489fe 100644
--- a/drivers/platform/x86/dell-smbios.c
+++ b/drivers/platform/x86/dell-smbios.c
@@ -556,6 +556,11 @@ static int __init dell_smbios_init(void)
        const struct dmi_device *valid;
        int ret;
 
+#if !defined(CONFIG_DELL_SMBIOS_WMI) && !defined(CONFIG_DELL_SMBIOS_SMM)
+       pr_err("Missing SMBIOS backend.");
+       return -ENODEV;
+#endif
+
        valid = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL);
        if (!valid) {
                pr_err("Unable to run on non-Dell system\n");




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux