From 82db93b2732e88cb76f0506e549f5549b8750bc6 Mon Sep 17 00:00:00 2001 From: Harley Travis Date: Thu, 4 Jun 2026 23:36:37 -0500 Subject: Update DskFDC.HC I moved the version check into the drive-0-only code; it wouldn't make sense to check the version each time a drive gets initialized. --- Kernel/BlkDev/DskFDC.HC | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'Kernel/BlkDev') 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 -- cgit v1.2.3