From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web11.3571.1670375274586829962 for ; Tue, 06 Dec 2022 17:07:55 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=lw59XXSo; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: hao.a.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670375274; x=1701911274; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=rUwJF/BtrhTv92h9LOw2ou/uKwSdkpnpgmg8jGq1U0s=; b=lw59XXSohvHidc9/epydPCz9W1poVC/ddcmTPc+aTXE13ObxMXB+4sab fTLgbA2Wk6k2O1LLrs/qaNvxrKSwYGe/2L35yTGJhHPAA5YEZaweY0peh fSf3pd2G8QnhrRfSXLWn1wpMjOaMjUiHa2lDhNdVMsrsNpxXzlESC1ajn V5vBaRxcbhrgyyWLdViKglEVjjr6ioYbh+7xxOfmtHC9jZXYpBTCZ53BT o3P7zYuv8i4juRdChwYEB/NVqGi8BW/rjcv+F4BKkz/D4qoXnokLU/zDW SY7btzITl9hk6gtZ61EXYC1G8MmiJHRNdFZtp6LFS62EPGWXlTIQFVype A==; X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="318627811" X-IronPort-AV: E=Sophos;i="5.96,223,1665471600"; d="scan'208";a="318627811" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2022 17:07:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="820779299" X-IronPort-AV: E=Sophos;i="5.96,223,1665471600"; d="scan'208";a="820779299" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga005.jf.intel.com with ESMTP; 06 Dec 2022 17:07:53 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 6 Dec 2022 17:07:53 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Tue, 6 Dec 2022 17:07:53 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.173) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Tue, 6 Dec 2022 17:07:52 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BS1QAt3TAlsDrUzlNwm85CKbNrruePXk4U30QsgxXX4oeoHjvXH/lWesMKQF5gJuFB/CtH3Obd/BMm6vkta+h8CeGccZ8DvlBtPrHM08RcetXGCseSghnCngDPuX19NT1JaN/UUbSiCur02+cIzZf8RE7P5zq3O0mmFNaRomQGiwfN0tLTw07gEmNNp579gcR0kC2CzbZU4u3ui5CQIp0cxusw11ruORuknDlrhScxT3ZzT+1ZOo4IHjHsWc4LdKKJdwhrbmP0edM/hFgswBruqjAdQg1cyRxgKiHUxGok/Y+lHIyxb+3jx/9XCgvFtiiNPLym9bsA75buYPK9+PIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X2PkuGqJpIpBe2cb7Psr7ej24sFBVCnIQMJ2gZSK2f8=; b=Flwo8CElcQdUYqYF3xphyix0rpJfy+4+evKJ0ze5HzxFRBZZKUVwBBgE4n26Ad4HsaCux7AasgTvLcsZjB1LAJoRdMjkhfA1f1WM01p8HTnsC0DdoH5bSH3tXM2Pbv4gUITFzzNkFFQO7G5M6WxfiTvLWL/d7c5zVHqlAkhJiR7JEEqskaWmMZ0eNWq6ZUgG3N7kVkNC4kKyvEHKy/FnL2rgnuAxE1CPZPd5AhZct7OVnumH/5o9eJRpIGU8Yo3hyGLuD7YaTHhSuayBM3hitSq6lVJy5IxqsRmYAsotoOaWN2706RTjryaACJAuHKryKqSRxfmIeL/r9JvNopse2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB4025.namprd11.prod.outlook.com (2603:10b6:5:197::31) by BL3PR11MB5683.namprd11.prod.outlook.com (2603:10b6:208:33e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Wed, 7 Dec 2022 01:07:49 +0000 Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::6129:7158:18dd:761c]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::6129:7158:18dd:761c%3]) with mapi id 15.20.5880.013; Wed, 7 Dec 2022 01:07:49 +0000 From: "Wu, Hao A" To: Rebecca Cran , "devel@edk2.groups.io" , "Gao, Liming" , "Ni, Ray" , "Wang, Jian J" Subject: Re: [PATCH v2 1/1] MdeModulePkg: Put USB DEBUGs that occur for bulk timeouts under VERBOSE Thread-Topic: [PATCH v2 1/1] MdeModulePkg: Put USB DEBUGs that occur for bulk timeouts under VERBOSE Thread-Index: AQHZCX9nXOvYJSihgkK/1JpevAC2MK5hnXbw Date: Wed, 7 Dec 2022 01:07:48 +0000 Message-ID: References: <20221206143039.278566-1-rebecca@quicinc.com> <20221206143039.278566-2-rebecca@quicinc.com> In-Reply-To: <20221206143039.278566-2-rebecca@quicinc.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR11MB4025:EE_|BL3PR11MB5683:EE_ x-ms-office365-filtering-correlation-id: cccb06a2-404a-4d16-79b0-08dad7ef7537 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ufCVGz5TU7395oj5/Ef/z/J2KxfZOLKAWtJxIMYC3XOUSqpcOnJWVDJbYPxBBDIxYniqWebLH8zEfTUZbFB6cyG/vIWwlqNb0JsdxVDmsJvOrCZIWbYzY+z2z26Gx5yf97YXQv0t71T/o+z4HH6nBKsZreylB691YbimvD+oOyTmambsgBt2rGrExVAwy71qoDT+1+WGNX7wo/CLU9kURj3Pn5g6qSri/R9lMVLzjuX7bL0NDDh8ncG5M4ly7+NmNqXm4YsbVUZ9cfE8WlVXsFbikvLj5gmNnXH0L9PscTuKfzghMBZHHcf2DM6UOEL4WTDS4Pb4n/Jqa3+U8RPvwnNUbAR8g5F0SAvQi6AUHaytWSsFTUqLCwZw7HHLqGDs191FaA/9VnryipJP3gcY120IhkWX3zO5CvpmgqEUHhSg4mQ4lMLs6adL18nh6NzhQdOyWFTaM9NZg3jXKE7nJ53aiFZ8vqLC9GNczo5zsKDTm0vWoso1VBLtQAlTCiyG0CmAiTF3XHiO0H56XKJUjWnX7aJ+zt38C4Srde29QnHlmACxbUU4AH3icZJbYyWknHBReBtgT9OZBL5oe0d68FhQQDAMWBAn+IyI4027mDHkUDfjID4OwauhciSc9nIXMoM+TsvOFek+S9mYH9L0/NJgA6yUVnYj2YPu7Bf5XFSkyGwaJu1zppzyebkvWG6hIM7L2EFtSZqTducYgHJ8sA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4025.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(136003)(346002)(366004)(396003)(39860400002)(451199015)(86362001)(41300700001)(66476007)(76116006)(8936002)(66556008)(66946007)(2906002)(8676002)(64756008)(38070700005)(66446008)(83380400001)(122000001)(38100700002)(33656002)(110136005)(316002)(6636002)(478600001)(82960400001)(5660300002)(55016003)(186003)(52536014)(71200400001)(53546011)(7696005)(26005)(6506007)(9686003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?s3pVaQ+/qMi2cmsWOhiGnMxpXEYGw+/VzavwlLBeYwwt/K6jXTeGHtotEw/U?= =?us-ascii?Q?5Ip9tN4ufROotaHGMOSUXCYDV8d+ocksoxcSX+kwQwNm3MNGf+QplHrB7XkP?= =?us-ascii?Q?O4Q+YdTGINb4ViQo937IR9ZrB5zuDgeGifSrTfuGR+TkO+5o98towyFZ3Yn5?= =?us-ascii?Q?Se+po5wtBp7WwN2lm8Yxd9S+/Rp7vo8skqwICHA4fu/JA9x2RqgFCdG5oWtH?= =?us-ascii?Q?OeJ/MR1r7HtkOEh1SpnOkOcaxhBc5usA8h2cK+dBuYRbZetUh5Uw/9bKl5C0?= =?us-ascii?Q?w5Cu1lpgJ5x4mL2NkuwNp15jAS9NlUZ9mXUXHOKV/69lBZk1J22ye7nkvtUj?= =?us-ascii?Q?3O6dL89kS5eQkztFimNrRIC+aQNmWgBHKjDwccgWGJ6hu+MKFs80ZJFybocr?= =?us-ascii?Q?OJSfXzBqeHnGoikUrig6LPIFZrETfHwIQQjzmgqEuHnSphWYe4L7vmJQoaCx?= =?us-ascii?Q?6y83k4Lw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ascii?Q?Wmq1wcSQhHFhTT7BAvwZwegUYwgyhS30LueziJnLOthhVdS+Lyp5/JeQEjgm?= =?us-ascii?Q?xADGTmFgHNHk+pmTXuEMo6rQFkcgOk+v/EYQjf2QUWuyc4+AbfsBxgVB2I8P?= =?us-ascii?Q?sX/WH0PwrtZaO69vmHQiimrBT+VPHOY9+zaVJafPC42RAoOJ9t/YDvPbdE6V?= =?us-ascii?Q?Lflh35QVXasULceqNo+YjMpQITGsXWS/HbfQOYAQ?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4025.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cccb06a2-404a-4d16-79b0-08dad7ef7537 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2022 01:07:48.9915 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: mP527ZCZfwHuNSyvlM1aJeDeW3+KmGv//CW2juiMa96tBKove7Yz4sUJrSE0vbaZRaTvOk0bPz91iLOgrHRVTA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB5683 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Hao A Wu Will wait a couple of days before merging to see if comments from other rev= iewers. Best Regards, Hao Wu > -----Original Message----- > From: Rebecca Cran > Sent: Tuesday, December 6, 2022 10:31 PM > To: devel@edk2.groups.io; Gao, Liming ; Ni, > Ray ; Wang, Jian J ; Wu, Hao A > > Cc: Rebecca Cran > Subject: [PATCH v2 1/1] MdeModulePkg: Put USB DEBUGs that occur for bulk > timeouts under VERBOSE >=20 > 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. >=20 > 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. >=20 > Signed-off-by: Rebecca Cran > --- > 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(-) >=20 > diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c > b/MdeModulePkg/Bus/Pci/EhciDxe/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", > Status, *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/Pci/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/XhciDxe/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", > Status, *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/Pci/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 > on 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", > SlotId, 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 > also 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 > 0x%x, Urb =3D 0x%x\n", SlotId, Dci, Urb)); >=20 > // > // Send stop endpoint command to transit Endpoint from running to stop > state > -- > 2.30.2