From 2c856e2fdd88330fe347aece88156749a1fdec33 Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Mon, 30 Jul 2007 20:17:22 +0000 Subject: [PATCH] Fix: clear DMA read precache, when the physical device IDE varies. git-svn-id: svn://kolibrios.org@597 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/blkdev/hd_drv.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/trunk/blkdev/hd_drv.inc b/kernel/trunk/blkdev/hd_drv.inc index 2e6ad22e3e..79053110f2 100644 --- a/kernel/trunk/blkdev/hd_drv.inc +++ b/kernel/trunk/blkdev/hd_drv.inc @@ -477,6 +477,7 @@ IDE_descriptor_table: dw 0x8000 dma_cur_sector dd not 40h +dma_hdpos dd 0 irq14_func dd hdd_irq_null irq15_func dd hdd_irq_null endg @@ -557,6 +558,9 @@ align 4 hd_read_dma: push eax push edx + mov edx,[dma_hdpos] + cmp edx,[hdpos] + jne .notread mov edx, [dma_cur_sector] cmp eax, edx jb .notread @@ -659,6 +663,8 @@ hd_read_dma: @@: cmp [hd_error], 0 jnz hd_read_error + mov eax,[hdpos] + mov [dma_hdpos],eax pop edx pop eax mov [dma_cur_sector], eax