555,7 → 555,7 |
|
.entry: |
|
DEBUGF 2,"Loading %s driver\n", my_service |
DEBUGF 2,"Loading driver\n" |
stdcall RegService, my_service, service_proc |
ret |
|
578,7 → 578,7 |
proc service_proc stdcall, ioctl:dword |
|
mov edx, [ioctl] |
mov eax, [IOCTL.io_code] |
mov eax, [edx + IOCTL.io_code] |
|
;------------------------------------------------------ |
|
585,9 → 585,9 |
cmp eax, 0 ;SRV_GETVERSION |
jne @F |
|
cmp [IOCTL.out_size], 4 |
cmp [edx + IOCTL.out_size], 4 |
jb .fail |
mov eax, [IOCTL.output] |
mov eax, [edx + IOCTL.output] |
mov [eax], dword API_VERSION |
|
xor eax, eax |
598,10 → 598,10 |
cmp eax, 1 ;SRV_HOOK |
jne .fail |
|
cmp [IOCTL.inp_size], 3 ; Data input must be at least 3 bytes |
cmp [edx + IOCTL.inp_size], 3 ; Data input must be at least 3 bytes |
jb .fail |
|
mov eax, [IOCTL.input] |
mov eax, [edx + IOCTL.input] |
cmp byte [eax], 1 ; 1 means device number and bus number (pci) are given |
jne .fail ; other types arent supported for this card yet |
|
612,7 → 612,7 |
test ecx, ecx |
jz .firstdevice |
|
; mov eax, [IOCTL.input] ; get the pci bus and device numbers |
; mov eax, [edx + IOCTL.input] ; get the pci bus and device numbers |
mov ax , [eax+1] ; |
.nextdevice: |
mov ebx, [esi] |
641,7 → 641,7 |
|
; save the pci bus and device numbers |
|
mov eax, [IOCTL.input] |
mov eax, [edx + IOCTL.input] |
movzx ecx, byte[eax+1] |
mov [device.pci_bus], ecx |
movzx ecx, byte[eax+2] |
1381,8 → 1381,6 |
align 4 |
read_mac: |
|
DEBUGF 1, "Ethernet Address: " |
|
lea edi, [device.mac] |
set_io 0 |
set_io byPAR0 |
1390,12 → 1388,14 |
.next: |
in al, dx |
stosb |
DEBUGF 1, "-%x", al |
inc edx |
dec ecx |
jnz .next |
DEBUGF 1, "\n" |
|
DEBUGF 1,"MAC = %x-%x-%x-%x-%x-%x\n", \ |
[device.mac+0]:2,[device.mac+1]:2,[device.mac+2]:2,[device.mac+3]:2,[device.mac+4]:2,[device.mac+5]:2 |
|
|
ret |
|
|
1410,7 → 1410,7 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
align 4 |
transmit: |
DEBUGF 1,"\nTransmitting packet, buffer:%x, size:%u\n", [esp+4], [esp+8] |
DEBUGF 1,"Transmitting packet, buffer:%x, size:%u\n", [esp+4], [esp+8] |
mov eax, [esp+4] |
DEBUGF 1,"To: %x-%x-%x-%x-%x-%x From: %x-%x-%x-%x-%x-%x Type:%x%x\n",\ |
[eax+00]:2,[eax+01]:2,[eax+02]:2,[eax+03]:2,[eax+04]:2,[eax+05]:2,\ |
1485,7 → 1485,7 |
|
push ebx esi edi |
|
DEBUGF 1,"\n%s int ", my_service |
DEBUGF 1,"INT\n" |
|
; Find pointer of device wich made IRQ occur |
|