25,7 → 25,7 |
|
DEBUG = 1 |
__DEBUG__ = 1 |
__DEBUG_LEVEL__ = 2 |
__DEBUG_LEVEL__ = 2 ; 1 = verbose, 2 = errors only |
|
include '../proc32.inc' |
include '../imports.inc' |
169,7 → 169,7 |
cmp [state], 1 |
jne .exit |
.entry: |
DEBUGF 2,"Registering %s driver\n", my_service |
DEBUGF 1, "Loading driver\n" |
stdcall RegService, my_service, service_proc |
ret |
.fail: |
296,7 → 296,7 |
|
.hook: |
|
DEBUGF 2,"Hooking into device, dev:%x, bus:%x, irq:%x, addr:%x\n",\ |
DEBUGF 1, "Hooking into device, dev:%x, bus:%x, irq:%x, addr:%x\n",\ |
[device.pci_dev]:1,[device.pci_bus]:1,[device.irq_line]:1,[device.io_addr]:4 |
|
call probe ; this function will output in eax |
326,7 → 326,7 |
ret |
|
.err: |
DEBUGF 1,"Failed, removing device structure\n" |
DEBUGF 2, "Failed, removing device structure\n" |
stdcall KernelFree, ebx |
|
jmp .fail |
394,7 → 394,7 |
mov [device.vendor], VENDOR_NONE |
mov [device.bmem], 0 |
|
DEBUGF 2,"Trying 16-bit mode\n" |
DEBUGF 1, "Trying 16-bit mode\n" |
|
mov [device.flags], FLAG_16BIT + FLAG_PIO |
mov [device.memsize], MEM_32k |
432,8 → 432,8 |
repe cmpsb |
je ep_set_vendor |
|
DEBUGF 2,"16-bit mode failed\n" |
DEBUGF 2,"Trying 8-bit mode\n" |
DEBUGF 1, "16-bit mode failed\n" |
DEBUGF 1, "Trying 8-bit mode\n" |
|
mov [device.flags], FLAG_PIO |
mov [device.memsize], MEM_16k |
491,18 → 491,18 |
|
ep_set_vendor: |
|
DEBUGF 2,"Mode ok\n" |
DEBUGF 1, "Mode ok\n" |
|
cmp [device.io_addr], ISA_MAX_ADDR |
jbe .isa |
|
DEBUGF 2,"Card is using PCI bus\n" |
DEBUGF 1, "Card is using PCI bus\n" |
|
mov [device.vendor], VENDOR_NOVELL ;;; FIXME |
jmp ep_check_have_vendor |
|
.isa: |
DEBUGF 2,"Card is using ISA bus\n" |
DEBUGF 1, "Card is using ISA bus\n" |
|
mov [device.vendor], VENDOR_NOVELL |
|
526,12 → 526,18 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
reset: |
DEBUGF 2,"Resetting device\n" |
DEBUGF 1, "Resetting device\n" |
|
; attach int handler |
movzx eax, [device.irq_line] |
DEBUGF 1,"Attaching int handler to irq %x\n", eax:1 |
stdcall AttachIntHandler, eax, int_handler, dword 0 |
test eax, eax |
jnz @f |
DEBUGF 2, "Could not attach int handler!\n" |
; or eax, -1 |
; ret |
@@: |
|
; Stop card + DMA |
set_io 0 |
741,7 → 747,7 |
|
push ebx esi edi |
|
DEBUGF 1,"\n%s int\n", my_service |
DEBUGF 1, "INT\n" |
|
; find pointer of device wich made INT occur |
|