summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/efi/nii.c
diff options
context:
space:
mode:
authorMichael Brown2023-01-23 20:15:45 +0100
committerMichael Brown2023-01-23 20:27:13 +0100
commit2fef0c541e4e2417fc285c4d9ddfcb6f23f394ad (patch)
treea81c522bfe50ab496e0aa078a95f6cb4e2cbd0ba /src/drivers/net/efi/nii.c
parent[efi] Add efi_path_prev() utility function (diff)
downloadipxe-2fef0c541e4e2417fc285c4d9ddfcb6f23f394ad.tar.gz
ipxe-2fef0c541e4e2417fc285c4d9ddfcb6f23f394ad.tar.xz
ipxe-2fef0c541e4e2417fc285c4d9ddfcb6f23f394ad.zip
[efi] Extend efi_locate_device() to allow searching up the device path
Extend the functionality of efi_locate_device() to allow callers to find instances of the protocol that may exist further up the device path. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/efi/nii.c')
-rw-r--r--src/drivers/net/efi/nii.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/net/efi/nii.c b/src/drivers/net/efi/nii.c
index 5d9aea8d..be5bce4b 100644
--- a/src/drivers/net/efi/nii.c
+++ b/src/drivers/net/efi/nii.c
@@ -222,7 +222,7 @@ static int nii_pci_open ( struct nii_nic *nii ) {
/* Locate PCI I/O protocol */
if ( ( rc = efi_locate_device ( device, &efi_pci_io_protocol_guid,
- &pci_device ) ) != 0 ) {
+ &pci_device, 0 ) ) != 0 ) {
DBGC ( nii, "NII %s could not locate PCI I/O protocol: %s\n",
nii->dev.name, strerror ( rc ) );
goto err_locate;