From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 CFE77210C1EED for ; Fri, 27 Jul 2018 02:29:01 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jul 2018 02:29:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,408,1526367600"; d="scan'208";a="75005667" Received: from ray-dev.ccr.corp.intel.com (HELO [10.239.9.4]) ([10.239.9.4]) by fmsmga004.fm.intel.com with ESMTP; 27 Jul 2018 02:29:00 -0700 To: Liming Gao , edk2-devel@lists.01.org References: <1532670789-16352-1-git-send-email-liming.gao@intel.com> From: "Ni, Ruiyu" Message-ID: Date: Fri, 27 Jul 2018 17:29:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1532670789-16352-1-git-send-email-liming.gao@intel.com> Subject: Re: [Patch] IntelFrameworkModulePkg IsaSerialDxe: Update algorithm to calculate Divisor X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2018 09:29:02 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 7/27/2018 1:53 PM, Liming Gao wrote: > To align the way in MdeModulePkg SerialPortLib and PciSioSerialDxe driver, > Divisor is added by one when the reminder is more than half (16 * BaudRate). > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Liming Gao > Cc: Ruiyu Ni > --- > IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c > index 57ee669d14..7824d38a9c 100644 > --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c > +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c > @@ -1,7 +1,7 @@ > /** @file > Serial driver for standard UARTS on an ISA bus. > > -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
> +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > which accompanies this distribution. The full text of the license may be found at > @@ -1397,7 +1397,7 @@ IsaSerialSetAttributes ( > ((UINT32) BaudRate * 16), > &Remained > ); > - if (Remained != 0) { > + if (Remained >= ((UINT32) BaudRate * 8)) { > Divisor += 1; > } > > Reviewed-by: Ruiyu Ni -- Thanks, Ray