On Tue, May 20, 2014 at 7:46 PM, Fan, Jeff <jeff....@intel.com> wrote:
> Mike,
>
> I have one question, how do you find this issue?  Do you encounter
> one real issue on your platform or you find it by code review?

I will say that I've seen timeouts on floppy often account for a large
part of the OVMF boot time. I haven't figured out the correct way to
fix it though.

It is fairly unfortunate considering floppies are almost never used with OVMF.

But, Mike's change seems to increase the timeout, so I guess that
won't help OVMF. :)

-Jordan

> I agree TimeoutInSeconds is very confused in original code.
>
> Because this piece of code have been not changed in open source world for +7 
> years.  I do not know why original author defined STALL_1_MSECOND here 
> instead of STALL_1_SECOND. It maybe performance requirement or others.
>
> If you have not real issue on this code, I suggest to keep the current delay 
> time and rename parameter TimeoutInSeconds into TimeoutInMicroSeconds,  or 
> simply rename it into Timeout to remove this confusion.
>
> Thanks!
> Jeff
> -----Original Message-----
> From: Mike Maslenkin [mailto:miha...@parallels.com]
> Sent: Wednesday, May 21, 2014 5:44 AM
> To: edk2-devel@lists.sourceforge.net
> Cc: Mike Maslenkin
> Subject: [edk2] [PATCH 1/1] IsaFloppyDxe: fixed timeout
>
> From: Konstantin Filatov <kfila...@parallels.com>
>
> This timeout was wrong in 1000 times.
> Delay is calculated using timeout value in seconds.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Konstantin Filatov <kfila...@parallels.com>
> Signed-off-by: Mike Maslenkin <miha...@parallels.com>
> ---
>  IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyCtrl.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyCtrl.c 
> b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyCtrl.c
> index d8f181c2e25f..e1f48568b6f9 100644
> --- a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyCtrl.c
> +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyCtrl.c
> @@ -1112,7 +1112,7 @@ FddWaitForBSYClear (
>    //
>    Mask  = (UINT8) ((FdcDev->Disk == FdcDisk0 ? MSR_DAB : MSR_DBB) | MSR_CB);
>
> -  Delay = ((TimeoutInSeconds * STALL_1_MSECOND) / 50) + 1;
> +  Delay = ((TimeoutInSeconds * STALL_1_SECOND) / 50) + 1;
>    do {
>      StatusRegister = FdcReadPort (FdcDev, FDC_REGISTER_MSR);
>      if ((StatusRegister & Mask) == 0x00) { @@ -1169,7 +1169,7 @@ FddDRQReady 
> (
>    //
>    // in order to compare bit6
>    //
> -  Delay = ((TimeoutInSeconds * STALL_1_MSECOND) / 50) + 1;
> +  Delay = ((TimeoutInSeconds * STALL_1_SECOND) / 50) + 1;
>    do {
>      StatusRegister = FdcReadPort (FdcDev, FDC_REGISTER_MSR);
>      if ((StatusRegister & MSR_RQM) == MSR_RQM && (StatusRegister & MSR_DIO) 
> == DataInOut) {
> --
> 1.7.10.4
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to