Fix: clear DMA read precache, when the physical device IDE varies.

git-svn-id: svn://kolibrios.org@597 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2007-07-30 20:17:22 +00:00
parent c0c454e024
commit 2c856e2fdd

View File

@ -477,6 +477,7 @@ IDE_descriptor_table:
dw 0x8000 dw 0x8000
dma_cur_sector dd not 40h dma_cur_sector dd not 40h
dma_hdpos dd 0
irq14_func dd hdd_irq_null irq14_func dd hdd_irq_null
irq15_func dd hdd_irq_null irq15_func dd hdd_irq_null
endg endg
@ -557,6 +558,9 @@ align 4
hd_read_dma: hd_read_dma:
push eax push eax
push edx push edx
mov edx,[dma_hdpos]
cmp edx,[hdpos]
jne .notread
mov edx, [dma_cur_sector] mov edx, [dma_cur_sector]
cmp eax, edx cmp eax, edx
jb .notread jb .notread
@ -659,6 +663,8 @@ hd_read_dma:
@@: @@:
cmp [hd_error], 0 cmp [hd_error], 0
jnz hd_read_error jnz hd_read_error
mov eax,[hdpos]
mov [dma_hdpos],eax
pop edx pop edx
pop eax pop eax
mov [dma_cur_sector], eax mov [dma_cur_sector], eax