Rev 5074 | Rev 5156 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5074 | Rev 5140 | ||
---|---|---|---|
Line 523... | Line 523... | ||
523 | mov dword[esi + REG_ITR], 0 ; Disable interrupt throttling logic |
523 | mov dword[esi + REG_ITR], 0 ; Disable interrupt throttling logic |
Line 524... | Line 524... | ||
524 | 524 | ||
525 | mov dword[esi + REG_PBA], 0x00000004 ; PBA: set the RX buffer size to 4KB (TX buffer is calculated as 64-RX buffer) |
525 | mov dword[esi + REG_PBA], 0x00000004 ; PBA: set the RX buffer size to 4KB (TX buffer is calculated as 64-RX buffer) |
Line 526... | Line 526... | ||
526 | mov dword[esi + REG_RDTR], 0 ; RDTR: set no delay |
526 | mov dword[esi + REG_RDTR], 0 ; RDTR: set no delay |
Line 527... | Line 527... | ||
527 | 527 | ||
528 | mov dword[esi + REG_TXCW], 0x08008060 ; TXCW: set ANE, TxConfigWord (Half/Full duplex, Next Page Reqest) |
528 | mov dword[esi + REG_TXCW], 0x80008060 ; TXCW: set ANE, TxConfigWord (Half/Full duplex, Next Page Reqest) |
529 | 529 | ||
530 | mov eax, [esi + REG_CTRL] |
530 | mov eax, [esi + REG_CTRL] |
Line 736... | Line 736... | ||
736 | inc [ebx + device.packets_tx] |
736 | inc [ebx + device.packets_tx] |
737 | mov eax, [buffersize] |
737 | mov eax, [buffersize] |
738 | add dword[ebx + device.bytes_tx], eax |
738 | add dword[ebx + device.bytes_tx], eax |
739 | adc dword[ebx + device.bytes_tx + 4], 0 |
739 | adc dword[ebx + device.bytes_tx + 4], 0 |
Line -... | Line 740... | ||
- | 740 | ||
- | 741 | call clean_tx |
|
740 | 742 | ||
741 | popf |
743 | popf |
742 | xor eax, eax |
744 | xor eax, eax |
Line 743... | Line 745... | ||
743 | ret |
745 | ret |
- | 746 | ||
- | 747 | .fail: |
|
744 | 748 | call clean_tx |
|
745 | .fail: |
749 | |
746 | DEBUGF 2,"Send failed\n" |
750 | DEBUGF 2,"Send failed\n" |
747 | invoke KernelFree, [bufferptr] |
751 | invoke KernelFree, [bufferptr] |
748 | popf |
752 | popf |
Line 856... | Line 860... | ||
856 | test eax, ICR_TXDW |
860 | test eax, ICR_TXDW |
857 | jz .no_tx |
861 | jz .no_tx |
Line 858... | Line 862... | ||
858 | 862 | ||
Line -... | Line 863... | ||
- | 863 | DEBUGF 1,"Transmit done\n" |
|
- | 864 | ||
- | 865 | ; call clean_tx |
|
- | 866 | ||
- | 867 | .no_tx: |
|
- | 868 | pop edi esi ebx |
|
- | 869 | xor eax, eax |
|
- | 870 | inc eax |
|
- | 871 | ret |
|
- | 872 | ||
- | 873 | ||
- | 874 | ||
859 | DEBUGF 1,"Transmit done\n" |
875 | clean_tx: |
860 | 876 | ||
861 | .txdesc_loop: |
877 | .txdesc_loop: |
862 | mov edi, [ebx + device.last_tx] |
878 | mov edi, [ebx + device.last_tx] |
863 | shl edi, 4 ; edi = edi * sizeof.TDESC |
879 | shl edi, 4 ; edi = edi * sizeof.TDESC |
Line 878... | Line 894... | ||
878 | inc [ebx + device.last_tx] |
894 | inc [ebx + device.last_tx] |
879 | and [ebx + device.last_tx], TX_RING_SIZE-1 |
895 | and [ebx + device.last_tx], TX_RING_SIZE-1 |
880 | jmp .txdesc_loop |
896 | jmp .txdesc_loop |
Line 881... | Line 897... | ||
881 | 897 | ||
882 | .no_tx: |
- | |
883 | pop edi esi ebx |
- | |
884 | xor eax, eax |
- | |
- | 898 | .no_tx: |
|
885 | inc eax |
899 |