From 7ccd311e158455b1d941d58b03a8740f7b6be5e0 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Mon, 7 Jun 2010 18:48:49 +0000 Subject: [PATCH] Net-branch: Fixed bug in RTL8139 interrupt handler. git-svn-id: svn://kolibrios.org@1486 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/branches/net/drivers/RTL8139.asm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/kernel/branches/net/drivers/RTL8139.asm b/kernel/branches/net/drivers/RTL8139.asm index d481706ac3..f438c3a70e 100644 --- a/kernel/branches/net/drivers/RTL8139.asm +++ b/kernel/branches/net/drivers/RTL8139.asm @@ -15,6 +15,7 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + format MS COFF API_VERSION equ 0x01000100 @@ -341,12 +342,12 @@ proc service_proc stdcall, ioctl:dword ; Fill in the direct call addresses into the struct - mov dword [device.reset], reset - mov dword [device.transmit], transmit - mov dword [device.get_MAC], read_mac - mov dword [device.set_MAC], write_mac - mov dword [device.unload], unload - mov dword [device.name], my_service + mov [device.reset], reset + mov [device.transmit], transmit + mov [device.get_MAC], read_mac + mov [device.set_MAC], write_mac + mov [device.unload], unload + mov [device.name], my_service ; save the pci bus and device numbers @@ -787,6 +788,8 @@ int_handler: mov esi, RTL8139_LIST mov ecx, [RTL8139_DEV] + test ecx, ecx + jz .fail .nextdevice: mov ebx, dword [esi] @@ -800,7 +803,8 @@ int_handler: test ax , ax jnz .got_it - loop .nextdevice + dec ecx + jnz .nextdevice ret ; If no device was found, abort (The irq was probably for a device, not registered to this driver)