From b7f73c6e2ab77bcf457e81f1af53b08edb9a58d9 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sat, 22 Aug 2009 16:41:17 +0000 Subject: [PATCH] Update and enable the debugging device selection check. Might shed some light on the problem in #4308. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32616 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp b/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp index 383bc17b3d..26c0698964 100644 --- a/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp +++ b/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp @@ -273,12 +273,13 @@ ATAChannel::SelectDevice(uint8 device) _FlushAndWait(1); -#if 0 +#if 1 // for debugging only _ReadRegs(&taskFile, ATA_MASK_DEVICE_HEAD); - if (taskFile.chs.device != device) { - TRACE_ERROR("device %d not selected! head 0x%x, mode 0x%x, device %d\n", - device, taskFile.chs.head, taskFile.chs.mode, taskFile.chs.device); + if (taskFile.lba.device != device) { + TRACE_ERROR("device %d not selected! unused 0x%x, mode 0x%x," + " device %d\n", device, taskFile.lba.lba_24_27, taskFile.lba.mode, + taskFile.lba.device); return B_ERROR; } #endif