[0.4.14][FREELDR] Workaround regression CORE-16469
authorJoachim Henze <Joachim.Henze@reactos.org>
Wed, 6 May 2020 21:44:50 +0000 (23:44 +0200)
committerJoachim Henze <Joachim.Henze@reactos.org>
Wed, 6 May 2020 21:49:20 +0000 (23:49 +0200)
This prevents ReactOS asserting when 'My computer'
is opened, while it tries to send commands to floppy drive.

Many thanks to patches author Doug Lyons.

The regression was introduced by 0.4.13-dev-1081-g
eeff926ede1b2109bb0e129a960b74f3261cf2f1

patch was committed to 0.4.13rls and 0.4.14rls as well.

Today it was committed to master as well, as
the initially planned investigation for the root cause
did still not happen and we can not afford the time
to retest and workaround this over and over again.
Thank god that Oleg Dubinskiy was still around to retest
this again and confirmed it can still happen, because
unlike initially, personally I was not able to reproduce it
today anymore!

Since every release was work-arounded, we did never
expose the bug in any final release.

cherry-picked from 0.4.15-dev-174-g
7c81fb8f568c0dc875018fa382d215c088eb839d

boot/freeldr/freeldr/arch/i386/pc/pcdisk.c

index 37058bc..550c424 100644 (file)
@@ -790,7 +790,7 @@ PcDiskReadLogicalSectors(
 #if defined(__i386__) || defined(_M_AMD64)
 VOID __cdecl DiskStopFloppyMotor(VOID)
 {
-    WRITE_PORT_UCHAR((PUCHAR)0x3F2, 0x0C); // DOR_FDC_ENABLE | DOR_DMA_IO_INTERFACE_ENABLE
+    WRITE_PORT_UCHAR((PUCHAR)0x3F2, 0); // DOR_FDC_ENABLE | DOR_DMA_IO_INTERFACE_ENABLE 0x0C // we changed 0x0C->0 to workaround CORE-16469
 }
 #endif // defined __i386__ || defined(_M_AMD64)