diff mbox

dell_smbios in 4.15 and keyboard backlight

Message ID 37740d49c7404fae824ff075fb87fbe9@ausx13mpc120.AMER.DELL.COM (mailing list archive)
State Changes Requested, archived
Delegated to: Darren Hart
Headers show

Commit Message

Limonciello, Mario Feb. 23, 2018, 7:19 p.m. UTC
> -----Original Message-----
> From: Marco d'Itri [mailto:md@linux.it]
> Sent: Friday, February 23, 2018 1:06 PM
> To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> Cc: pali.rohar@gmail.com
> Subject: Re: dell_smbios in 4.15 and keyboard backlight
> 
> On Feb 23, Mario Limonciello <superm1@gmail.com> wrote:
> 
> > Can you please email me on mario.limonciello@dell.com 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.

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:


Thoughts?

Comments

Andy Shevchenko Feb. 23, 2018, 7:40 p.m. UTC | #1
On Fri, 2018-02-23 at 19:19 +0000, Mario.Limonciello@dell.com wrote:
> > -----Original Message-----
> > From: Marco d'Itri [mailto:md@linux.it]
> > Sent: Friday, February 23, 2018 1:06 PM
> > To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> > Cc: pali.rohar@gmail.com
> > Subject: Re: dell_smbios in 4.15 and keyboard backlight
> > 
> > On Feb 23, Mario Limonciello <superm1@gmail.com> wrote:
> > 
> > > Can you please email me on mario.limonciello@dell.com 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.

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

> 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.

>  
>  config DELL_SMBIOS_WMI
>         tristate "Dell SMBIOS calling interface (WMI implementation)"
> 
> Thoughts?
Pali Rohár Feb. 23, 2018, 8:09 p.m. UTC | #2
On Friday 23 February 2018 21:40:56 Andy Shevchenko wrote:
> On Fri, 2018-02-23 at 19:19 +0000, Mario.Limonciello@dell.com wrote:
> > > -----Original Message-----
> > > From: Marco d'Itri [mailto:md@linux.it]
> > > Sent: Friday, February 23, 2018 1:06 PM
> > > To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> > > Cc: pali.rohar@gmail.com
> > > Subject: Re: dell_smbios in 4.15 and keyboard backlight
> > > 
> > > On Feb 23, Mario Limonciello <superm1@gmail.com> wrote:
> > > 
> > > > Can you please email me on mario.limonciello@dell.com 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.

But this combination of options is invalid and does not make sense.
Andy Shevchenko Feb. 23, 2018, 8:14 p.m. UTC | #3
On Fri, 2018-02-23 at 21:09 +0100, Pali Rohár wrote:
> On Friday 23 February 2018 21:40:56 Andy Shevchenko wrote:
> > On Fri, 2018-02-23 at 19:19 +0000, Mario.Limonciello@dell.com wrote:
> > > > -----Original Message-----
> > > > From: Marco d'Itri [mailto:md@linux.it]
> > > > Sent: Friday, February 23, 2018 1:06 PM
> > > > To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> > > > Cc: pali.rohar@gmail.com
> > > > Subject: Re: dell_smbios in 4.15 and keyboard backlight
> > > > 
> > > > On Feb 23, Mario Limonciello <superm1@gmail.com> wrote:
> > > > 
> > > > > Can you please email me on mario.limonciello@dell.com 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.
> 
> But this combination of options is invalid and does not make sense.
> 

Perhaps, you can explain this to Torvalds then?

https://lkml.org/lkml/2017/11/18/257
Pali Rohár Feb. 23, 2018, 8:32 p.m. UTC | #4
On Friday 23 February 2018 22:14:17 Andy Shevchenko wrote:
> On Fri, 2018-02-23 at 21:09 +0100, Pali Rohár wrote:
> > On Friday 23 February 2018 21:40:56 Andy Shevchenko wrote:
> > > On Fri, 2018-02-23 at 19:19 +0000, Mario.Limonciello@dell.com wrote:
> > > > > -----Original Message-----
> > > > > From: Marco d'Itri [mailto:md@linux.it]
> > > > > Sent: Friday, February 23, 2018 1:06 PM
> > > > > To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> > > > > Cc: pali.rohar@gmail.com
> > > > > Subject: Re: dell_smbios in 4.15 and keyboard backlight
> > > > > 
> > > > > On Feb 23, Mario Limonciello <superm1@gmail.com> wrote:
> > > > > 
> > > > > > Can you please email me on mario.limonciello@dell.com 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.
> > 
> > But this combination of options is invalid and does not make sense.
> > 
> 
> Perhaps, you can explain this to Torvalds then?
> 
> https://lkml.org/lkml/2017/11/18/257

That is something different. Linus wrote:
You add new drivers and then default them to "on".

But here we have a driver dell-laptop.ko which needs for proper work
driver dell-smbios.ko. And dell-smbios.ko needs for proper work
dell-smbios-smm.ko or dell-smbios-wmi.ko (one is enough).

But if you do not enable (or need) dell-laptop.ko then you do not need
all others. (There are also other drivers which needs dell-smbios.ko).

So I agree with Linus, CONFIG_DELL_SMBIOS does not have to be on by
default. But it should be automatically enabled when CONFIG_DELL_LAPTOP
is set.

We have just a complicated dependency graph and I'm not sure if we can
describe it for Kconfig definitions... And if Kconfig does not support
it I would suggest to add #ifdef/#error checks into driver code to
prevent compilation of non sense combinations. I think it is better to
throw compile error as trying to compile kernel with non sense options
which would lead to problem like we got reported.
Limonciello, Mario Feb. 23, 2018, 8:33 p.m. UTC | #5
> -----Original Message-----

> From: platform-driver-x86-owner@vger.kernel.org [mailto:platform-driver-x86-

> owner@vger.kernel.org] On Behalf Of Andy Shevchenko

> Sent: Friday, February 23, 2018 2:14 PM

> To: Pali Rohár <pali.rohar@gmail.com>

> Cc: Limonciello, Mario <Mario_Limonciello@Dell.com>; md@linux.it;

> dvhart@infradead.org; platform-driver-x86@vger.kernel.org

> Subject: Re: dell_smbios in 4.15 and keyboard backlight

> 

> On Fri, 2018-02-23 at 21:09 +0100, Pali Rohár wrote:

> > On Friday 23 February 2018 21:40:56 Andy Shevchenko wrote:

> > > On Fri, 2018-02-23 at 19:19 +0000, Mario.Limonciello@dell.com wrote:

> > > > > -----Original Message-----

> > > > > From: Marco d'Itri [mailto:md@linux.it]

> > > > > Sent: Friday, February 23, 2018 1:06 PM

> > > > > To: Limonciello, Mario <Mario_Limonciello@Dell.com>

> > > > > Cc: pali.rohar@gmail.com

> > > > > Subject: Re: dell_smbios in 4.15 and keyboard backlight

> > > > >

> > > > > On Feb 23, Mario Limonciello <superm1@gmail.com> wrote:

> > > > >

> > > > > > Can you please email me on mario.limonciello@dell.com 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.

> >

> > But this combination of options is invalid and does not make sense.

> >

> 

> Perhaps, you can explain this to Torvalds then?

> 

> https://lkml.org/lkml/2017/11/18/257

> 


This makes me wish that dell-smbios-wmi.o dell-smbios-smm.o and
dell-smbios.o all linked into dell-smbios.ko based on what config
options were selected.
Darren Hart Feb. 24, 2018, 9:49 p.m. UTC | #6
On Fri, Feb 23, 2018 at 09:32:55PM +0100, Pali Rohár wrote:
> On Friday 23 February 2018 22:14:17 Andy Shevchenko wrote:
> > On Fri, 2018-02-23 at 21:09 +0100, Pali Rohár wrote:
> > > On Friday 23 February 2018 21:40:56 Andy Shevchenko wrote:
> > > > On Fri, 2018-02-23 at 19:19 +0000, Mario.Limonciello@dell.com wrote:
...
> > > > > 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.
> > > 
> > > But this combination of options is invalid and does not make sense.
> > > 
> > 
> > Perhaps, you can explain this to Torvalds then?
> > 
> > https://lkml.org/lkml/2017/11/18/257
> 
> That is something different. Linus wrote:
> You add new drivers and then default them to "on".
> 
> But here we have a driver dell-laptop.ko which needs for proper work

Correct. We have a dependency issue we need to address. Reading further...
diff mbox

Patch

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
 
 config DELL_SMBIOS_WMI
        tristate "Dell SMBIOS calling interface (WMI implementation)"