summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/BlkDev/DskFDC.HC17
1 files changed, 9 insertions, 8 deletions
diff --git a/Kernel/BlkDev/DskFDC.HC b/Kernel/BlkDev/DskFDC.HC
index c7ea0e3..5b5105d 100644
--- a/Kernel/BlkDev/DskFDC.HC
+++ b/Kernel/BlkDev/DskFDC.HC
@@ -176,21 +176,22 @@ U0 FDCSelDrv(CBlkDev *bd)
Bool FDCInit(CBlkDev *bd)
{
- // Initialize the FDC assigned to this blkdev
+ // Recalibrate the drive and (on the first drive) initialize the FDC
U8 ver,st0,pcn;
Bool unlock=BlkDevLock(bd),okay=FALSE;
- // Check if the controller is 82077AA-compatible
- FDCSendByte(bd,FDC_VERSION);
- ver=FDCReadByte(bd);
+ // If this drv is unit 0, do initialization
+ if (!bd->unit) {
+ // Check if the controller is 82077AA-compatible
+ FDCSendByte(bd,FDC_VERSION);
+ ver=FDCReadByte(bd);
- if (ver==0x90)
- okay=TRUE;
+ if (ver==0x90)
+ okay=TRUE;
- // If this drv is unit 0, do a reset
- if (!bd->unit)
FDCReset(bd);
+ }
recalibrate:
// Recalibrate this drive