Rev 3545 | Rev 4467 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3545 | Rev 3845 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | 28 | ||
Line 29... | Line 29... | ||
29 | MAX_DEVICES = 16 |
29 | MAX_DEVICES = 16 |
30 | 30 | ||
31 | DEBUG = 1 |
31 | DEBUG = 1 |
Line 32... | Line 32... | ||
32 | __DEBUG__ = 1 |
32 | __DEBUG__ = 1 |
33 | __DEBUG_LEVEL__ = 2 |
33 | __DEBUG_LEVEL__ = 2 ; 1 = verbose, 2 = errors only |
34 | 34 | ||
35 | include '../proc32.inc' |
35 | include '../proc32.inc' |
Line 192... | Line 192... | ||
192 | cmp [state], 1 |
192 | cmp [state], 1 |
193 | jne .exit |
193 | jne .exit |
Line 194... | Line 194... | ||
194 | 194 | ||
Line 195... | Line 195... | ||
195 | .entry: |
195 | .entry: |
196 | 196 | ||
197 | DEBUGF 1,"Loading %s driver\n", my_service |
197 | DEBUGF 1,"Loading driver\n" |
Line 198... | Line 198... | ||
198 | stdcall RegService, my_service, service_proc |
198 | stdcall RegService, my_service, service_proc |
199 | ret |
199 | ret |
Line 292... | Line 292... | ||
292 | 292 | ||
Line 293... | Line 293... | ||
293 | ; We've found the io address, find IRQ now |
293 | ; We've found the io address, find IRQ now |
Line 294... | Line 294... | ||
294 | 294 | ||
295 | PCI_find_irq |
295 | PCI_find_irq |
Line 296... | Line 296... | ||
296 | 296 | ||
Line 297... | Line 297... | ||
297 | DEBUGF 2,"Hooking into device, dev:%x, bus:%x, irq:%x, addr:%x\n",\ |
297 | DEBUGF 1,"Hooking into device, dev:%x, bus:%x, irq:%x, addr:%x\n",\ |
Line 374... | Line 374... | ||
374 | ;------------- |
374 | ;------------- |
Line 375... | Line 375... | ||
375 | 375 | ||
376 | align 4 |
376 | align 4 |
Line 377... | Line 377... | ||
377 | probe: |
377 | probe: |
Line 378... | Line 378... | ||
378 | 378 | ||
Line 379... | Line 379... | ||
379 | DEBUGF 1,"Probing i8255x\n" |
379 | DEBUGF 1,"Probing\n" |
380 | 380 | ||
Line 398... | Line 398... | ||
398 | repne scasw |
398 | repne scasw |
399 | jne .notfound |
399 | jne .notfound |
400 | jmp .found |
400 | jmp .found |
Line 401... | Line 401... | ||
401 | 401 | ||
402 | .notfound: |
402 | .notfound: |
403 | DEBUGF 1,"ERROR: Unsupported device!\n" |
403 | DEBUGF 2,"Unsupported device!\n" |
404 | or eax, -1 |
404 | or eax, -1 |
Line 405... | Line 405... | ||
405 | ret |
405 | ret |
Line 425... | Line 425... | ||
425 | movzx eax, [device.irq_line] |
425 | movzx eax, [device.irq_line] |
426 | DEBUGF 1,"Attaching int handler to irq %x\n", eax:1 |
426 | DEBUGF 1,"Attaching int handler to irq %x\n", eax:1 |
427 | stdcall AttachIntHandler, eax, int_handler, dword 0 |
427 | stdcall AttachIntHandler, eax, int_handler, dword 0 |
428 | test eax, eax |
428 | test eax, eax |
429 | jnz @f |
429 | jnz @f |
430 | DEBUGF 1,"\nCould not attach int handler!\n" |
430 | DEBUGF 2,"Could not attach int handler!\n" |
431 | ; or eax, -1 |
431 | ; or eax, -1 |
432 | ; ret |
432 | ; ret |
433 | @@: |
433 | @@: |
Line 434... | Line 434... | ||
434 | 434 | ||
Line 435... | Line 435... | ||
435 | DEBUGF 1,"Resetting %s\n", my_service |
435 | DEBUGF 1,"Resetting\n" |
436 | 436 | ||
Line 437... | Line 437... | ||
437 | ;--------------- |
437 | ;--------------- |
Line 556... | Line 556... | ||
556 | GetRealAddr |
556 | GetRealAddr |
557 | mov [txfd.tx_desc_addr], eax |
557 | mov [txfd.tx_desc_addr], eax |
Line 558... | Line 558... | ||
558 | 558 | ||
Line 559... | Line 559... | ||
559 | ; Indicate that we have successfully reset the card |
559 | ; Indicate that we have successfully reset the card |
Line 560... | Line 560... | ||
560 | 560 | ||
Line 561... | Line 561... | ||
561 | DEBUGF 1,"Resetting %s complete\n", my_service |
561 | DEBUGF 1,"Reset complete\n" |
562 | 562 | ||
Line 691... | Line 691... | ||
691 | align 4 |
691 | align 4 |
692 | int_handler: |
692 | int_handler: |
Line 693... | Line 693... | ||
693 | 693 | ||
Line 694... | Line 694... | ||
694 | push ebx esi edi |
694 | push ebx esi edi |
Line 695... | Line 695... | ||
695 | 695 | ||
Line 696... | Line 696... | ||
696 | DEBUGF 1,"\n%s int\n", my_service |
696 | DEBUGF 1,"INT\n" |
697 | 697 | ||
Line 859... | Line 859... | ||
859 | 859 | ||
860 | 860 | ||
Line 861... | Line 861... | ||
861 | align 4 |
861 | align 4 |
Line 862... | Line 862... | ||
862 | ee_read: ; esi = address to read |
862 | ee_read: ; esi = address to read |
863 | 863 | ||
Line 864... | Line 864... | ||
864 | DEBUGF 1,"Eeprom read from 0x%x", esi |
864 | DEBUGF 1,"Eeprom read from 0x%x\n", esi |
Line 929... | Line 929... | ||
929 | 929 | ||
930 | xor ax, ax |
930 | xor ax, ax |
Line 931... | Line 931... | ||
931 | out dx, ax |
931 | out dx, ax |
932 | 932 | ||
Line 933... | Line 933... | ||
933 | 933 | ||
Line 1009... | Line 1009... | ||
1009 | 1009 | ||
1010 | 1010 | ||
Line 1011... | Line -... | ||
1011 | align 4 |
- | |
1012 | ee_get_width: |
- | |
1013 | 1011 | align 4 |
|
1014 | ; DEBUGF 1,"Eeprom get width\n" |
1012 | ee_get_width: |
Line 1015... | Line 1013... | ||
1015 | 1013 | ||
1016 | set_io 0 |
1014 | set_io 0 |
Line 1042... | Line 1040... | ||
1042 | 1040 | ||
1043 | in al, dx |
1041 | in al, dx |
1044 | test al, EE_DO |
1042 | test al, EE_DO |
Line 1045... | Line -... | ||
1045 | jnz .loop |
- | |
1046 | 1043 | jnz .loop |
|
1047 | .give_up: |
1044 | |
Line 1048... | Line 1045... | ||
1048 | xor al, al |
1045 | xor al, al |
1049 | out dx, al ; de-activate eeprom |
- | |
1050 | 1046 | out dx, al ; de-activate eeprom |
|
1051 | sub cl, 3 ; dont count the opcode bits |
1047 | |
Line -... | Line 1048... | ||
- | 1048 | sub cl, 3 ; dont count the opcode bits |
|
Line 1052... | Line 1049... | ||
1052 | 1049 | mov [device.ee_bus_width], cl |
|
1053 | mov [device.ee_bus_width], cl |
1050 | DEBUGF 1, "Eeprom width=%u bit\n", ecx |
Line 1054... | Line 1051... | ||
1054 | DEBUGF 1,"Eeprom width=%u bit\n", ecx |
1051 | |
1055 | 1052 | ret |
|
Line 1056... | Line 1053... | ||
1056 | 1053 |