mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-27 00:39:41 +03:00
Fixed bug in some network drivers. (net branch)
git-svn-id: svn://kolibrios.org@2544 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
087ba52a9f
commit
f10b7bd3bc
@ -199,7 +199,7 @@ proc service_proc stdcall, ioctl:dword
|
|||||||
mov [eax], dword API_VERSION
|
mov [eax], dword API_VERSION
|
||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
ret 4
|
ret
|
||||||
|
|
||||||
;------------------------------------------------------
|
;------------------------------------------------------
|
||||||
@@: ;---------
|
@@: ;---------
|
||||||
@ -231,8 +231,7 @@ proc service_proc stdcall, ioctl:dword
|
|||||||
test ecx, ecx
|
test ecx, ecx
|
||||||
jz .firstdevice_pci
|
jz .firstdevice_pci
|
||||||
|
|
||||||
; mov eax, [IOCTL.input] ; get the pci bus and device numbers
|
mov ax , [eax+1] ; get the pci bus and device numbers
|
||||||
mov ax , [eax+1] ;
|
|
||||||
.nextdevice:
|
.nextdevice:
|
||||||
mov ebx, [esi]
|
mov ebx, [esi]
|
||||||
cmp ax , word [device.pci_bus] ; compare with pci and device num in device list (notice the usage of word instead of byte)
|
cmp ax , word [device.pci_bus] ; compare with pci and device num in device list (notice the usage of word instead of byte)
|
||||||
@ -306,14 +305,13 @@ proc service_proc stdcall, ioctl:dword
|
|||||||
|
|
||||||
cmp eax, -1
|
cmp eax, -1
|
||||||
jz .err
|
jz .err
|
||||||
ret 4
|
ret
|
||||||
|
|
||||||
|
|
||||||
; If the device was already loaded, find the device number and return it in eax
|
; If the device was already loaded, find the device number and return it in eax
|
||||||
|
|
||||||
.find_devicenum:
|
.find_devicenum:
|
||||||
DEBUGF 1,"Trying to find device number of already registered device\n"
|
DEBUGF 1,"Trying to find device number of already registered device\n"
|
||||||
mov ebx, eax
|
|
||||||
call NetPtrToNum ; This kernel procedure converts a pointer to device struct in ebx
|
call NetPtrToNum ; This kernel procedure converts a pointer to device struct in ebx
|
||||||
; into a device number in edi
|
; into a device number in edi
|
||||||
mov eax, edi ; Application wants it in eax instead
|
mov eax, edi ; Application wants it in eax instead
|
||||||
@ -330,7 +328,7 @@ proc service_proc stdcall, ioctl:dword
|
|||||||
@@:
|
@@:
|
||||||
.fail:
|
.fail:
|
||||||
or eax, -1
|
or eax, -1
|
||||||
ret 4
|
ret
|
||||||
|
|
||||||
;------------------------------------------------------
|
;------------------------------------------------------
|
||||||
endp
|
endp
|
||||||
@ -661,6 +659,7 @@ nsr_002:
|
|||||||
mov [device.mtu], 1514
|
mov [device.mtu], 1514
|
||||||
|
|
||||||
; Indicate that we have successfully reset the card
|
; Indicate that we have successfully reset the card
|
||||||
|
xor eax, eax
|
||||||
DEBUGF 2,"Done!\n"
|
DEBUGF 2,"Done!\n"
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
@ -294,8 +294,7 @@ proc service_proc stdcall, ioctl:dword
|
|||||||
test ecx, ecx
|
test ecx, ecx
|
||||||
jz .firstdevice
|
jz .firstdevice
|
||||||
|
|
||||||
; mov eax, [IOCTL.input] ; get the pci bus and device numbers
|
mov ax , [eax+1] ; get the pci bus and device numbers
|
||||||
mov ax , [eax+1] ;
|
|
||||||
.nextdevice:
|
.nextdevice:
|
||||||
mov ebx, [esi]
|
mov ebx, [esi]
|
||||||
cmp ax , word [device.pci_bus] ; compare with pci and device num in device list (notice the usage of word instead of byte)
|
cmp ax , word [device.pci_bus] ; compare with pci and device num in device list (notice the usage of word instead of byte)
|
||||||
|
@ -501,7 +501,6 @@ proc service_proc stdcall, ioctl:dword
|
|||||||
|
|
||||||
.find_devicenum:
|
.find_devicenum:
|
||||||
DEBUGF 2,"Trying to find device number of already registered device\n"
|
DEBUGF 2,"Trying to find device number of already registered device\n"
|
||||||
mov ebx, eax
|
|
||||||
call NetPtrToNum ; This kernel procedure converts a pointer to device struct in ebx
|
call NetPtrToNum ; This kernel procedure converts a pointer to device struct in ebx
|
||||||
; into a device number in edi
|
; into a device number in edi
|
||||||
mov eax, edi ; Application wants it in eax instead
|
mov eax, edi ; Application wants it in eax instead
|
||||||
|
@ -453,7 +453,6 @@ proc service_proc stdcall, ioctl:dword
|
|||||||
|
|
||||||
.find_devicenum:
|
.find_devicenum:
|
||||||
DEBUGF 2,"Trying to find device number of already registered device\n"
|
DEBUGF 2,"Trying to find device number of already registered device\n"
|
||||||
mov ebx, eax
|
|
||||||
call NetPtrToNum ; This kernel procedure converts a pointer to device struct in ebx
|
call NetPtrToNum ; This kernel procedure converts a pointer to device struct in ebx
|
||||||
; into a device number in edi
|
; into a device number in edi
|
||||||
mov eax, edi ; Application wants it in eax instead
|
mov eax, edi ; Application wants it in eax instead
|
||||||
|
@ -449,7 +449,6 @@ proc service_proc stdcall, ioctl:dword
|
|||||||
|
|
||||||
.find_devicenum:
|
.find_devicenum:
|
||||||
DEBUGF 2,"Trying to find device number of already registered device\n"
|
DEBUGF 2,"Trying to find device number of already registered device\n"
|
||||||
mov ebx, eax
|
|
||||||
call NetPtrToNum ; This kernel procedure converts a pointer to device struct in ebx
|
call NetPtrToNum ; This kernel procedure converts a pointer to device struct in ebx
|
||||||
; into a device number in edi
|
; into a device number in edi
|
||||||
mov eax, edi ; Application wants it in eax instead
|
mov eax, edi ; Application wants it in eax instead
|
||||||
|
@ -491,7 +491,6 @@ proc service_proc stdcall, ioctl:dword
|
|||||||
|
|
||||||
.find_devicenum:
|
.find_devicenum:
|
||||||
DEBUGF 1,"Trying to find device number of already registered device\n"
|
DEBUGF 1,"Trying to find device number of already registered device\n"
|
||||||
mov ebx, eax
|
|
||||||
call NetPtrToNum ; This kernel procedure converts a pointer to device struct in ebx
|
call NetPtrToNum ; This kernel procedure converts a pointer to device struct in ebx
|
||||||
; into a device number in edi
|
; into a device number in edi
|
||||||
mov eax, edi ; Application wants it in eax instead
|
mov eax, edi ; Application wants it in eax instead
|
||||||
|
@ -214,7 +214,6 @@ service_proc:
|
|||||||
; 5. If the device was already loaded, find the device number and return it in eax
|
; 5. If the device was already loaded, find the device number and return it in eax
|
||||||
|
|
||||||
.find_devicenum:
|
.find_devicenum:
|
||||||
mov ebx, eax
|
|
||||||
call NetPtrToNum ; This kernel procedure converts a pointer to device struct in ebx
|
call NetPtrToNum ; This kernel procedure converts a pointer to device struct in ebx
|
||||||
; into a device number in edi
|
; into a device number in edi
|
||||||
mov eax, edi ; Application wants it in eax instead
|
mov eax, edi ; Application wants it in eax instead
|
||||||
|
Loading…
Reference in New Issue
Block a user