]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/SNP: remove redundant DEBUG print in SNP Transmit.c
authorFu Siyuan <siyuan.fu@intel.com>
Wed, 15 Nov 2017 03:11:20 +0000 (11:11 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Thu, 16 Nov 2017 06:09:21 +0000 (14:09 +0800)
This patch is to remove some redundant DEBUG output in SNP transmit function.
In case of return EFI_NOT_READY in PxeTransmit, the SNP driver is indicate
the caller that the transmit queue is full, it's a very common situation druing
transmit, not a critical error. So the patch move the DEBUG lever to EFI_D_NET.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
MdeModulePkg/Universal/Network/SnpDxe/Transmit.c

index 73461bce42f4ae6ede98719e96117fac26dd5571..2c7083eb1bc1db79a412ed2b29f937bb3dea4f05 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
     Implementation of transmitting a packet.\r
  \r
 /** @file\r
     Implementation of transmitting a packet.\r
  \r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed \r
 and made available under the terms and conditions of the BSD License which \r
 accompanies this distribution. The full text of the license may be found at \r
 This program and the accompanying materials are licensed \r
 and made available under the terms and conditions of the BSD License which \r
 accompanies this distribution. The full text of the license may be found at \r
@@ -186,7 +186,6 @@ PxeTransmit (
   (*Snp->IssueUndi32Command) ((UINT64) (UINTN) &Snp->Cdb);\r
 \r
   DEBUG ((EFI_D_NET, "\nexit Snp->undi.transmit()  "));\r
   (*Snp->IssueUndi32Command) ((UINT64) (UINTN) &Snp->Cdb);\r
 \r
   DEBUG ((EFI_D_NET, "\nexit Snp->undi.transmit()  "));\r
-  DEBUG ((EFI_D_NET, "\nSnp->Cdb.StatCode == %r", Snp->Cdb.StatCode));\r
 \r
   //\r
   // we will unmap the buffers in get_status call, not here\r
 \r
   //\r
   // we will unmap the buffers in get_status call, not here\r
@@ -199,19 +198,24 @@ PxeTransmit (
   case PXE_STATCODE_QUEUE_FULL:\r
   case PXE_STATCODE_BUSY:\r
     Status = EFI_NOT_READY;\r
   case PXE_STATCODE_QUEUE_FULL:\r
   case PXE_STATCODE_BUSY:\r
     Status = EFI_NOT_READY;\r
+    DEBUG (\r
+      (EFI_D_NET,\r
+      "\nSnp->undi.transmit()  %xh:%xh\n",\r
+      Snp->Cdb.StatFlags,\r
+      Snp->Cdb.StatCode)\r
+      );\r
     break;\r
 \r
   default:\r
     break;\r
 \r
   default:\r
+    DEBUG (\r
+      (EFI_D_ERROR,\r
+      "\nSnp->undi.transmit()  %xh:%xh\n",\r
+      Snp->Cdb.StatFlags,\r
+      Snp->Cdb.StatCode)\r
+      );\r
     Status = EFI_DEVICE_ERROR;\r
   }\r
 \r
     Status = EFI_DEVICE_ERROR;\r
   }\r
 \r
-  DEBUG (\r
-    (EFI_D_ERROR,\r
-    "\nSnp->undi.transmit()  %xh:%xh\n",\r
-    Snp->Cdb.StatFlags,\r
-    Snp->Cdb.StatCode)\r
-    );\r
-\r
   return Status;\r
 }\r
 \r
   return Status;\r
 }\r
 \r