* [PATCH] efi: fix probing of EFI devices with parents
@ 2025-08-13 21:40 Tobias Waldekranz
2025-08-14 7:16 ` Ahmad Fatoum
2025-08-14 10:54 ` Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Tobias Waldekranz @ 2025-08-13 21:40 UTC (permalink / raw)
To: barebox
The refactor in the referenced commit sends in the match function as
the context data - instead of the handle we are looking for.
This meant that efi_find_device() always returned NULL, leading to all
EFI devices with parent handles not being probed.
Fix this by sending in the handle instead.
Fixes: 4a5a9b58b568 ("drive: bus: make use of new bus_find_device helper")
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
---
drivers/efi/efi-device.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/efi/efi-device.c b/drivers/efi/efi-device.c
index 0e6f75659f..f0e22bd140 100644
--- a/drivers/efi/efi-device.c
+++ b/drivers/efi/efi-device.c
@@ -40,8 +40,7 @@ static struct efi_device *efi_find_device(efi_handle_t handle)
{
struct device *dev;
- dev = bus_find_device(&efi_bus, NULL, efi_device_match_handle,
- efi_device_match_handle);
+ dev = bus_find_device(&efi_bus, NULL, handle, efi_device_match_handle);
if (dev)
return container_of(dev, struct efi_device, dev);
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] efi: fix probing of EFI devices with parents
2025-08-13 21:40 [PATCH] efi: fix probing of EFI devices with parents Tobias Waldekranz
@ 2025-08-14 7:16 ` Ahmad Fatoum
2025-08-14 10:54 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2025-08-14 7:16 UTC (permalink / raw)
To: Tobias Waldekranz, barebox
Hi Tobias,
On 13.08.25 23:40, Tobias Waldekranz wrote:
> The refactor in the referenced commit sends in the match function as
> the context data - instead of the handle we are looking for.
>
> This meant that efi_find_device() always returned NULL, leading to all
> EFI devices with parent handles not being probed.
>
> Fix this by sending in the handle instead.
>
> Fixes: 4a5a9b58b568 ("drive: bus: make use of new bus_find_device helper")
> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Thanks for fixing this before it hit a release!
I just sent out a regression test, so this particular issue
can't go unnoticed in future.
Cheers,
Ahmad
> ---
> drivers/efi/efi-device.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/efi/efi-device.c b/drivers/efi/efi-device.c
> index 0e6f75659f..f0e22bd140 100644
> --- a/drivers/efi/efi-device.c
> +++ b/drivers/efi/efi-device.c
> @@ -40,8 +40,7 @@ static struct efi_device *efi_find_device(efi_handle_t handle)
> {
> struct device *dev;
>
> - dev = bus_find_device(&efi_bus, NULL, efi_device_match_handle,
> - efi_device_match_handle);
> + dev = bus_find_device(&efi_bus, NULL, handle, efi_device_match_handle);
> if (dev)
> return container_of(dev, struct efi_device, dev);
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] efi: fix probing of EFI devices with parents
2025-08-13 21:40 [PATCH] efi: fix probing of EFI devices with parents Tobias Waldekranz
2025-08-14 7:16 ` Ahmad Fatoum
@ 2025-08-14 10:54 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2025-08-14 10:54 UTC (permalink / raw)
To: barebox, Tobias Waldekranz
On Wed, 13 Aug 2025 23:40:45 +0200, Tobias Waldekranz wrote:
> The refactor in the referenced commit sends in the match function as
> the context data - instead of the handle we are looking for.
>
> This meant that efi_find_device() always returned NULL, leading to all
> EFI devices with parent handles not being probed.
>
> Fix this by sending in the handle instead.
>
> [...]
Applied, thanks!
[1/1] efi: fix probing of EFI devices with parents
https://git.pengutronix.de/cgit/barebox/commit/?id=ec9e3a0a0356 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-14 15:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-13 21:40 [PATCH] efi: fix probing of EFI devices with parents Tobias Waldekranz
2025-08-14 7:16 ` Ahmad Fatoum
2025-08-14 10:54 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox