From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=siyuan.fu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8628E220D4BE3 for ; Tue, 14 Nov 2017 19:10:38 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2017 19:14:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,398,1505804400"; d="scan'208";a="1687901" Received: from sfu5-mobl.ccr.corp.intel.com ([10.239.192.240]) by fmsmga004.fm.intel.com with ESMTP; 14 Nov 2017 19:14:45 -0800 From: Fu Siyuan To: edk2-devel@lists.01.org Cc: Wu Jiaxin , Ye Ting Date: Wed, 15 Nov 2017 11:14:43 +0800 Message-Id: <20171115031443.17784-1-siyuan.fu@intel.com> X-Mailer: git-send-email 2.13.0.windows.1 Subject: [Patch] MdeModulePkg/SNP: remove redundant DEBUG print in SNP Transmit.c X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 03:10:38 -0000 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 Cc: Wu Jiaxin Cc: Ye Ting --- MdeModulePkg/Universal/Network/SnpDxe/Transmit.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c b/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c index 73461bc..2c7083e 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c @@ -1,7 +1,7 @@ /** @file Implementation of transmitting a packet. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -186,7 +186,6 @@ PxeTransmit ( (*Snp->IssueUndi32Command) ((UINT64) (UINTN) &Snp->Cdb); DEBUG ((EFI_D_NET, "\nexit Snp->undi.transmit() ")); - DEBUG ((EFI_D_NET, "\nSnp->Cdb.StatCode == %r", Snp->Cdb.StatCode)); // // we will unmap the buffers in get_status call, not here @@ -199,19 +198,24 @@ PxeTransmit ( case PXE_STATCODE_QUEUE_FULL: case PXE_STATCODE_BUSY: Status = EFI_NOT_READY; + DEBUG ( + (EFI_D_NET, + "\nSnp->undi.transmit() %xh:%xh\n", + Snp->Cdb.StatFlags, + Snp->Cdb.StatCode) + ); break; default: + DEBUG ( + (EFI_D_ERROR, + "\nSnp->undi.transmit() %xh:%xh\n", + Snp->Cdb.StatFlags, + Snp->Cdb.StatCode) + ); Status = EFI_DEVICE_ERROR; } - DEBUG ( - (EFI_D_ERROR, - "\nSnp->undi.transmit() %xh:%xh\n", - Snp->Cdb.StatFlags, - Snp->Cdb.StatCode) - ); - return Status; } -- 1.9.5.msysgit.1