Parcourir la source

[efi] Attempt to start only drivers claiming support for a device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown il y a 10 ans
Parent
révision
56b2f66dd2
1 fichiers modifiés avec 7 ajouts et 0 suppressions
  1. 7
    0
      src/interface/efi/efi_driver.c

+ 7
- 0
src/interface/efi/efi_driver.c Voir le fichier

@@ -269,6 +269,13 @@ efi_driver_start ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
269 269
 
270 270
 	/* Try to start this device */
271 271
 	for_each_table_entry ( efidrv, EFI_DRIVERS ) {
272
+		if ( ( rc = efidrv->supported ( device ) ) != 0 ) {
273
+			DBGC ( device, "EFIDEV %p %s is not supported by "
274
+			       "driver \"%s\": %s\n",
275
+			       device, efi_devpath_text ( efidev->path ),
276
+			       efidrv->name, strerror ( rc ) );
277
+			continue;
278
+		}
272 279
 		if ( ( rc = efidrv->start ( efidev ) ) == 0 ) {
273 280
 			efidev->driver = efidrv;
274 281
 			DBGC ( device, "EFIDRV %p %s using driver \"%s\"\n",

Chargement…
Annuler
Enregistrer