Re: [PATCH v2 2/2] platform/x86: dell-*wmi*: Relay failed initial probe to dependent drivers

From: Darren Hart
Date: Thu Nov 09 2017 - 18:44:31 EST


On Thu, Nov 09, 2017 at 11:49:10AM -0600, Mario Limonciello wrote:
> dell-wmi and dell-smbios-wmi are dependent upon dell-wmi-descriptor
> finishing probe successfully to probe themselves.
>
> Currently if dell-wmi-descriptor fails probing in a non-recoverable way
> (such as invalid header) dell-wmi and dell-smbios-wmi will continue to
> try to redo probing due to deferred probing.
>
> To solve this have the dependent drivers query the dell-wmi-descriptor
> driver whether the descriptor has been determined valid. The possible
> results are:
> -ENODEV: Descriptor GUID missing from WMI bus
> -EPROBE_DEFER: Descriptor not yet probed, dependent driver should wait
> and use deferred probing
> < 0: Descriptor probed, invalid. Dependent driver should return an
> error.
> 0: Successful descriptor probe, dependent driver can continue
>
> Successful descriptor probe still doesn't mean that the descriptor driver
> is necessarily bound at the time of initialization of dependent driver.
> Userspace can unbind the driver, so all methods used from driver
> should still be verified to return success values otherwise deferred
> probing be used.


This is a good improvement. Will give Pali a chance to offer his signature, and
will merge then.
--
Darren Hart
VMware Open Source Technology Center