From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web09.19082.1611800071628813827 for ; Wed, 27 Jan 2021 18:14:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=JOJ5uCwV; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: hao.a.wu@intel.com) IronPort-SDR: I2BjS7CK9XlfpxdwNkKtAhBQ8ahqlrXs/OaqOvmBLzkbfD15jbDfOP1Pi6ovdHqbzqrI/uVhPS NsnQ/W2yBFxQ== X-IronPort-AV: E=McAfee;i="6000,8403,9877"; a="159339923" X-IronPort-AV: E=Sophos;i="5.79,381,1602572400"; d="scan'208";a="159339923" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 18:14:28 -0800 IronPort-SDR: rVh39FUSJB9z4pFT1Vug1OMGG+gKoECQAwPqtkGE6l6On2/y/LROVDOdCHkLJXDZkJv6EPagsT ZAaLBOIV6B5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,381,1602572400"; d="scan'208";a="388558393" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga008.jf.intel.com with ESMTP; 27 Jan 2021 18:14:28 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 27 Jan 2021 18:14:27 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 27 Jan 2021 18:14:27 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Wed, 27 Jan 2021 18:14:24 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KnzitiumC4+j88qZ/d2Xos+Vqhz4PkvUwcYMfoPkQt5hvSQRsnedM3esN1/C5KdYWEh1ExZ1rm57XPB0PSySWvsoRKYndAMFoN8C+zaQlREqijSr7974PK4ZmxMGcYvxjr5sTOocjydmFkFXmInDoLjC/0Yg/CJCVJ1Um/Giqs87QCAwV3SiVvsJIEHOWbClqUIMimN/PRugJ459N2cOgcuXboFZfDDDPdb56u5ZXAQf91/Wb1IAneskSFW/e0+QXB+Z9B4EK1rarzWljYlbgAtayLl0nXcJ4M2rNKnZjFSTQsvv3PEQbp18UZpKpjH8iBagR+h+Z4Tpl27Lukv6gg== 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-SenderADCheck; bh=Au926o4jqecc5/uqxggUI9MMb5avtTh78UELTFmVV9o=; b=EMohqWrCBnUpysKuELC9zXePwVpO+SypAnCmWRVXmMP7e0FVOC1lpIBNb6rxadi3nK2YQVOHjT7SJkqrfzA/71PW4RerNDTwcc2gs29QSxRRMFdcTk1XgvbZMtcZNkfvmXh8CPuxOzT/gV9OwinD2lPsyyF/lYKeNAtgjW8bmfMi8wS1LwojbO9+KgdyS7F4qaxADb2sWhQLWoHIYXy39CFXrHlm6DBoi0E8ygO0xwJXMWBn6TjJx2sfYJNiL1YOdtz9i81DwIzDQcuwKThg+smYS7pHuT/GE4+LY522eUDlIo6/bGw9w0TNx0XLqaMKWmupUoM1tSwzZIbWLTTh2g== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Au926o4jqecc5/uqxggUI9MMb5avtTh78UELTFmVV9o=; b=JOJ5uCwV2kzUmdBF3AuGr5GW+4BUx2Z6gjRLumUfLVt9SRrhmnV+ewCCX3qYA/JNN6Jiw+GmFUYWbpAJEW4B3cKLRhQxnQkc7UxYJ666r5g3Ck74brX1LO3uUnRs2uSUgJjfFEoayVL4AENsocr3+VPiRREfseNU5xmKsm6wTLc= Received: from BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) by BN7PR11MB2625.namprd11.prod.outlook.com (2603:10b6:406:b9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.15; Thu, 28 Jan 2021 02:14:23 +0000 Received: from BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::d11e:3b2:e34f:7f0f]) by BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::d11e:3b2:e34f:7f0f%5]) with mapi id 15.20.3784.017; Thu, 28 Jan 2021 02:14:23 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Wu, Hao A" , "patrick.rudolph@9elements.com" , Matt DeVillier CC: "Wang, Jian J" , "Ni, Ray" Subject: Re: [edk2-devel] [PATCH 1/2] MdeModulePkg/Usb/Keyboard.c: remove Get/SetConfig calls Thread-Topic: [edk2-devel] [PATCH 1/2] MdeModulePkg/Usb/Keyboard.c: remove Get/SetConfig calls Thread-Index: AQHW70Uz4Wx1+oYINkm77U8hbRVd9qoy2aRQgAlykAA= Date: Thu, 28 Jan 2021 02:14:23 +0000 Message-ID: References: <20210120155900.3343123-1-patrick.rudolph@9elements.com> In-Reply-To: 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: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 32565cb1-9730-4b57-bf8b-08d8c3326e20 x-ms-traffictypediagnostic: BN7PR11MB2625: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2331; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bnK0yOr4HyEoR8NTKnpaQVk31AdkKI/pMS1L2FPTgpgRXyCKp8UVl0l4A61WeyQ41aqXZ+eFSPbX0k1nxRgpE+M1IoKXKAjmjbbomJ0IOa4FhUcD4bCPGjf+hTRLZy47BJwvzgYhY5J6zSk0zDJWhNr72NLQhmd9Ist8VA6Vy9AW+8yvhY6Hq78gaY3G3ZQq6zWOE52sKqjXCmW54SS5bLWWg/SYMbGAdUEK4atlpPJmJ6GXgP/Atoh03Hw77plD4Vty1sMGmjEBx0Nd0YuOQIoaejl687xA9+f03Yia/lXmyIyTTGrje+ek0WiVHmZV6YvBI9ANLUTT7Wr6ZD4itjhQ1AQq6liSR/Y5jlsGzX37jQHutu1eQShAL48PGkSjQ6GHUtdKS8gzcqvIg/tXu9egA1NKWSkJFn33TOC7CLohgLC/83L3cX6V2ewYdwgq2dHGr11DAWoJNBrAyBxsxV2Gvvs7ii4JQ1W9YKJ4NevwYR9ZvJfQV1V/rCjTbp9U/ceHZ8ec2/428NuqBH2WiZUetC6VmvovmYPtb2+IzFYozO/3vmbaOv3R8t1ZbvMbapfdJICWryIIoiemy9ooEo56aHhFdL/PKzsvdsTFngU= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR11MB3666.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39860400002)(136003)(376002)(396003)(346002)(316002)(7696005)(52536014)(2906002)(107886003)(33656002)(26005)(66476007)(966005)(83380400001)(64756008)(86362001)(4326008)(8936002)(76116006)(66556008)(110136005)(478600001)(8676002)(9686003)(55016002)(54906003)(186003)(71200400001)(53546011)(66946007)(5660300002)(6506007)(66446008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?5N4MTaaUKyM1o6Rhvs30QYDL/SxEE6ldri+CkBYEOAg45+Uuk6Wfqux1Esam?= =?us-ascii?Q?eEy6SpIAiIeDBW/t8UsDpeLC0iINgoQke3zJsOhXPB2XqJKeofQ00wpC9Mid?= =?us-ascii?Q?sZCFYudcQLavdgXsP8K5LCGmXoWHDJOggR2DXTK0Qu2l5BHWLjRkvggJGOts?= =?us-ascii?Q?eBSzBaHpNzNhcJlh3to9QIcjQAjr7zknc8pAJvARjeCVkd5mvdhHhmmGGPGB?= =?us-ascii?Q?F85v8h+PErO7IKe2RFzGDevq1m8mWXD6R5h1URqHvwRAYYoa5qCWkXkfzae9?= =?us-ascii?Q?1JVGoe6q1mVOuTAJ8Fhtulk3y+SbF3mXkSyT5cCeL13JFbFs5Ib5pqsZvTrE?= =?us-ascii?Q?SKh7JQqRye3fx+neWbYHP/q4aAqOxC6kHbuQ+QpMoeBTg/Kqz4B9aqGym2BR?= =?us-ascii?Q?DYRE3uZl/kHcQsf6Hzus7opL96TbFpex9AGmwILkTRLcfDAzZ7ul9ObFGnnL?= =?us-ascii?Q?L3wJyZ7Lj4S4+IH+lD0wpCmlZNIygRS+K8pOrSdezZK/+9Z6Vi/41schPyOF?= =?us-ascii?Q?dVxjpG1JkcvW7xnkqUuv5wwZh2XbLQx0IwzNBSXkgUua4xVzhFtgm18qbaz3?= =?us-ascii?Q?K3zVTpjovqTcZy72fQ0cuYoDs7WbQwdWjKRRUZtlIDg8IpuI7rnhQ8ZLG7Fj?= =?us-ascii?Q?V+Fo4jVU0bZTa3muVJAHdpHImXMGwTp2mn4wHuEm5hcR2KY07+fFHBHZmV8O?= =?us-ascii?Q?AZdpGm0Zc6VDE4tTtYIf7d/MSenVt76g7hP09AagnkjsdHgzErKIkFHCQqDA?= =?us-ascii?Q?hkGOFExej2A8yv+a+DRUnYN9oqdMNrKfAapaG0Ob0VGif4Oa9YA0xWPubDCl?= =?us-ascii?Q?MRv1qhjhbZvR5q2xk8beJBxenF9EM3ZArUX0lh/a7thS77K+2UbSFPcQZa6r?= =?us-ascii?Q?RdO+l0jQk3rqmPP0rT/t8rrE7z5d7VHA+/fH8jZ6slsBWriaCEmqNo64rufW?= =?us-ascii?Q?4oVOE7fgFOIDUos4hYA0J4k5Izwg6VWgIga46bXbfINjo5ZZJx5WFTGLZVzd?= =?us-ascii?Q?NUWOYV95hyOgPlUnocS3AKArni0cRD/0nrA+5kYbCBpKSyeU4AAaD6ZoToZd?= =?us-ascii?Q?oLnwwP7c?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3666.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32565cb1-9730-4b57-bf8b-08d8c3326e20 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jan 2021 02:14:23.5216 (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: 31ZNupm9iJyVX8biyy83TtG6TUVjRzJ5bueca9SHft2Y7rH16bQ2WKjSJb5WdOtTMCF4TbQ7iajWV4JsYh2vdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2625 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 > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Wu, Hao > A > Sent: Friday, January 22, 2021 9:17 AM > To: devel@edk2.groups.io; patrick.rudolph@9elements.com > Cc: Wang, Jian J ; Ni, Ray > Subject: Re: [edk2-devel] [PATCH 1/2] MdeModulePkg/Usb/Keyboard.c: > remove Get/SetConfig calls >=20 > Sorry, please grant me some time for this patch series. I will try to pr= ovide > feedbacks before end of next week. > Meanwhile, could you help to provide the information on what kind of tes= ts > have been performed for these 2 patches? Thanks in advance. >=20 > Best Regards, > Hao Wu >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Patrick > > Rudolph > > Sent: Wednesday, January 20, 2021 11:59 PM > > To: devel@edk2.groups.io > > Cc: Wang, Jian J ; Wu, Hao A > > ; Ni, Ray > > Subject: [edk2-devel] [PATCH 1/2] MdeModulePkg/Usb/Keyboard.c: > > remove Get/SetConfig calls > > > > From: Matt DeVillier > > > > SetConfig is already called during device enumeration, no need to do > > it again here. I found that the InitUSBKeyboard() function, which includes this Get/SetCo= nfig calls, is triggered during the keyboard reset flow. Even though the configuration for the keyboard will be set during enumeration, I think it = would be better to keep this reconfiguration in the reset flow. Best Regards, Hao Wu > > > > Signed-off-by: Matt DeVillier > > --- > > MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c | 37 -------------------- > > 1 file changed, 37 deletions(-) > > > > diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c > > b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c > > index 5faf82ea57..77e20b203f 100644 > > --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c > > +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c > > @@ -801,10 +801,8 @@ InitUSBKeyboard ( > > IN OUT USB_KB_DEV *UsbKeyboardDevice > > > > ) > > > > { > > > > - UINT16 ConfigValue; > > > > UINT8 Protocol; > > > > EFI_STATUS Status; > > > > - UINT32 TransferResult; > > > > > > > > REPORT_STATUS_CODE_WITH_DEVICE_PATH ( > > > > EFI_PROGRESS_CODE, > > > > @@ -816,41 +814,6 @@ InitUSBKeyboard ( > > InitQueue (&UsbKeyboardDevice->EfiKeyQueue, sizeof (EFI_KEY_DATA)); > > > > InitQueue (&UsbKeyboardDevice->EfiKeyQueueForNotify, sizeof > > (EFI_KEY_DATA)); > > > > > > > > - // > > > > - // Use the config out of the descriptor > > > > - // Assumed the first config is the correct one and this is not > > always the case > > > > - // > > > > - Status =3D UsbGetConfiguration ( > > > > - UsbKeyboardDevice->UsbIo, > > > > - &ConfigValue, > > > > - &TransferResult > > > > - ); > > > > - if (EFI_ERROR (Status)) { > > > > - ConfigValue =3D 0x01; > > > > - // > > > > - // Uses default configuration to configure the USB Keyboard devic= e. > > > > - // > > > > - Status =3D UsbSetConfiguration ( > > > > - UsbKeyboardDevice->UsbIo, > > > > - ConfigValue, > > > > - &TransferResult > > > > - ); > > > > - if (EFI_ERROR (Status)) { > > > > - // > > > > - // If configuration could not be set here, it means > > > > - // the keyboard interface has some errors and could > > > > - // not be initialized > > > > - // > > > > - REPORT_STATUS_CODE_WITH_DEVICE_PATH ( > > > > - EFI_ERROR_CODE | EFI_ERROR_MINOR, > > > > - (EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_INTERFACE_ERROR), > > > > - UsbKeyboardDevice->DevicePath > > > > - ); > > > > - > > > > - return EFI_DEVICE_ERROR; > > > > - } > > > > - } > > > > - > > > > UsbGetProtocolRequest ( > > > > UsbKeyboardDevice->UsbIo, > > > > UsbKeyboardDevice->InterfaceDescriptor.InterfaceNumber, > > > > -- > > 2.26.2 > > > > > > > > -=3D-=3D-=3D-=3D-=3D-=3D > > Groups.io Links: You receive all messages sent to this group. > > View/Reply Online (#70585): > > https://edk2.groups.io/g/devel/message/70585 > > Mute This Topic: https://groups.io/mt/79981643/1768737 > > Group Owner: devel+owner@edk2.groups.io > > Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com] > > -=3D-=3D-=3D-=3D-=3D-=3D > > >=20 >=20 >=20 >=20 >=20