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 3880 | ||
---|---|---|---|
Line 373... | Line 373... | ||
373 | cmp [state], 1 |
373 | cmp [state], 1 |
374 | jne .exit |
374 | jne .exit |
Line 375... | Line 375... | ||
375 | 375 | ||
Line 376... | Line 376... | ||
376 | .entry: |
376 | .entry: |
377 | 377 | ||
378 | DEBUGF 1,"Loading %s driver\n", my_service |
378 | DEBUGF 1,"Loading driver\n" |
Line 379... | Line 379... | ||
379 | stdcall RegService, my_service, service_proc |
379 | stdcall RegService, my_service, service_proc |
380 | ret |
380 | ret |
Line 603... | Line 603... | ||
603 | .loop: |
603 | .loop: |
604 | cmp ax, [hw_versions+ecx*4] |
604 | cmp ax, [hw_versions+ecx*4] |
605 | jz .found |
605 | jz .found |
606 | loop .loop |
606 | loop .loop |
607 | .notfound: |
607 | .notfound: |
608 | DEBUGF 1,"Device id not found in list!\n" |
608 | DEBUGF 2,"Device id not found in list!\n" |
609 | or eax, -1 |
609 | or eax, -1 |
610 | ret |
610 | ret |
611 | .found: |
611 | .found: |
612 | mov esi, [hw_str+ecx*4] |
612 | mov esi, [hw_str+ecx*4] |
613 | DEBUGF 1,"Hardware type: %s\n", esi |
613 | DEBUGF 1,"Hardware type: %s\n", esi |
Line 629... | Line 629... | ||
629 | call read_eeprom |
629 | call read_eeprom |
630 | test al, 100000b ; full bus master? |
630 | test al, 100000b ; full bus master? |
631 | setnz [device.full_bus_master] |
631 | setnz [device.full_bus_master] |
632 | jnz .boomerang_func |
632 | jnz .boomerang_func |
633 | mov [device.transmit], vortex_transmit |
633 | mov [device.transmit], vortex_transmit |
634 | DEBUGF 1,"Device is a vortex type\n" |
634 | DEBUGF 2,"Device is a vortex type\n" |
635 | DEBUGF 1,"I'm sorry but vortex code hasnt been tested yet\n" |
635 | DEBUGF 2,"I'm sorry but vortex code hasnt been tested yet\n" |
636 | DEBUGF 1,"Please contact me on hidnplayr@kolibrios.org\n" |
636 | DEBUGF 2,"Please contact me on hidnplayr@kolibrios.org\n" |
637 | DEBUGF 1,"If you can help me finish it!\n" |
637 | DEBUGF 2,"If you can help me finish it!\n" |
638 | or eax, -1 |
638 | or eax, -1 |
639 | ret |
639 | ret |
640 | jmp @f |
640 | jmp @f |
641 | .boomerang_func: ; full bus master, so use boomerang functions |
641 | .boomerang_func: ; full bus master, so use boomerang functions |
642 | mov [device.transmit], boomerang_transmit |
642 | mov [device.transmit], boomerang_transmit |
Line 692... | Line 692... | ||
692 | 692 | ||
693 | .reg_int: |
693 | .reg_int: |
694 | stdcall AttachIntHandler, eax, esi, dword 0 |
694 | stdcall AttachIntHandler, eax, esi, dword 0 |
695 | test eax, eax |
695 | test eax, eax |
696 | jnz @f |
696 | jnz @f |
697 | DEBUGF 1,"\nCould not attach int handler!\n" |
697 | DEBUGF 2,"Could not attach int handler!\n" |
698 | ; or eax, -1 |
698 | ; or eax, -1 |
699 | ; ret |
699 | ; ret |
Line 700... | Line 700... | ||
700 | @@: |
700 | @@: |
Line 802... | Line 802... | ||
802 | call Sleep ; 100 ms |
802 | call Sleep ; 100 ms |
803 | in ax, dx |
803 | in ax, dx |
804 | test ah, 1000b ; linkDetect |
804 | test ah, 1000b ; linkDetect |
805 | jnz @f |
805 | jnz @f |
806 | loop .link_detect_loop |
806 | loop .link_detect_loop |
807 | DEBUGF 1,"Link detect timed-out!\n" |
807 | DEBUGF 2,"Link detect timed-out!\n" |
808 | @@: |
808 | @@: |
Line 809... | Line 809... | ||
809 | 809 | ||
810 | ; print link type |
810 | ; print link type |
811 | xor eax, eax |
811 | xor eax, eax |
Line 887... | Line 887... | ||
887 | ; Function |
887 | ; Function |
888 | ; global_reset |
888 | ; global_reset |
889 | ; Description |
889 | ; Description |
890 | ; resets the device |
890 | ; resets the device |
891 | ; Parameters: |
891 | ; Parameters: |
892 | ; ebp - io_addr |
892 | ; |
893 | ; Return value: |
893 | ; Return value: |
894 | ; Destroyed registers |
894 | ; Destroyed registers |
895 | ; ax, ecx, edx, esi |
895 | ; ax, ecx, edx, esi |
896 | ; |
896 | ; |
897 | ;***************************************************************************1 |
897 | ;***************************************************************************1 |
Line 1241... | Line 1241... | ||
1241 | mov al , 1 |
1241 | mov al , 1 |
1242 | ret |
1242 | ret |
Line 1243... | Line 1243... | ||
1243 | 1243 | ||
1244 | 1244 | ||
1245 | .fail1: |
1245 | .fail1: |
1246 | DEBUGF 1,"reset failed!\n" |
1246 | DEBUGF 2,"reset failed!\n" |
1247 | pop eax |
1247 | pop eax |
Line 1248... | Line 1248... | ||
1248 | xor al, al |
1248 | xor al, al |
1249 | ret |
1249 | ret |
1250 | 1250 | ||
1251 | .fail2: |
1251 | .fail2: |
1252 | DEBUGF 1,"This device is not auto-negotiation capable!\n" |
1252 | DEBUGF 2,"This device is not auto-negotiation capable!\n" |
Line 1253... | Line 1253... | ||
1253 | pop eax |
1253 | pop eax |
1254 | xor al, al |
1254 | xor al, al |
1255 | ret |
1255 | ret |
1256 | 1256 | ||
1257 | .fail3: |
1257 | .fail3: |
Line 1269... | Line 1269... | ||
1269 | ; try_MII checks the on-chip auto-negotiation logic |
1269 | ; try_MII checks the on-chip auto-negotiation logic |
1270 | ; or an off-chip MII PHY, depending upon what is set in |
1270 | ; or an off-chip MII PHY, depending upon what is set in |
1271 | ; xcvrSelect by the caller. |
1271 | ; xcvrSelect by the caller. |
1272 | ; It exits when it finds the first device with a good link. |
1272 | ; It exits when it finds the first device with a good link. |
1273 | ; Parameters |
1273 | ; Parameters |
1274 | ; ebp - io_addr |
1274 | ; |
1275 | ; Return value |
1275 | ; Return value |
1276 | ; al - 0 |
1276 | ; al - 0 |
1277 | ; al - 1 |
1277 | ; al - 1 |
1278 | ; Destroyed registers |
1278 | ; Destroyed registers |
1279 | ; eax, ebx, ecx, edx, esi |
1279 | ; eax, ebx, ecx, edx, esi |
Line 1481... | Line 1481... | ||
1481 | ; Description |
1481 | ; Description |
1482 | ; tries a loopback packet for 10BASE2 or AUI port |
1482 | ; tries a loopback packet for 10BASE2 or AUI port |
1483 | ; Parameters |
1483 | ; Parameters |
1484 | ; al - 0: 10Mbps AUI connector |
1484 | ; al - 0: 10Mbps AUI connector |
1485 | ; 1: 10BASE-2 |
1485 | ; 1: 10BASE-2 |
1486 | ; ebp - io_addr |
1486 | ; |
1487 | ; Return value |
1487 | ; Return value |
1488 | ; al - 0 |
1488 | ; al - 0 |
1489 | ; al - 1 |
1489 | ; al - 1 |
1490 | ; Destroyed registers |
1490 | ; Destroyed registers |
1491 | ; eax, ebx, ecx, edx, edi, esi |
1491 | ; eax, ebx, ecx, edx, edi, esi |
Line 1993... | Line 1993... | ||
1993 | ; Function |
1993 | ; Function |
1994 | ; mdio_sync |
1994 | ; mdio_sync |
1995 | ; Description |
1995 | ; Description |
1996 | ; initial synchronization |
1996 | ; initial synchronization |
1997 | ; Parameters |
1997 | ; Parameters |
1998 | ; ebp - io_addr |
1998 | ; |
1999 | ; Return value |
1999 | ; Return value |
2000 | ; Destroyed registers |
2000 | ; Destroyed registers |
2001 | ; ax, edx, cl |
2001 | ; ax, edx, cl |
2002 | ; |
2002 | ; |
2003 | ;*************************************************************************** |
2003 | ;*************************************************************************** |
Line 2161... | Line 2161... | ||
2161 | ; Checks TxStatus queue. |
2161 | ; Checks TxStatus queue. |
2162 | ; Return value |
2162 | ; Return value |
2163 | ; al - 0 no error was found |
2163 | ; al - 0 no error was found |
2164 | ; al - 1 error was found TxReset was needed |
2164 | ; al - 1 error was found TxReset was needed |
2165 | ; Destroyed registers |
2165 | ; Destroyed registers |
2166 | ; eax, ecx, edx, ebp |
2166 | ; eax, ecx, edx |
2167 | ; |
2167 | ; |
2168 | ;*************************************************************************** |
2168 | ;*************************************************************************** |
Line 2169... | Line 2169... | ||
2169 | 2169 | ||
2170 | align 4 |
2170 | align 4 |
Line 2485... | Line 2485... | ||
2485 | align 4 |
2485 | align 4 |
2486 | int_vortex: |
2486 | int_vortex: |
Line 2487... | Line 2487... | ||
2487 | 2487 | ||
Line 2488... | Line 2488... | ||
2488 | push ebx esi edi |
2488 | push ebx esi edi |
Line 2489... | Line 2489... | ||
2489 | 2489 | ||
Line 2490... | Line 2490... | ||
2490 | DEBUGF 1,"\n%s int\n", my_service |
2490 | DEBUGF 1,"INT\n" |
2491 | 2491 | ||
Line 2658... | Line 2658... | ||
2658 | align 4 |
2658 | align 4 |
2659 | int_boomerang: |
2659 | int_boomerang: |
Line 2660... | Line 2660... | ||
2660 | 2660 | ||
Line 2661... | Line 2661... | ||
2661 | push ebx esi edi |
2661 | push ebx esi edi |
Line 2662... | Line 2662... | ||
2662 | 2662 | ||
Line 2663... | Line 2663... | ||
2663 | DEBUGF 1,"\n%s int\n", my_service |
2663 | DEBUGF 1,"INT\n" |
2664 | 2664 |