From nobody Fri May 3 16:10:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+97036+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+97036+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=quicinc.com ARC-Seal: i=1; a=rsa-sha256; t=1670337065; cv=none; d=zohomail.com; s=zohoarc; b=mI3tUJ8tgbHMKCtXpbtdeCWkx0xvTqn0wpHGUEXBKrJXEHP40BJrONSNyY8WDzPvvWtfVq95YL2W6uQIerh1DHFJtNzEbiyCMqo4K9sB+oEKOWsbpRqLPXRJatrwnDVdb/7qwWlWt6o7eGYPBMUdIryPLpLM0yuIaypJydnfico= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670337065; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=hGoQghMf5hZwIbsRIjb+uIAsTJqBuYHsG4CH2KrRfQY=; b=WiPAM+kEZzq925K2fqmj/AdcyuYVGfEjp6EbMFTom+L0MFg49qdHFcrwiDnLdQW8XZX041tnU+KgyEqbXvZUw2N72NFGwVlvK6dMtxlz3FnUr2Rah6mAoO5oiSChF+nQfdxnE3m3X3MLnGWURGRxZ3PzHGA77D4reFer4aoWuWk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+97036+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 167033706585066.09023256198702; Tue, 6 Dec 2022 06:31:05 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id PPCrYY1788612xs0DdTBnxep; Tue, 06 Dec 2022 06:31:05 -0800 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web11.49100.1670337062049935503 for ; Tue, 06 Dec 2022 06:31:02 -0800 X-Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B69SpPq024836; Tue, 6 Dec 2022 14:30:55 GMT X-Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3m9xkc9gm0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Dec 2022 14:30:55 +0000 X-Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2B6EUs12009680 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 6 Dec 2022 14:30:54 GMT X-Received: from linbox.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 6 Dec 2022 06:30:53 -0800 From: "Rebecca Cran" To: , Liming Gao , Ray Ni , J Wang , Hao Wu CC: Rebecca Cran Subject: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Put USB DEBUGs that occur for bulk timeouts under VERBOSE Date: Tue, 6 Dec 2022 07:30:39 -0700 Message-ID: <20221206143039.278566-2-rebecca@quicinc.com> In-Reply-To: <20221206143039.278566-1-rebecca@quicinc.com> References: <20221206143039.278566-1-rebecca@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-ORIG-GUID: 8bE-dv3c5DL16VQ0GSwTX9vKDMhyuIuC X-Proofpoint-GUID: 8bE-dv3c5DL16VQ0GSwTX9vKDMhyuIuC Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,quic_rcran@quicinc.com X-Gm-Message-State: yBQwP3009gIrWcgt0v0lMWGyx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1670337065; bh=+AXiIAnebm2i7I/hRtNvoxR8pvIaZvgQ72CMNn76cjk=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=puu3DU7V2KHBn4dsyytJJUGbljlLXZliZ/d7yPjmcaRVhGLtw9sieKV6q6U2DyUrXV5 WNVLb0Vype6T1lCgFkT7sn/BmY4dWdFKaQMvBtT3822pOsHqiBb4zi1y90UUWKG2L5G72 z/Qc8nW+9YxRgNmeVy85Iotn2WVCmuU9ftA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1670337066501100001 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Hao A Wu --- MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c | 9 ++++++++- MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c | 2 +- MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 9 ++++++++- MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 6 +++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/Ehc= iDxe/Ehci.c index 0b7270f4e930..e903593b0198 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c @@ -848,6 +848,7 @@ EhcBulkTransfer ( URB *Urb; EFI_TPL OldTpl; EFI_STATUS Status; + UINTN DebugErrorLevel; =20 // // Validate the parameters @@ -932,7 +933,13 @@ EhcBulkTransfer ( gBS->RestoreTPL (OldTpl); =20 if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "EhcBulkTransfer: error - %r, transfer - %x\n", S= tatus, *TransferResult)); + if (Status =3D=3D EFI_TIMEOUT) { + DebugErrorLevel =3D DEBUG_VERBOSE; + } else { + DebugErrorLevel =3D DEBUG_ERROR; + } + + DEBUG ((DebugErrorLevel, "EhcBulkTransfer: error - %r, transfer - %x\n= ", Status, *TransferResult)); } =20 return Status; diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c b/MdeModulePkg/Bus/Pc= i/EhciDxe/EhciSched.c index 5da26afbe120..6967aabceb78 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c @@ -702,7 +702,7 @@ EhcExecTransfer ( } =20 if (!Finished) { - DEBUG ((DEBUG_ERROR, "EhcExecTransfer: transfer not finished in %dms\n= ", (UINT32)TimeOut)); + DEBUG ((DEBUG_VERBOSE, "EhcExecTransfer: transfer not finished in %dms= \n", (UINT32)TimeOut)); EhcDumpQh (Urb->Qh, NULL, FALSE); =20 Status =3D EFI_TIMEOUT; diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/Xhc= iDxe/Xhci.c index c05431ff30ec..15fb49f28fa0 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c @@ -1242,6 +1242,7 @@ XhcBulkTransfer ( UINT8 SlotId; EFI_STATUS Status; EFI_TPL OldTpl; + UINTN DebugErrorLevel; =20 // // Validate the parameters @@ -1304,7 +1305,13 @@ XhcBulkTransfer ( =20 ON_EXIT: if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "XhcBulkTransfer: error - %r, transfer - %x\n", S= tatus, *TransferResult)); + if (Status =3D=3D EFI_TIMEOUT) { + DebugErrorLevel =3D DEBUG_VERBOSE; + } else { + DebugErrorLevel =3D DEBUG_ERROR; + } + + DEBUG ((DebugErrorLevel, "XhcBulkTransfer: error - %r, transfer - %x\n= ", Status, *TransferResult)); } =20 gBS->RestoreTPL (OldTpl); diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pc= i/XhciDxe/XhciSched.c index 13b0400e83d7..13247f7b0dfc 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c @@ -734,7 +734,7 @@ XhcDequeueTrbFromEndpoint ( Dci =3D XhcEndpointToDci (Urb->Ep.EpAddr, (UINT8)(Urb->Ep.Direction)); ASSERT (Dci < 32); =20 - DEBUG ((DEBUG_INFO, "Stop Slot =3D %x,Dci =3D %x\n", SlotId, Dci)); + DEBUG ((DEBUG_VERBOSE, "Stop Slot =3D %x,Dci =3D %x\n", SlotId, Dci)); =20 // // 1) Send Stop endpoint command to stop xHC from executing of the TDs o= n the endpoint @@ -3376,7 +3376,7 @@ XhcStopEndpoint ( EVT_TRB_COMMAND_COMPLETION *EvtTrb; CMD_TRB_STOP_ENDPOINT CmdTrbStopED; =20 - DEBUG ((DEBUG_INFO, "XhcStopEndpoint: Slot =3D 0x%x, Dci =3D 0x%x\n", Sl= otId, Dci)); + DEBUG ((DEBUG_VERBOSE, "XhcStopEndpoint: Slot =3D 0x%x, Dci =3D 0x%x\n",= SlotId, Dci)); =20 // // When XhcCheckUrbResult waits for the Stop_Endpoint completion, it als= o checks @@ -3497,7 +3497,7 @@ XhcSetTrDequeuePointer ( CMD_SET_TR_DEQ_POINTER CmdSetTRDeq; EFI_PHYSICAL_ADDRESS PhyAddr; =20 - DEBUG ((DEBUG_INFO, "XhcSetTrDequeuePointer: Slot =3D 0x%x, Dci =3D 0x%x= , Urb =3D 0x%x\n", SlotId, Dci, Urb)); + DEBUG ((DEBUG_VERBOSE, "XhcSetTrDequeuePointer: Slot =3D 0x%x, Dci =3D 0= x%x, Urb =3D 0x%x\n", SlotId, Dci, Urb)); =20 // // Send stop endpoint command to transit Endpoint from running to stop s= tate --=20 2.30.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#97036): https://edk2.groups.io/g/devel/message/97036 Mute This Topic: https://groups.io/mt/95493871/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-