Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4467 → Rev 4470

/drivers/ethernet/3c59x.asm
403,7 → 403,7
proc service_proc stdcall, ioctl:dword
 
mov edx, [ioctl]
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
 
;------------------------------------------------------
 
410,9 → 410,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
423,10 → 423,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 of this hardware dont exist
 
437,7 → 437,7
jz .maybeboomerang
 
mov esi, VORTEX_LIST
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]
456,7 → 456,7
jz .firstdevice
 
mov esi, BOOMERANG_LIST
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] ;
.nextdevice2:
mov ebx, [esi]
487,7 → 487,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]
/drivers/ethernet/R6040.asm
260,7 → 260,7
proc service_proc stdcall, ioctl:dword
 
mov edx, [ioctl]
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
 
;------------------------------------------------------
 
267,9 → 267,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
280,10 → 280,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
 
294,7 → 294,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]
323,7 → 323,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]
/drivers/ethernet/RTL8029.asm
192,7 → 192,7
proc service_proc stdcall, ioctl:dword
 
mov edx, [ioctl]
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
 
;------------------------------------------------------
;---------------
199,9 → 199,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
214,14 → 214,14
 
DEBUGF 1, "Checking if device is already listed..\n"
 
mov eax, [IOCTL.input]
mov eax, [edx + IOCTL.input]
 
cmp [IOCTL.inp_size], 3
cmp [edx + IOCTL.inp_size], 3
jb .fail
cmp byte [eax], 1
je .pci
 
cmp [IOCTL.inp_size], 4
cmp [edx + IOCTL.inp_size], 4
jb .fail
cmp byte [eax], 0
je .isa
251,7 → 251,7
.firstdevice_pci:
call create_new_struct
 
mov eax, [IOCTL.input]
mov eax, [edx + IOCTL.input]
movzx ecx, byte[eax+1]
mov [device.pci_bus], ecx
movzx ecx, byte[eax+2]
290,7 → 290,7
.firstdevice_isa:
call create_new_struct
 
mov eax, [IOCTL.input]
mov eax, [edx + IOCTL.input]
movzx ecx, word [eax+1]
mov [device.io_addr], ecx
mov cl, [eax+3]
/drivers/ethernet/RTL8139.asm
267,7 → 267,7
proc service_proc stdcall, ioctl:dword
 
mov edx, [ioctl]
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
 
;------------------------------------------------------
 
274,9 → 274,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
287,10 → 287,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
 
329,7 → 329,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]
/drivers/ethernet/RTL8169.asm
406,7 → 406,7
proc service_proc stdcall, ioctl:dword
 
mov edx, [ioctl]
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
 
;------------------------------------------------------
 
413,9 → 413,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
426,10 → 426,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
 
440,7 → 440,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]
469,7 → 469,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]
/drivers/ethernet/bcm57xx.asm
79,7 → 79,7
 
.entry:
 
DEBUGF 2,"Loading %s driver\n", my_service
DEBUGF 2,"Loading driver\n"
stdcall RegService, my_service, service_proc
ret
 
104,7 → 104,7
proc service_proc stdcall, ioctl:dword
 
mov edx, [ioctl]
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
 
;------------------------------------------------------
 
111,9 → 111,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
124,10 → 124,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
 
138,7 → 138,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]
167,7 → 167,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]
/drivers/ethernet/dec21x4x.asm
348,7 → 348,7
proc service_proc stdcall, ioctl:dword
 
mov edx, [ioctl]
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
 
;------------------------------------------------------
 
355,9 → 355,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
368,10 → 368,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
 
382,7 → 382,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]
416,7 → 416,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]
/drivers/ethernet/forcedeth.asm
456,7 → 456,7
cmp [state], 1
jne .exit
 
DEBUGF 2,"Loading %s driver\n", my_service
DEBUGF 2,"Loading driver\n"
stdcall RegService, my_service, service_proc
ret
 
478,7 → 478,7
proc service_proc stdcall, ioctl:dword
 
mov edx, [ioctl]
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
 
;------------------------------------------------------
 
485,9 → 485,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
498,10 → 498,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
 
512,7 → 512,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]
541,7 → 541,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]
1798,7 → 1798,7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
align 4
transmit:
DEBUGF 2,"\nTransmitting packet, buffer:%x, size:%u\n", [esp+4], [esp+8]
DEBUGF 2,"Transmitting packet, buffer:%x, size:%u\n", [esp+4], [esp+8]
mov eax, [esp+4]
DEBUGF 2,"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,\
1859,7 → 1859,7
 
push ebx esi edi
 
