From: "Frederik van Hövell" <frederik@fvhovell.nl>
To: devel@edk2.groups.io
Cc: "Maciej Rabeda" <maciej.rabeda@linux.intel.com>,
"Jiaxin Wu" <jiaxin.wu@intel.com>,
"Siyuan Fu" <siyuan.fu@intel.com>,
"Frederik van Hövell" <frederik@fvhovell.nl>
Subject: [Patch v1 1/2] [NetworkPkg/SnpDxe] More logging to see why SnpDxe fails to start
Date: Fri, 4 Nov 2022 09:30:26 +0100 [thread overview]
Message-ID: <20221104083027.115025-2-frederik@fvhovell.nl> (raw)
In-Reply-To: <20221104083027.115025-1-frederik@fvhovell.nl>
Add debug logging to see where SnpDxe is failing using a UsbIo UNDI
driver.
Signed-off-by: Frederik van Hövell <frederik@fvhovell.nl>
---
NetworkPkg/SnpDxe/Snp.h | 1 +
NetworkPkg/SnpDxe/Snp.c | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/NetworkPkg/SnpDxe/Snp.h b/NetworkPkg/SnpDxe/Snp.h
index d57804ca2873..dec238c9eb2c 100644
--- a/NetworkPkg/SnpDxe/Snp.h
+++ b/NetworkPkg/SnpDxe/Snp.h
@@ -27,6 +27,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/MemoryAllocationLib.h>
#include <Library/PrintLib.h>
#include <Library/PcdLib.h>
+#include <Library/DevicePathLib.h>
#include <IndustryStandard/Pci.h>
#include <IndustryStandard/Acpi.h>
diff --git a/NetworkPkg/SnpDxe/Snp.c b/NetworkPkg/SnpDxe/Snp.c
index 95361c3cd343..86bf527f31dd 100644
--- a/NetworkPkg/SnpDxe/Snp.c
+++ b/NetworkPkg/SnpDxe/Snp.c
@@ -160,6 +160,7 @@ SimpleNetworkDriverSupported (
// check the version, we don't want to connect to the undi16
//
if (NiiProtocol->Type != EfiNetworkInterfaceUndi) {
+ DEBUG ((DEBUG_NET, "%a: Unsupported type %a for handle %p\n", __FUNCTION__, NiiProtocol->Type, Controller));
Status = EFI_UNSUPPORTED;
goto Done;
}
@@ -218,7 +219,7 @@ SimpleNetworkDriverSupported (
}
Status = EFI_SUCCESS;
- DEBUG ((DEBUG_INFO, "Support(): supported on %p\n", Controller));
+ DEBUG ((DEBUG_INFO, "%a: supported on %p\n", __FUNCTION__, Controller));
Done:
gBS->CloseProtocol (
@@ -283,6 +284,7 @@ SimpleNetworkDriverStart (
);
if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "%a: Failed to get DevicePath for driver %p and handle %p - status %r\n", __FUNCTION__, This->DriverBindingHandle, Controller, Status));
return Status;
}
@@ -293,6 +295,7 @@ SimpleNetworkDriverStart (
);
if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "%a: Failed to locate DevicePath using PCI path %s - status %r\n", __FUNCTION__, ConvertDevicePathToText(NiiDevicePath, TRUE, TRUE), Status));
return Status;
}
@@ -305,6 +308,7 @@ SimpleNetworkDriverStart (
EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "%a: Failed to open PciIo protocol for driver %p and handle %p - status %r\n", __FUNCTION__, This->DriverBindingHandle, Handle, Status));
return Status;
}
@@ -320,6 +324,7 @@ SimpleNetworkDriverStart (
EFI_OPEN_PROTOCOL_BY_DRIVER
);
if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "%a: Failed to open NII protocol for driver %p and controller %p - status %r\n", __FUNCTION__, This->DriverBindingHandle, Controller, Status));
gBS->CloseProtocol (
Controller,
&gEfiDevicePathProtocolGuid,
--
2.35.1
next prev parent reply other threads:[~2022-11-04 8:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 8:30 [Patch v1 0/2] Support SNP over UsbIo-based UNDI driver Frederik van Hövell
2022-11-04 8:30 ` Frederik van Hövell [this message]
2022-11-04 8:30 ` [Patch v1 2/2] [NetworkPkg/SnpDxe] " Frederik van Hövell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221104083027.115025-2-frederik@fvhovell.nl \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox