20,7 → 20,7 |
|
DEBUG = 1 |
__DEBUG__ = 1 |
__DEBUG_LEVEL__ = 2 |
__DEBUG_LEVEL__ = 2 ; 1 = verbose, 2 = errors only |
|
MAX_DEVICES = 4 |
MAX_ETH_FRAME_SIZE = 1514 |
371,7 → 371,7 |
|
.entry: |
|
DEBUGF 2,"Loading %s driver\n", my_service |
DEBUGF 1,"Loading driver\n" |
stdcall RegService, my_service, service_proc |
ret |
|
508,7 → 508,7 |
|
dec [devices] |
.err: |
DEBUGF 1,"Error, removing all data !\n" |
DEBUGF 2,"Error, removing all data !\n" |
stdcall KernelFree, ebx |
|
.fail: |
598,7 → 598,7 |
jmp .L1 |
|
.no_dev: |
DEBUGF 1,"PCnet device not found!\n" |
DEBUGF 1,"device not found!\n" |
mov eax, 1 |
ret |
|
723,7 → 723,7 |
stdcall AttachIntHandler, eax, int_handler, dword 0 |
test eax, eax |
jnz @f |
DEBUGF 1,"\nCould not attach int handler!\n" |
DEBUGF 2,"Could not attach int handler!\n" |
; or eax, -1 |
; ret |
@@: |
861,7 → 861,7 |
cmp [device.phy], MAX_PHYS |
jb .mii_loop |
|
DEBUGF 1, "No PHY found!\n" |
DEBUGF 2, "No PHY found!\n" |
|
or eax, -1 |
ret |
918,7 → 918,7 |
|
dec esi |
jnz @r |
DEBUGF 1,"Initialize timeout!\n" |
DEBUGF 2,"Initialize timeout!\n" |
@@: |
|
; Start the device and enable interrupts |
1039,7 → 1039,6 |
; get next descriptor 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, ... |
inc [device.cur_tx] |
and [device.cur_tx], TX_RING_SIZE - 1 |
DEBUGF 1," - Packet Sent! " |
|
; Update stats |
inc [device.packets_tx] |
1053,7 → 1052,7 |
ret 8 |
|
.nospace: |
DEBUGF 1, 'ERROR: no free transmit descriptors\n' |
DEBUGF 2, "ERROR: no free transmit descriptors\n" |
stdcall KernelFree, [esp+4] |
or eax, -1 |
ret 8 |
1071,7 → 1070,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 |
|
1230,7 → 1229,7 |
;;;;;;;;;;;;;;;;;;;;;; |
align 4 |
read_mac: |
DEBUGF 1,"Reading MAC" |
DEBUGF 1,"Reading MAC:\n" |
|
mov edx, [device.io_addr] |
add dx, 6 |
1239,7 → 1238,6 |
dec dx |
in ax, dx |
push ax |
DEBUGF 1,"." |
cmp edx, [device.io_addr] |
ja @r |
|