DEBUGF 2,"\n%s INT\n", my_service
DEBUGF 2,"INT\n"
 
;-------------------------------------------
; Find pointer of device wich made IRQ occur
/drivers/ethernet/i8254x.asm
316,7 → 316,7
proc service_proc stdcall, ioctl:dword
 
mov edx, [ioctl]
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
 
;------------------------------------------------------
 
323,9 → 323,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
336,10 → 336,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
 
350,7 → 350,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]
379,7 → 379,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]
/drivers/ethernet/i8255x.asm
219,7 → 219,7
proc service_proc stdcall, ioctl:dword
 
mov edx, [ioctl]
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
 
;------------------------------------------------------
 
226,9 → 226,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
239,10 → 239,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
 
253,7 → 253,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]
282,7 → 282,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]
/drivers/ethernet/mtd80x.asm
327,7 → 327,7
 
.entry:
 
DEBUGF 2,"Loading %s driver\n", my_service
DEBUGF 2,"Loading driver\n"
stdcall RegService, my_service, service_proc
ret
 
350,7 → 350,7
proc service_proc stdcall, ioctl:dword
 
mov edx, [ioctl]
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
 
;------------------------------------------------------
 
357,9 → 357,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
370,10 → 370,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
 
384,7 → 384,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]
413,7 → 413,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]
514,7 → 514,7
align 4
probe:
 
DEBUGF 2,"Probing mtd80x device\n"
DEBUGF 2,"Probing device\n"
 
PCI_make_bus_master
 
635,7 → 635,7
align 4
reset:
 
DEBUGF 1,"Resetting mtd80x\n"
DEBUGF 1,"Resetting\n"
 
;--------------------------------
; insert irq handler on given irq
645,7 → 645,7
stdcall AttachIntHandler, eax, int_handler, dword 0
test eax, eax
jnz @f
DEBUGF 1,"\nCould not attach int handler!\n"
DEBUGF 1,"Could not attach int handler!\n"
; or eax, -1
; ret
@@:
1105,7 → 1105,7
 
push ebx esi edi
 
DEBUGF 1,"\n%s int\n", my_service
DEBUGF 1,"int\n"
 
; find pointer of device wich made IRQ occur
 
1134,7 → 1134,7
 
.got_it:
 
DEBUGF 1,"Device: %x Status: %x ", ebx, ax
DEBUGF 1,"Device: %x Status: %x\n", ebx, ax
 
test ax, RI ; receive interrupt
jz .no_rx
/drivers/ethernet/pcnet32.asm
396,7 → 396,7
proc service_proc stdcall, ioctl:dword
 
mov edx, [ioctl]
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
 
;------------------------------------------------------
 
403,9 → 403,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
416,10 → 416,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
 
430,7 → 430,7
jz .firstdevice
 
mov esi, device_list
; 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]
459,7 → 459,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]
/drivers/ethernet/rhine.asm
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
 
/drivers/ethernet/sis900.asm
267,15 → 267,15
; pointer to IOCTL structure.
mov edx, [esp+4] ; edx -> IOCTL
; 2. Get request code and select a handler for the code.
mov eax, [IOCTL.io_code]
mov eax, [edx + IOCTL.io_code]
test eax, eax ; check for SRV_GETVERSION
jnz @f
; 3. This is SRV_GETVERSION request, no input, 4 bytes output, API_VERSION.
; 3a. Output size must be at least 4 bytes.
cmp [IOCTL.out_size], 4
cmp [edx + IOCTL.out_size], 4
jb .fail
; 3b. Write result to the output buffer.
mov eax, [IOCTL.output]
mov eax, [edx + IOCTL.output]
mov [eax], dword API_VERSION
; 3c. Return success.
xor eax, eax
286,10 → 286,10
; 4. This is SRV_HOOK request, input defines the device to hook, no output.
; 4a. The driver works only with PCI devices,
; so input must be at least 3 bytes long.
cmp [IOCTL.inp_size], 3
cmp [edx + IOCTL.inp_size], 3
jb .fail
; 4b. First byte of input is bus type, 1 stands for PCI.
mov eax, [IOCTL.input]
mov eax, [edx + IOCTL.input]
cmp byte [eax], 1
jne .fail
; 4c. Second and third bytes of the input define the device: bus and dev.
303,7 → 303,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]
323,7 → 323,7
; 4h. Zero the structure.
allocate_and_clear ebx, device.size, .fail
; 4i. Save PCI coordinates
mov eax, [IOCTL.input]
mov eax, [edx + IOCTL.input]
movzx ecx, byte[eax+1]
mov [device.pci_bus], ecx
movzx ecx, byte[eax+2]