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.web09.5562.1645670674177040828 for ; Wed, 23 Feb 2022 18:44:34 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=BZcVoAMW; 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=1645670674; x=1677206674; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PrGgDjAnmBZdgDN/VzOvEgWXRwUdi+gBEYKRsHvvCJE=; b=BZcVoAMWET3NKUO5aMbIsJDCzC9RcV0qvBxf1xPmYdkI9Od9eErR85Cu xH2Mnr5WeA+S+Ee0k41eewD9F5aIhj19Y9QJEQVFHOn2YnQXdfcQspEB6 TtZlU+jO1IMUMId4n8nR4pJyJEDtIdrUuhyDSHyTFt9UeWT/O9epsH2Il SQxmkyuXvSDbCGVMMCohLKyqAQOFffCKEsnh5vcYToyZ33hzSWTnKnZLL JLp/9UHj+4JqCnVkGbPTpZ/lHcq1Sd1RUHjZ9B/0ZWgQK3lNbVbuNMfsL IwqsIm88T0V91N8NQxx62RGLv34vvHLRqZSUwzcuGEzfmAgRm/3Qzm7rK g==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="252054513" X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="252054513" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 18:44:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="548545166" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga008.jf.intel.com with ESMTP; 23 Feb 2022 18:44:32 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 23 Feb 2022 18:44:32 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 23 Feb 2022 18:44:31 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Wed, 23 Feb 2022 18:44:31 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.45) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 23 Feb 2022 18:44:31 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HLc4ktkRIrqBgMC3q0A61ujVWszmwVKXBzPNnz88bMC3OmGr6MuRf4Ln2bsWqtkRjkJ2gIRIUWb4JNSPFILkq/qWtJcwxPZEyOYOwMZqzJikEHhYQMiWfkqjxAjS2xfvMg5W2XDSSGBLmlUhomuDB31sL5rWv9O/KgHNBYWNLCMWQ4ssIbd/wV2vgM+bmsnDSt/jofA3zobk6GqOddM+t32+xS6aIyh1xlGzaG8oKX7r6BcA/ObfhVMAWqgjThrUFTeA7b+yFkGbiCAIA5s3/HimKub0cxCWKsP3o8G5P5oPzYXHGUyKUn4h31qfwSnZa5AqdScDzkT/AXjddtQE9A== 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=L8HHQiwVfQKUBsPYEZOHwnFZGAWcEm72Y59nZKuP8TY=; b=CMT+g2fU0CMVcVF4OuFizqBQgtsBeGxaAYp/rH9YpSzIwCZS+5SqTM01ii7ruYbwI/VhBqkPAEq0J9L23gs0XBshCQRmGjqa+nUzldWI0FCmdxoBv0CO9V7MGyPEsp5kr+BeRbCzrzmkYrX+SAugasLsnglwc64tsS0JLqYL+jWlq/8jk3AE3Zj8h1wAhrjC0J7IAgx0ndaFrO75EPxzRbC9eh84AJ21Oi/nc8xWupJms3k7HoYmE6xHD8fR/wWKo/WdkZSkQAHb5leuDDF9aGzHWo402a2J+0Vw2wDg96KUFpaDI2KVSJ+xs1X6E0MmlmTxUzG0OF/NKWjWsVKU3w== 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 BYAPR11MB3477.namprd11.prod.outlook.com (2603:10b6:a03:7c::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22; Thu, 24 Feb 2022 02:44:29 +0000 Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::2dd0:9ba8:a8c:fc96]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::2dd0:9ba8:a8c:fc96%3]) with mapi id 15.20.4995.027; Thu, 24 Feb 2022 02:44:29 +0000 From: "Wu, Hao A" To: "Rhodes, Sean" , "devel@edk2.groups.io" CC: "Dong, Guo" , "Rhodes, Sean" , "Ni, Ray" , Matt DeVillier , Patrick Rudolph Subject: Re: [PATCH] MdeModulePkg/Usb/Keyboard.c: Don't request protocol before setting Thread-Topic: [PATCH] MdeModulePkg/Usb/Keyboard.c: Don't request protocol before setting Thread-Index: AQHYJJlOv5x7IyiH10KtToslu140GayY7+0A Date: Thu, 24 Feb 2022 02:44:29 +0000 Message-ID: References: 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: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e389ab39-6430-42c6-e527-08d9f73f94b4 x-ms-traffictypediagnostic: BYAPR11MB3477:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zOAlrImY+C2CEz7BB6Q2yOKIVAem+h1ilLkPqP8X00gaBNfKAnJrpf33aA+Zfj+ASj86HBbNBpUPtlnTifivxoRtj44InzvwXfrkJAOiIWfP88pFO4U5vqPJEhRACBLilaLCz4EI6iiiI9kv9peZkujVkULLx3chNSVaojYJKFsL3a6F66i38cEGTOjo5RIXUcaY1mwODLZ1XYt92Ld26vQplnTpQorq3G+Ibia8la+0CNC+l/QyxCPyAnx0bMyP4DJyaJHNEGilU2WK3e0K1TmWjNWTdeBZKnaIdg15GO2x8RRd+J1ouYKb2U2HE0Yi4Jc6stSp4v5TRil6I1hG+LfgQ7jHid2Al8q2zzRxw9wXOPMTjzb023Z+pboUkFBdNvtSO6GRr6Xv3yar1DffwwPhA4ECj5n9cSdjQnqYkZkWPaLOTyjPzS3mi4EGT1q9/AATZPBDXAuEtgjm/JitRW3EJPtf1cK0fO5RZLseEVFp9sr1+yaKfKozm+iIvoTgzBghy2a3Uuc7l9xeaBsPyaNp3SbGisFrKdJJj6kVmDySgL4XbHo3hg9f2jZizdElUMfcpWx1qyHt+HDxK0r3e3jQ2wKBzSxltdHfZhn76ymknhj4oWkapzcsfM/+8xmbLHfnrnSnL2rqE5g77NVKFLVjm7Fh9OZxvpeOntV1x7OFOtpAUV18YYxuBaoQecdpypx0AyTXczp+BhSTQ0tOKQ== 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:(13230001)(366004)(316002)(55016003)(83380400001)(110136005)(54906003)(38100700002)(86362001)(26005)(186003)(64756008)(2906002)(9686003)(4326008)(71200400001)(53546011)(8936002)(33656002)(122000001)(508600001)(82960400001)(38070700005)(6506007)(5660300002)(7696005)(66946007)(66556008)(8676002)(52536014)(66476007)(76116006)(66446008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?568zwWi3rMP1SCWZFpwcd/L2oEByUlDTOTxwsrCJ+IyLmDS+Bv1KUUrx/+q9?= =?us-ascii?Q?O7aII5031zrHy3c/ujMknuKEfe6Y47VIVv5B4IhswVYLQwzSYv3nNYHmf4Ud?= =?us-ascii?Q?ScQ7HUN3eg4bdBgovItacdXTx6N7qAlVzdesj/51DOT9Xid6EOtaoYxeoEEq?= =?us-ascii?Q?RixNzKfT4DXi+OLnDI8GTmZYt5PNbYOecvvGkw/TaYhSFo5l3NcBvtNDbZJK?= =?us-ascii?Q?adaYPvNd+knuxTDAPhosSriGcePZN9ifF27z++dQMfIgWvxJfVZwBtXoGek7?= =?us-ascii?Q?iO4QYhuIHz94GRGomqyrfrpVLK6tPu7hqy5TdUFdMFSVmqxMdryctObdTqMz?= =?us-ascii?Q?txiGUsrqt6WoGiQ9rm2aZrGtG57T32AkF0/epp/mGhEd3cTAGOutzt/Hu9V7?= =?us-ascii?Q?MSP/5GBPc1BoZDXnCYIgy7Cy0HwyX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= =?us-ascii?Q?yRTluK1ija8trrlIxEDwMTaJdE25CK+mRx68aS5I0rAoqo3/xKNUbZXa+pdZ?= =?us-ascii?Q?8OXPRnbMeCMfvG262k63CPfMN5PzEoVmQ5p492cRTfLXMgNPuuEeS7I5AEj1?= =?us-ascii?Q?SmolUxCpbU4jZXQ5dLjFJEkB9v+ISZywBJ3qANKYcDZjLDJSWEK1zS8tM3Hi?= =?us-ascii?Q?WD4MywHsERIsrqpJW5ExR1brW1xbKQc01ddLo/86xV0iL76neAqIuzi/TBHA?= =?us-ascii?Q?is9LLyRgfdJ/stKfSXpMc6Lbo1NHDqtKg0cs2ocfoekqBUOUHCw30lGy4SWi?= =?us-ascii?Q?K8uTMfDfVo7umNatF0/iHDo=3D?= 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: e389ab39-6430-42c6-e527-08d9f73f94b4 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Feb 2022 02:44:29.8581 (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: F8zS0NE58tNLPfqj6mT4510tCiFLrg4qSxHJ8LEswVLwq8ZHcclEt2IV090Pfu1zRnnLLh58oHdH3/q8pyfJXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3477 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 1 inline comment below: > -----Original Message----- > From: Sean Rhodes > Sent: Friday, February 18, 2022 3:30 PM > To: devel@edk2.groups.io > Cc: Dong, Guo ; Rhodes, Sean > ; Wu, Hao A ; Ni, Ray > ; Matt DeVillier ; Patrick > Rudolph > Subject: [PATCH] MdeModulePkg/Usb/Keyboard.c: Don't request protocol > before setting >=20 > No need to check the interface protocol then conditionally setting, > just set it to BOOT_PROTOCOL and check for error. >=20 > This is what Linux does for HID devices as some don't follow the USB spec= . > One example is the Aspeed BMC HID keyboard device, which adds a massive > boot delay without this patch as it doesn't respond to 'GetProtocolReques= t'. >=20 > Cc: Hao A Wu > Cc: Ray Ni > Signed-off-by: Matt DeVillier > Signed-off-by: Patrick Rudolph > Signed-off-by: Sean Rhodes > --- > MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c | 17 +++++------------ > .../Library/BrotliCustomDecompressLib/brotli | 2 +- > 2 files changed, 6 insertions(+), 13 deletions(-) >=20 > diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c > b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c > index 5a94a4dda7..73b5df2b64 100644 > --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c > +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c > @@ -854,22 +854,15 @@ InitUSBKeyboard ( > } >=20 > } >=20 >=20 >=20 > - UsbGetProtocolRequest ( >=20 > - UsbKeyboardDevice->UsbIo, >=20 > - UsbKeyboardDevice->InterfaceDescriptor.InterfaceNumber, >=20 > - &Protocol >=20 > - ); >=20 > // >=20 > // Set boot protocol for the USB Keyboard. >=20 > // This driver only supports boot protocol. >=20 > // >=20 > - if (Protocol !=3D BOOT_PROTOCOL) { >=20 > - UsbSetProtocolRequest ( >=20 > - UsbKeyboardDevice->UsbIo, >=20 > - UsbKeyboardDevice->InterfaceDescriptor.InterfaceNumber, >=20 > - BOOT_PROTOCOL >=20 > - ); >=20 > - } >=20 > + UsbSetProtocolRequest ( >=20 > + UsbKeyboardDevice->UsbIo, >=20 > + UsbKeyboardDevice->InterfaceDescriptor.InterfaceNumber, >=20 > + BOOT_PROTOCOL >=20 > + ); >=20 >=20 >=20 > UsbKeyboardDevice->CtrlOn =3D FALSE; >=20 > UsbKeyboardDevice->AltOn =3D FALSE; >=20 > diff --git a/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > b/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > index f4153a09f8..666c3280cc 160000 > --- a/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > +++ b/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > @@ -1 +1 @@ > -Subproject commit f4153a09f87cbb9c826d8fc12c74642bb2d879ea > +Subproject commit 666c3280cc11dc433c303d79a83d4ffbdd12cc8d Why change in BrotliCustomDecompressLib is needed for this patch? Best Regards, Hao Wu > -- > 2.32.0