From b54b7529418970b23ac885aca042345c38eaa5ce Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Thu, 20 Sep 2007 22:34:13 +0000 Subject: [PATCH] Small fix for ATAPI WaitUnitReady procedure. git-svn-id: svn://kolibrios.org@637 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/blkdev/cd_drv.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/kernel/trunk/blkdev/cd_drv.inc b/kernel/trunk/blkdev/cd_drv.inc index 81a73f5f30..dce1e3e669 100644 --- a/kernel/trunk/blkdev/cd_drv.inc +++ b/kernel/trunk/blkdev/cd_drv.inc @@ -553,9 +553,19 @@ WaitUnitReady: ; Сформировать команду TEST UNIT READY mov [PacketCommand],word 00h ; ЦИКЛ ОЖИДАНИЯ ГОТОВНОСТИ УСТРОЙСТВА + mov ecx,NoTickWaitTime @@SendCommand: ; Подать команду проверки готовности call SendPacketNoDatCommand + cmp [timer_ticks_enable],0 + jne @f + cmp [DevErrorCode],0 + je @@End_11 + dec ecx + cmp ecx,0 + je .Error + jmp @@SendCommand +@@: call change_task ; Проверить код ошибки cmp [DevErrorCode],0 @@ -565,6 +575,7 @@ WaitUnitReady: sub EAX,[WURStartTime] cmp EAX,MaxCDWaitTime jb @@SendCommand +.Error: ; Ошибка тайм-аута mov [DevErrorCode],1 @@End_11: