diff --git a/boot/freeldr/freeldr/arch/drivers/hwide.c b/boot/freeldr/freeldr/arch/drivers/hwide.c
index 51f5985782..04025ca45d 100644
--- a/boot/freeldr/freeldr/arch/drivers/hwide.c
+++ b/boot/freeldr/freeldr/arch/drivers/hwide.c
@@ -83,6 +83,13 @@ IdentifyDevice(
     OUT PDEVICE_UNIT *DeviceUnit
 );
 
+static
+VOID
+AtapiPrintSenseData(
+    IN UCHAR Channel,
+    IN IDENTIFY_DATA IdentifyData
+);
+
 static
 BOOLEAN
 AtapiReadyCheck(
@@ -407,19 +414,12 @@ AtapiReadLogicalSectorLBA(
 
     /* Send the SCSI READ command */
     RtlZeroMemory(&AtapiPacket, sizeof(AtapiPacket));
-#if defined(SARCH_PC98)
     AtapiPacket[0] = SCSIOP_READ;
-    AtapiPacket[8] = 1;
-    AtapiPacket[9] = 0;
-#else
-    AtapiPacket[0] = SCSIOP_READ12;
-    AtapiPacket[8] = 0;
-    AtapiPacket[9] = 1;
-#endif
     AtapiPacket[2] = (SectorNumber >> 24) & 0xFF;
     AtapiPacket[3] = (SectorNumber >> 16) & 0xFF;
     AtapiPacket[4] = (SectorNumber >> 8) & 0xFF;
     AtapiPacket[5] = SectorNumber & 0xFF;
+    AtapiPacket[8] = 1;
     Success = AtaSendAtapiPacket(DeviceUnit->Channel,
                                  AtapiPacket,
                                  ATAPI_PACKET_SIZE(DeviceUnit->IdentifyData),
@@ -427,6 +427,7 @@ AtapiReadLogicalSectorLBA(
     if (!Success)
     {
         ERR("AtapiReadLogicalSectorLBA() failed. A read error occurred.\n");
+        AtapiPrintSenseData(DeviceUnit->Channel, DeviceUnit->IdentifyData);
         return FALSE;
     }
 
@@ -466,6 +467,39 @@ AtapiCapacityDetect(
     {
         *TotalSectors = 0;
         *SectorSize = 0;
+
+        AtapiPrintSenseData(DeviceUnit->Channel, DeviceUnit->IdentifyData);
+    }
+}
+
+static
+VOID
+AtapiPrintSenseData(IN UCHAR Channel, IN IDENTIFY_DATA IdentifyData)
+{
+    UCHAR AtapiPacket[16];
+    SENSE_DATA SenseData;
+    BOOLEAN Success;
+
+    /* Send the SCSI REQUEST SENSE command */
+    RtlZeroMemory(&AtapiPacket, sizeof(AtapiPacket));
+    RtlZeroMemory(&SenseData, SENSE_BUFFER_SIZE);
+    AtapiPacket[0] = SCSIOP_REQUEST_SENSE;
+    AtapiPacket[4] = SENSE_BUFFER_SIZE;
+    Success = AtaSendAtapiPacket(Channel,
+                                 AtapiPacket,
+                                 ATAPI_PACKET_SIZE(IdentifyData),
+                                 SENSE_BUFFER_SIZE);
+    if (Success)
+    {
+        AtaReadBuffer(Channel, &SenseData, SENSE_BUFFER_SIZE);
+        WARN("SK 0x%x, ASC 0x%x, ASCQ 0x%x\n",
+             SenseData.SenseKey,
+             SenseData.AdditionalSenseCode,
+             SenseData.AdditionalSenseCodeQualifier);
+    }
+    else
+    {
+        ERR("Cannot read the sense data.\n");
     }
 }
 
@@ -531,7 +565,10 @@ AtapiReadyCheck(IN OUT PDEVICE_UNIT DeviceUnit)
                                                  ATAPI_PACKET_SIZE(DeviceUnit->IdentifyData),
                                                  MAXIMUM_CDROM_SIZE);
                     if (!Success)
+                    {
+                        AtapiPrintSenseData(DeviceUnit->Channel, DeviceUnit->IdentifyData);
                         return FALSE;
+                    }
 
                     AtaReadBuffer(DeviceUnit->Channel, &DummyData, MAXIMUM_CDROM_SIZE);
                     /* fall through */
@@ -631,7 +668,6 @@ IdentifyDevice(
     IN UCHAR DeviceNumber,
     OUT PDEVICE_UNIT *DeviceUnit)
 {
-    UCHAR SignatureLow, SignatureHigh;
     IDENTIFY_DATA Id;
     INQUIRYDATA AtapiInquiry;
     BOOLEAN Success;
@@ -653,41 +689,29 @@ IdentifyDevice(
 
     /* Send the IDENTIFY DEVICE command */
     AtaWritePort(Channel, IDX_IO1_o_Command, IDE_COMMAND_IDENTIFY);
-    StallExecutionProcessor(50);
+    StallExecutionProcessor(500);
     if (WaitForFlags(Channel, (IDE_STATUS_BUSY | IDE_STATUS_DRQ | IDE_STATUS_ERROR),
                      IDE_STATUS_DRQ, ATA_STATUS_TIMEOUT))
     {
-        SignatureLow = AtaReadPort(Channel, IDX_IO1_i_CylinderLow);
-        SignatureHigh = AtaReadPort(Channel, IDX_IO1_i_CylinderHigh);
-        TRACE("IdentifyDevice(): SignatureLow = 0x%x, SignatureHigh = 0x%x\n", SignatureLow, SignatureHigh);
-        if (SignatureLow == 0x00 && SignatureHigh == 0x00)
-        {
-            /* This is PATA */
-            TRACE("IdentifyDevice(): Found PATA device at %d:%d\n", Channel, DeviceNumber);
-            goto Identify;
-        }
-    }
-
-    /* If not PATA, ATAPI maybe? Send the IDENTIFY PACKET DEVICE command */
-    AtaWritePort(Channel, IDX_ATAPI_IO1_o_Command, IDE_COMMAND_ATAPI_IDENTIFY);
-    StallExecutionProcessor(500);
-    SignatureLow = AtaReadPort(Channel, IDX_IO1_i_CylinderLow);
-    SignatureHigh = AtaReadPort(Channel, IDX_IO1_i_CylinderHigh);
-    TRACE("IdentifyDevice(): SignatureLow = 0x%x, SignatureHigh = 0x%x\n", SignatureLow, SignatureHigh);
-    /* Check for devices that implements the PACKET Command feature */
-    if (SignatureLow == ATAPI_MAGIC_LSB && SignatureHigh == ATAPI_MAGIC_MSB)
-    {
-        /* This is ATAPI */
-        Flags |= ATA_DEVICE_ATAPI | ATA_DEVICE_LBA | ATA_DEVICE_NOT_READY;
-        TRACE("IdentifyDevice(): Found ATAPI device at %d:%d\n", Channel, DeviceNumber);
-        goto Identify;
+        TRACE("IdentifyDevice(): Found PATA device at %d:%d\n", Channel, DeviceNumber);
     }
     else
     {
-        goto Failure;
+        /* Send the IDENTIFY PACKET DEVICE command */
+        AtaWritePort(Channel, IDX_ATAPI_IO1_o_Command, IDE_COMMAND_ATAPI_IDENTIFY);
+        StallExecutionProcessor(500);
+        if (WaitForFlags(Channel, (IDE_STATUS_BUSY | IDE_STATUS_DRQ | IDE_STATUS_ERROR),
+                         IDE_STATUS_DRQ, ATA_STATUS_TIMEOUT))
+        {
+            TRACE("IdentifyDevice(): Found ATAPI device at %d:%d\n", Channel, DeviceNumber);
+            Flags |= ATA_DEVICE_ATAPI | ATA_DEVICE_LBA | ATA_DEVICE_NOT_READY;
+        }
+        else
+        {
+            goto Failure;
+        }
     }
 
-Identify:
     /* Receive parameter information from the device */
     AtaReadBuffer(Channel, &Id, IDENTIFY_DATA_SIZE);
 
@@ -713,14 +737,18 @@ Identify:
         AtapiPacket[0] = SCSIOP_INQUIRY;
         AtapiPacket[4] = INQUIRYDATABUFFERSIZE;
         Success = AtaSendAtapiPacket(Channel, AtapiPacket, ATAPI_PACKET_SIZE(Id), INQUIRYDATABUFFERSIZE);
-        if (!Success)
-            goto Failure;
-
-        AtaReadBuffer(Channel, &AtapiInquiry, INQUIRYDATABUFFERSIZE);
-        if (AtapiInquiry.DeviceType != READ_ONLY_DIRECT_ACCESS_DEVICE)
+        if (Success)
         {
-            TRACE("IdentifyDevice(): Unsupported device type 0x%x!\n", AtapiInquiry.DeviceType);
-            goto Failure;
+            AtaReadBuffer(Channel, &AtapiInquiry, INQUIRYDATABUFFERSIZE);
+            if (AtapiInquiry.DeviceType != READ_ONLY_DIRECT_ACCESS_DEVICE)
+            {
+                TRACE("IdentifyDevice(): Unsupported device type 0x%x!\n", AtapiInquiry.DeviceType);
+                goto Failure;
+            }
+        }
+        else
+        {
+            AtapiPrintSenseData(Channel, Id);
         }
     }
 
@@ -756,7 +784,7 @@ Identify:
             {
                 TRACE("Using LBA48 addressing mode.\n");
                 Flags |= ATA_DEVICE_LBA48 | ATA_DEVICE_LBA;
-                TotalSectors = Id.UserAddressableSectors48;
+                TotalSectors = Id.UserAddressableSectors48 + Id.UserAddressableSectors;
             }
             else
             {
