summaryrefslogtreecommitdiffstats
path: root/src/interface/efi/efi_pci.c
diff options
context:
space:
mode:
authorMichael Brown2014-07-31 11:44:25 +0200
committerMichael Brown2014-07-31 12:56:44 +0200
commit2e0821b9edc354387687d7c01e18616964ceaeda (patch)
tree7975ea34b0f82ed519363049e20738d97f02b129 /src/interface/efi/efi_pci.c
parent[efi] Add ability to dump all openers of a given protocol on a handle (diff)
downloadipxe-2e0821b9edc354387687d7c01e18616964ceaeda.tar.gz
ipxe-2e0821b9edc354387687d7c01e18616964ceaeda.tar.xz
ipxe-2e0821b9edc354387687d7c01e18616964ceaeda.zip
[efi] Use efi_handle_name() instead of efi_handle_devpath_text()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi/efi_pci.c')
-rw-r--r--src/interface/efi/efi_pci.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/interface/efi/efi_pci.c b/src/interface/efi/efi_pci.c
index 7132263b6..5b58c9b6b 100644
--- a/src/interface/efi/efi_pci.c
+++ b/src/interface/efi/efi_pci.c
@@ -149,8 +149,7 @@ int efipci_open ( EFI_HANDLE device, UINT32 attributes,
device, attributes ) ) != 0 ) {
rc = -EEFI_PCI ( efirc );
DBGCP ( device, "EFIPCI %p %s cannot open PCI protocols: %s\n",
- device, efi_handle_devpath_text ( device ),
- strerror ( rc ) );
+ device, efi_handle_name ( device ), strerror ( rc ) );
goto err_open_protocol;
}
@@ -160,14 +159,13 @@ int efipci_open ( EFI_HANDLE device, UINT32 attributes,
&pci_fn ) ) != 0 ) {
rc = -EEFI ( efirc );
DBGC ( device, "EFIPCI %p %s could not get PCI location: %s\n",
- device, efi_handle_devpath_text ( device ),
- strerror ( rc ) );
+ device, efi_handle_name ( device ), strerror ( rc ) );
goto err_get_location;
}
- DBGC2 ( device, "EFIPCI %p %s is PCI %04lx:%02lx:%02lx.%lx\n",
- device, efi_handle_devpath_text ( device ),
- ( ( unsigned long ) pci_segment ), ( ( unsigned long ) pci_bus),
- ( ( unsigned long ) pci_dev ), ( ( unsigned long ) pci_fn ) );
+ DBGC2 ( device, "EFIPCI %p %s is PCI %04lx:%02lx:%02lx.%lx\n", device,
+ efi_handle_name ( device ), ( ( unsigned long ) pci_segment ),
+ ( ( unsigned long ) pci_bus ), ( ( unsigned long ) pci_dev ),
+ ( ( unsigned long ) pci_fn ) );
/* Try to enable I/O cycles, memory cycles, and bus mastering.
* Some platforms will 'helpfully' report errors if these bits
@@ -189,7 +187,7 @@ int efipci_open ( EFI_HANDLE device, UINT32 attributes,
pci_init ( pci, PCI_BUSDEVFN ( pci_bus, pci_dev, pci_fn ) );
if ( ( rc = pci_read_config ( pci ) ) != 0 ) {
DBGC ( device, "EFIPCI %p %s cannot read PCI configuration: "
- "%s\n", device, efi_handle_devpath_text ( device ),
+ "%s\n", device, efi_handle_name ( device ),
strerror ( rc ) );
goto err_pci_read_config;
}
@@ -261,11 +259,11 @@ static int efipci_supported ( EFI_HANDLE device ) {
/* Look for a driver */
if ( ( rc = pci_find_driver ( &pci ) ) != 0 ) {
DBGCP ( device, "EFIPCI %p %s has no driver\n",
- device, efi_handle_devpath_text ( device ) );
+ device, efi_handle_name ( device ) );
return rc;
}
DBGC ( device, "EFIPCI %p %s has driver \"%s\"\n",
- device, efi_handle_devpath_text ( device ), pci.id->name );
+ device, efi_handle_name ( device ), pci.id->name );
return 0;
}