diff options
author | Michael D Kinney <michael.d.kinney@intel.com> | 2021-11-16 19:21:32 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | c49ca4a29ed6076bc2a8fc443130f98c0ed69eda (patch) | |
tree | 5530a5b3627701c42e834ae3aced4cd23ab8fe6c /NetworkPkg/MnpDxe | |
parent | 5f289f3ae3e9fbe6ff5b82d0e25e87bfb7899766 (diff) | |
download | edk2-c49ca4a29ed6076bc2a8fc443130f98c0ed69eda.tar.gz edk2-c49ca4a29ed6076bc2a8fc443130f98c0ed69eda.tar.bz2 edk2-c49ca4a29ed6076bc2a8fc443130f98c0ed69eda.zip |
NetworkPkg: Change use of EFI_D_* to DEBUG_*
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739
Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines.
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Diffstat (limited to 'NetworkPkg/MnpDxe')
-rw-r--r-- | NetworkPkg/MnpDxe/MnpConfig.c | 42 | ||||
-rw-r--r-- | NetworkPkg/MnpDxe/MnpDriver.c | 10 | ||||
-rw-r--r-- | NetworkPkg/MnpDxe/MnpIo.c | 28 |
3 files changed, 40 insertions, 40 deletions
diff --git a/NetworkPkg/MnpDxe/MnpConfig.c b/NetworkPkg/MnpDxe/MnpConfig.c index 3a51210060..b27bc2e1f6 100644 --- a/NetworkPkg/MnpDxe/MnpConfig.c +++ b/NetworkPkg/MnpDxe/MnpConfig.c @@ -67,7 +67,7 @@ MnpAddFreeNbuf ( for (Index = 0; Index < Count; Index++) {
Nbuf = NetbufAlloc (MnpDeviceData->BufferLength + MnpDeviceData->PaddingSize);
if (Nbuf == NULL) {
- DEBUG ((EFI_D_ERROR, "MnpAddFreeNbuf: NetBufAlloc failed.\n"));
+ DEBUG ((DEBUG_ERROR, "MnpAddFreeNbuf: NetBufAlloc failed.\n"));
Status = EFI_OUT_OF_RESOURCES;
break;
@@ -121,7 +121,7 @@ MnpAllocNbuf ( if (FreeNbufQue->BufNum == 0) {
if ((MnpDeviceData->NbufCnt + MNP_NET_BUFFER_INCREASEMENT) > MNP_MAX_NET_BUFFER_NUM) {
DEBUG (
- (EFI_D_ERROR,
+ (DEBUG_ERROR,
"MnpAllocNbuf: The maximum NET_BUF size is reached for MNP driver instance %p.\n",
MnpDeviceData)
);
@@ -133,7 +133,7 @@ MnpAllocNbuf ( Status = MnpAddFreeNbuf (MnpDeviceData, MNP_NET_BUFFER_INCREASEMENT);
if (EFI_ERROR (Status)) {
DEBUG (
- (EFI_D_ERROR,
+ (DEBUG_ERROR,
"MnpAllocNbuf: Failed to add NET_BUFs into the FreeNbufQue, %r.\n",
Status)
);
@@ -230,12 +230,12 @@ MnpAddFreeTxBuf ( for (Index = 0; Index < Count; Index++) {
TxBufWrap = (MNP_TX_BUF_WRAP*) AllocatePool (OFFSET_OF (MNP_TX_BUF_WRAP, TxBuf) + MnpDeviceData->BufferLength );
if (TxBufWrap == NULL) {
- DEBUG ((EFI_D_ERROR, "MnpAddFreeTxBuf: TxBuf Alloc failed.\n"));
+ DEBUG ((DEBUG_ERROR, "MnpAddFreeTxBuf: TxBuf Alloc failed.\n"));
Status = EFI_OUT_OF_RESOURCES;
break;
}
- DEBUG ((EFI_D_INFO, "MnpAddFreeTxBuf: Add TxBufWrap %p, TxBuf %p\n", TxBufWrap, TxBufWrap->TxBuf));
+ DEBUG ((DEBUG_INFO, "MnpAddFreeTxBuf: Add TxBufWrap %p, TxBuf %p\n", TxBufWrap, TxBufWrap->TxBuf));
TxBufWrap->Signature = MNP_TX_BUF_WRAP_SIGNATURE;
TxBufWrap->InUse = FALSE;
InsertTailList (&MnpDeviceData->FreeTxBufList, &TxBufWrap->WrapEntry);
@@ -288,7 +288,7 @@ MnpAllocTxBuf ( if (IsListEmpty (&MnpDeviceData->FreeTxBufList)) {
if ((MnpDeviceData->TxBufCount + MNP_TX_BUFFER_INCREASEMENT) > MNP_MAX_TX_BUFFER_NUM) {
DEBUG (
- (EFI_D_ERROR,
+ (DEBUG_ERROR,
"MnpAllocTxBuf: The maximum TxBuf size is reached for MNP driver instance %p.\n",
MnpDeviceData)
);
@@ -300,7 +300,7 @@ MnpAllocTxBuf ( Status = MnpAddFreeTxBuf (MnpDeviceData, MNP_TX_BUFFER_INCREASEMENT);
if (IsListEmpty (&MnpDeviceData->FreeTxBufList)) {
DEBUG (
- (EFI_D_ERROR,
+ (DEBUG_ERROR,
"MnpAllocNbuf: Failed to add TxBuf into the FreeTxBufList, %r.\n",
Status)
);
@@ -349,7 +349,7 @@ MnpFreeTxBuf ( TxBufWrap = NET_LIST_USER_STRUCT (TxBuf, MNP_TX_BUF_WRAP, TxBuf);
if (TxBufWrap->Signature != MNP_TX_BUF_WRAP_SIGNATURE) {
DEBUG (
- (EFI_D_ERROR,
+ (DEBUG_ERROR,
"MnpFreeTxBuf: Signature check failed in MnpFreeTxBuf.\n")
);
return;
@@ -357,7 +357,7 @@ MnpFreeTxBuf ( if (!TxBufWrap->InUse) {
DEBUG (
- (EFI_D_WARN,
+ (DEBUG_WARN,
"MnpFreeTxBuf: Duplicated recycle report from SNP.\n")
);
return;
@@ -491,7 +491,7 @@ MnpInitializeDeviceData ( NetbufQueInit (&MnpDeviceData->FreeNbufQue);
Status = MnpAddFreeNbuf (MnpDeviceData, MNP_INIT_NET_BUFFER_NUM);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "MnpInitializeDeviceData: MnpAddFreeNbuf failed, %r.\n", Status));
+ DEBUG ((DEBUG_ERROR, "MnpInitializeDeviceData: MnpAddFreeNbuf failed, %r.\n", Status));
goto ERROR;
}
@@ -524,7 +524,7 @@ MnpInitializeDeviceData ( &MnpDeviceData->PollTimer
);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "MnpInitializeDeviceData: CreateEvent for poll timer failed.\n"));
+ DEBUG ((DEBUG_ERROR, "MnpInitializeDeviceData: CreateEvent for poll timer failed.\n"));
goto ERROR;
}
@@ -540,7 +540,7 @@ MnpInitializeDeviceData ( &MnpDeviceData->TimeoutCheckTimer
);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "MnpInitializeDeviceData: CreateEvent for packet timeout check failed.\n"));
+ DEBUG ((DEBUG_ERROR, "MnpInitializeDeviceData: CreateEvent for packet timeout check failed.\n"));
goto ERROR;
}
@@ -556,7 +556,7 @@ MnpInitializeDeviceData ( &MnpDeviceData->MediaDetectTimer
);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "MnpInitializeDeviceData: CreateEvent for media detection failed.\n"));
+ DEBUG ((DEBUG_ERROR, "MnpInitializeDeviceData: CreateEvent for media detection failed.\n"));
goto ERROR;
}
@@ -1222,7 +1222,7 @@ MnpStart ( //
Status = MnpStartSnp (MnpDeviceData->Snp);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "MnpStart: MnpStartSnp failed, %r.\n", Status));
+ DEBUG ((DEBUG_ERROR, "MnpStart: MnpStartSnp failed, %r.\n", Status));
goto ErrorExit;
}
@@ -1237,7 +1237,7 @@ MnpStart ( );
if (EFI_ERROR (Status)) {
DEBUG (
- (EFI_D_ERROR,
+ (DEBUG_ERROR,
"MnpStart, gBS->SetTimer for TimeoutCheckTimer %r.\n",
Status)
);
@@ -1255,7 +1255,7 @@ MnpStart ( );
if (EFI_ERROR (Status)) {
DEBUG (
- (EFI_D_ERROR,
+ (DEBUG_ERROR,
"MnpStart, gBS->SetTimer for MediaDetectTimer %r.\n",
Status)
);
@@ -1274,7 +1274,7 @@ MnpStart ( Status = gBS->SetTimer (MnpDeviceData->PollTimer, TimerOpType, MNP_SYS_POLL_INTERVAL);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "MnpStart: gBS->SetTimer for PollTimer failed, %r.\n", Status));
+ DEBUG ((DEBUG_ERROR, "MnpStart: gBS->SetTimer for PollTimer failed, %r.\n", Status));
goto ErrorExit;
}
@@ -1610,7 +1610,7 @@ MnpConfigReceiveFilters ( MCastFilterCnt = MnpDeviceData->GroupAddressCount;
MCastFilter = AllocatePool (sizeof (EFI_MAC_ADDRESS) * MCastFilterCnt);
if (MCastFilter == NULL) {
- DEBUG ((EFI_D_ERROR, "MnpConfigReceiveFilters: Failed to allocate memory resource for MCastFilter.\n"));
+ DEBUG ((DEBUG_ERROR, "MnpConfigReceiveFilters: Failed to allocate memory resource for MCastFilter.\n"));
return EFI_OUT_OF_RESOURCES;
}
@@ -1672,7 +1672,7 @@ MnpConfigReceiveFilters ( DEBUG_CODE (
if (EFI_ERROR (Status)) {
DEBUG (
- (EFI_D_ERROR,
+ (DEBUG_ERROR,
"MnpConfigReceiveFilters: Snp->ReceiveFilters failed, %r.\n",
Status)
);
@@ -1729,7 +1729,7 @@ MnpGroupOpAddCtrlBlk ( GroupAddress = AllocatePool (sizeof (MNP_GROUP_ADDRESS));
if (GroupAddress == NULL) {
- DEBUG ((EFI_D_ERROR, "MnpGroupOpFormCtrlBlk: Failed to allocate memory resource.\n"));
+ DEBUG ((DEBUG_ERROR, "MnpGroupOpFormCtrlBlk: Failed to allocate memory resource.\n"));
return EFI_OUT_OF_RESOURCES;
}
@@ -1861,7 +1861,7 @@ MnpGroupOp ( //
NewCtrlBlk = AllocatePool (sizeof (MNP_GROUP_CONTROL_BLOCK));
if (NewCtrlBlk == NULL) {
- DEBUG ((EFI_D_ERROR, "MnpGroupOp: Failed to allocate memory resource.\n"));
+ DEBUG ((DEBUG_ERROR, "MnpGroupOp: Failed to allocate memory resource.\n"));
return EFI_OUT_OF_RESOURCES;
}
diff --git a/NetworkPkg/MnpDxe/MnpDriver.c b/NetworkPkg/MnpDxe/MnpDriver.c index dfcdec5d31..4c906eae39 100644 --- a/NetworkPkg/MnpDxe/MnpDriver.c +++ b/NetworkPkg/MnpDxe/MnpDriver.c @@ -164,14 +164,14 @@ MnpDriverBindingStart ( //
MnpDeviceData = AllocateZeroPool (sizeof (MNP_DEVICE_DATA));
if (MnpDeviceData == NULL) {
- DEBUG ((EFI_D_ERROR, "MnpDriverBindingStart(): Failed to allocate the Mnp Device Data.\n"));
+ DEBUG ((DEBUG_ERROR, "MnpDriverBindingStart(): Failed to allocate the Mnp Device Data.\n"));
return EFI_OUT_OF_RESOURCES;
}
Status = MnpInitializeDeviceData (MnpDeviceData, This->DriverBindingHandle, ControllerHandle);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "MnpDriverBindingStart: MnpInitializeDeviceData failed, %r.\n", Status));
+ DEBUG ((DEBUG_ERROR, "MnpDriverBindingStart: MnpInitializeDeviceData failed, %r.\n", Status));
FreePool (MnpDeviceData);
return Status;
@@ -342,7 +342,7 @@ MnpDriverBindingStop ( EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "MnpDriverBindingStop: try to stop unknown Controller.\n"));
+ DEBUG ((DEBUG_ERROR, "MnpDriverBindingStop: try to stop unknown Controller.\n"));
return EFI_DEVICE_ERROR;
}
@@ -468,7 +468,7 @@ MnpServiceBindingCreateChild ( );
if (EFI_ERROR (Status)) {
DEBUG (
- (EFI_D_ERROR,
+ (DEBUG_ERROR,
"MnpServiceBindingCreateChild: Failed to install the MNP protocol, %r.\n",
Status)
);
@@ -614,7 +614,7 @@ MnpServiceBindingDestroyChild ( );
if (EFI_ERROR (Status)) {
DEBUG (
- (EFI_D_ERROR,
+ (DEBUG_ERROR,
"MnpServiceBindingDestroyChild: Failed to uninstall the ManagedNetwork protocol, %r.\n",
Status)
);
diff --git a/NetworkPkg/MnpDxe/MnpIo.c b/NetworkPkg/MnpDxe/MnpIo.c index ae4a18fd81..1f8d2e2504 100644 --- a/NetworkPkg/MnpDxe/MnpIo.c +++ b/NetworkPkg/MnpDxe/MnpIo.c @@ -40,7 +40,7 @@ MnpIsValidTxToken ( // The token is invalid if the Event is NULL, or the TxData is NULL, or
// the fragment count is zero.
//
- DEBUG ((EFI_D_WARN, "MnpIsValidTxToken: Invalid Token.\n"));
+ DEBUG ((DEBUG_WARN, "MnpIsValidTxToken: Invalid Token.\n"));
return FALSE;
}
@@ -49,7 +49,7 @@ MnpIsValidTxToken ( // The token is invalid if the HeaderLength isn't zero while the DestinationAddress
// is NULL (The destination address is already put into the packet).
//
- DEBUG ((EFI_D_WARN, "MnpIsValidTxToken: DestinationAddress isn't NULL, HeaderLength must be 0.\n"));
+ DEBUG ((DEBUG_WARN, "MnpIsValidTxToken: DestinationAddress isn't NULL, HeaderLength must be 0.\n"));
return FALSE;
}
@@ -61,7 +61,7 @@ MnpIsValidTxToken ( //
// The token is invalid if any FragmentLength is zero or any FragmentBuffer is NULL.
//
- DEBUG ((EFI_D_WARN, "MnpIsValidTxToken: Invalid FragmentLength or FragmentBuffer.\n"));
+ DEBUG ((DEBUG_WARN, "MnpIsValidTxToken: Invalid FragmentLength or FragmentBuffer.\n"));
return FALSE;
}
@@ -80,7 +80,7 @@ MnpIsValidTxToken ( // The length calculated from the fragment information doesn't equal to the
// sum of the DataLength and the HeaderLength.
//
- DEBUG ((EFI_D_WARN, "MnpIsValidTxData: Invalid Datalength compared with the sum of fragment length.\n"));
+ DEBUG ((DEBUG_WARN, "MnpIsValidTxData: Invalid Datalength compared with the sum of fragment length.\n"));
return FALSE;
}
@@ -88,7 +88,7 @@ MnpIsValidTxToken ( //
// The total length is larger than the MTU.
//
- DEBUG ((EFI_D_WARN, "MnpIsValidTxData: TxData->DataLength exceeds Mtu.\n"));
+ DEBUG ((DEBUG_WARN, "MnpIsValidTxData: TxData->DataLength exceeds Mtu.\n"));
return FALSE;
}
@@ -233,7 +233,7 @@ MnpSyncSendPacket ( //
// Media not present, skip packet transmit and report EFI_NO_MEDIA
//
- DEBUG ((EFI_D_WARN, "MnpSyncSendPacket: No network cable detected.\n"));
+ DEBUG ((DEBUG_WARN, "MnpSyncSendPacket: No network cable detected.\n"));
Token->Status = EFI_NO_MEDIA;
goto SIGNAL_TOKEN;
}
@@ -338,7 +338,7 @@ MnpInstanceDeliverPacket ( //
DupNbuf = MnpAllocNbuf (MnpDeviceData);
if (DupNbuf == NULL) {
- DEBUG ((EFI_D_WARN, "MnpDeliverPacket: Failed to allocate a free Nbuf.\n"));
+ DEBUG ((DEBUG_WARN, "MnpDeliverPacket: Failed to allocate a free Nbuf.\n"));
return EFI_OUT_OF_RESOURCES;
}
@@ -488,7 +488,7 @@ MnpQueueRcvdPacket ( //
if (Instance->RcvdPacketQueueSize == MNP_MAX_RCVD_PACKET_QUE_SIZE) {
- DEBUG ((EFI_D_WARN, "MnpQueueRcvdPacket: Drop one packet bcz queue size limit reached.\n"));
+ DEBUG ((DEBUG_WARN, "MnpQueueRcvdPacket: Drop one packet bcz queue size limit reached.\n"));
//
// Get the oldest packet.
@@ -724,7 +724,7 @@ MnpWrapRxData ( //
RxDataWrap = AllocatePool (sizeof (MNP_RXDATA_WRAP));
if (RxDataWrap == NULL) {
- DEBUG ((EFI_D_ERROR, "MnpDispatchPacket: Failed to allocate a MNP_RXDATA_WRAP.\n"));
+ DEBUG ((DEBUG_ERROR, "MnpDispatchPacket: Failed to allocate a MNP_RXDATA_WRAP.\n"));
return NULL;
}
@@ -746,7 +746,7 @@ MnpWrapRxData ( &RxDataWrap->RxData.RecycleEvent
);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "MnpDispatchPacket: gBS->CreateEvent failed, %r.\n", Status));
+ DEBUG ((DEBUG_ERROR, "MnpDispatchPacket: gBS->CreateEvent failed, %r.\n", Status));
FreePool (RxDataWrap);
return NULL;
@@ -900,7 +900,7 @@ MnpReceivePacket ( if (EFI_ERROR (Status)) {
DEBUG_CODE (
if (Status != EFI_NOT_READY) {
- DEBUG ((EFI_D_WARN, "MnpReceivePacket: Snp->Receive() = %r.\n", Status));
+ DEBUG ((DEBUG_WARN, "MnpReceivePacket: Snp->Receive() = %r.\n", Status));
}
);
@@ -912,7 +912,7 @@ MnpReceivePacket ( //
if ((HeaderSize != Snp->Mode->MediaHeaderSize) || (BufLen < HeaderSize)) {
DEBUG (
- (EFI_D_WARN,
+ (DEBUG_WARN,
"MnpReceivePacket: Size error, HL:TL = %d:%d.\n",
HeaderSize,
BufLen)
@@ -970,7 +970,7 @@ MnpReceivePacket ( Nbuf = MnpAllocNbuf (MnpDeviceData);
MnpDeviceData->RxNbufCache = Nbuf;
if (Nbuf == NULL) {
- DEBUG ((EFI_D_ERROR, "MnpReceivePacket: Alloc packet for receiving cache failed.\n"));
+ DEBUG ((DEBUG_ERROR, "MnpReceivePacket: Alloc packet for receiving cache failed.\n"));
return EFI_DEVICE_ERROR;
}
@@ -1059,7 +1059,7 @@ MnpCheckPacketTimeout ( //
// Drop the timeout packet.
//
- DEBUG ((EFI_D_WARN, "MnpCheckPacketTimeout: Received packet timeout.\n"));
+ DEBUG ((DEBUG_WARN, "MnpCheckPacketTimeout: Received packet timeout.\n"));
MnpRecycleRxData (NULL, RxDataWrap);
Instance->RcvdPacketQueueSize--;
}
|