[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170720162330.GN16493@pali>
Date: Thu, 20 Jul 2017 18:23:30 +0200
From: Pali Rohár <pali.rohar@...il.com>
To: Andy Lutomirski <luto@...nel.org>
Cc: Darren Hart <dvhart@...radead.org>,
Andy Lutomirski <luto@...capital.net>,
Mario Limonciello <mario_limonciello@...l.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
LKML <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>, lkp@...org,
kernel test robot <xiaolong.ye@...el.com>
Subject: Re: [lkp-robot] [platform/x86] bff589be59:
kmsg.dell_wmi:Cannot_read_Dell_descriptor_buffer
On Thursday 20 July 2017 09:02:20 kernel test robot wrote:
> commit: bff589be59c50924a9715951160578e570cba5c6 ("platform/x86: dell-wmi: Convert to the WMI bus infrastructure")
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
>
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
>
> [ 7.104086] dell_wmi: Cannot read Dell descriptor buffer - 1
Hi Andy! Problem is in following code:
static int __init dell_wmi_init(void)
{
int err;
err = dell_wmi_check_descriptor_buffer();
if (err)
return err;
dmi_check_system(dell_wmi_smbios_list);
if (wmi_requires_smbios_request) {
err = dell_wmi_events_set_enabled(true);
if (err) {
pr_err("Failed to enable WMI events\n");
return err;
}
}
return wmi_driver_register(&dell_wmi_driver);
}
module_init(dell_wmi_init);
static void __exit dell_wmi_exit(void)
{
if (wmi_requires_smbios_request)
dell_wmi_events_set_enabled(false);
wmi_driver_unregister(&dell_wmi_driver);
}
module_exit(dell_wmi_exit);
dell_wmi_init and dell_wmi_exit should just call wmi_driver_register and
wmi_driver_unregister.
All those other calls (like different checks or enabling wmi events)
should be done in dell_wmi_probe from dell_wmi_driver structure. Same
for dell_wmi_remove.
Basically with this bus interface you should be able to load dell-wmi.ko
also on non-dell machines. Just bus code would not create and register
wmi device and so no probe would be called.
--
Pali Rohár
pali.rohar@...il.com
Powered by blists - more mailing lists