From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6B3A32095D9C8 for ; Fri, 4 Aug 2017 01:03:41 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Aug 2017 01:05:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,319,1498546800"; d="scan'208";a="115539019" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 04 Aug 2017 01:05:53 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 4 Aug 2017 01:05:53 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 4 Aug 2017 01:05:52 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.146]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0319.002; Fri, 4 Aug 2017 16:05:50 +0800 From: "Zeng, Star" To: Heyi Guo , "edk2-devel@lists.01.org" , "Ni, Ruiyu" , "Laszlo Ersek (lersek@redhat.com)" CC: "Zeng, Star" Thread-Topic: [edk2] MdeModulePkg/SerialDxe: Inconsistent timeout processing in SerialRead Thread-Index: AQHS/rR5s7p0gE2FTESYuh+ovHOJ/KJZQQ+Q//+lWACAGoY0gIAAhmpw Date: Fri, 4 Aug 2017 08:05:50 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B8F9E63@shsmsx102.ccr.corp.intel.com> References: <0C09AFA07DD0434D9E2A0C6AEB0483103B8F41C6@shsmsx102.ccr.corp.intel.com> <65b2b345-941e-710e-60f6-65b341c750e6@linaro.org> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: MdeModulePkg/SerialDxe: Inconsistent timeout processing in SerialRead X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 08:03:41 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 T2gsIHNvcnJ5LCBJIGZvcmdvdCBpdCBiZWNhdXNlIG9mIGJ1c3lpbmcgb24gb3RoZXIgdGhpbmdz LiBJIHdpbGwgcG9zdCBpdCBzb29uLg0KVGhhbmtzIGZvciB5b3VyIHJlbWluZGVyLg0KDQpTdGFy DQotLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTogSGV5aSBHdW8gW21haWx0bzpoZXlp Lmd1b0BsaW5hcm8ub3JnXSANClNlbnQ6IEZyaWRheSwgQXVndXN0IDQsIDIwMTcgNDowMyBQTQ0K VG86IFplbmcsIFN0YXIgPHN0YXIuemVuZ0BpbnRlbC5jb20+OyBlZGsyLWRldmVsQGxpc3RzLjAx Lm9yZzsgTmksIFJ1aXl1IDxydWl5dS5uaUBpbnRlbC5jb20+OyBMYXN6bG8gRXJzZWsgKGxlcnNl a0ByZWRoYXQuY29tKSA8bGVyc2VrQHJlZGhhdC5jb20+DQpTdWJqZWN0OiBSZTogW2VkazJdIE1k ZU1vZHVsZVBrZy9TZXJpYWxEeGU6IEluY29uc2lzdGVudCB0aW1lb3V0IHByb2Nlc3NpbmcgaW4g U2VyaWFsUmVhZA0KDQpIaSBTdGFyLA0KDQpUaGUgcGF0Y2ggd29ya3Mgd2VsbCBvbiBvdXIg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