MdeModulePkg: Put USB DEBUGs that occur for bulk timeouts under VERBOSE

With the pending commit of UsbNetworkPkg, it will become common for
UsbBulkTransfer calls to timeout, given that the drivers are called from
MnpSystemPoll every MNP_SYS_POLL_INTERVAL milliseconds: the drivers
check for network packets by calling UsbBulkTransfer with a timeout of
1ms.

Avoid console spam by moving DEBUG messages that occur each time a bulk
transfer request times out from DEBUG_ERROR to DEBUG_VERBOSE, for both
EHCI and XHCI drivers.

Signed-off-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
Rebecca Cran
2022-12-06 22:30:39 +08:00
committed by mergify[bot]
parent ca33daafc6
commit d9e7f6fe49
4 changed files with 20 additions and 6 deletions

View File

@@ -848,6 +848,7 @@ EhcBulkTransfer (
URB *Urb;
EFI_TPL OldTpl;
EFI_STATUS Status;
UINTN DebugErrorLevel;
//
// Validate the parameters
@@ -932,7 +933,13 @@ ON_EXIT:
gBS->RestoreTPL (OldTpl);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "EhcBulkTransfer: error - %r, transfer - %x\n", Status, *TransferResult));
if (Status == EFI_TIMEOUT) {
DebugErrorLevel = DEBUG_VERBOSE;
} else {
DebugErrorLevel = DEBUG_ERROR;
}
DEBUG ((DebugErrorLevel, "EhcBulkTransfer: error - %r, transfer - %x\n", Status, *TransferResult));
}
return Status;