Subversion Repositories Kolibri OS

Rev

Rev 3545 | Rev 3856 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3545 Rev 3619
Line 208... Line 208...
208
;------------------------------------------------------
208
;------------------------------------------------------
209
  @@:                  ;---------
209
  @@:                  ;---------
210
        cmp     eax, 1 ;SRV_HOOK
210
        cmp     eax, 1 ;SRV_HOOK
211
        jne     @F     ;---------
211
        jne     @F     ;---------
Line 212... Line 212...
212
 
212
 
Line 213... Line 213...
213
        DEBUGF  2,"Checking if device is already listed..\n"
213
        DEBUGF  1,"Checking if device is already listed..\n"
Line 214... Line 214...
214
 
214
 
215
        mov     eax, [IOCTL.input]
215
        mov     eax, [IOCTL.input]
Line 654... Line 654...
654
; Set link state to unknown
654
; Set link state to unknown
655
        mov     [device.state], ETH_LINK_UNKOWN
655
        mov     [device.state], ETH_LINK_UNKOWN
Line 656... Line 656...
656
 
656
 
657
; Indicate that we have successfully reset the card
657
; Indicate that we have successfully reset the card
658
        xor     eax, eax
658
        xor     eax, eax
Line 659... Line 659...
659
        DEBUGF  2,"Done!\n"
659
        DEBUGF  1,"Done!\n"
Line 671... Line 671...
671
align 4
671
align 4
672
transmit:
672
transmit:
Line 673... Line 673...
673
 
673
 
674
        mov     esi, [esp + 4]
674
        mov     esi, [esp + 4]
675
        mov     ecx, [esp + 8]
675
        mov     ecx, [esp + 8]
676
        DEBUGF  2,"Transmitting packet, buffer:%x, size:%u\n",esi, ecx
676
        DEBUGF  1,"Transmitting packet, buffer:%x, size:%u\n",esi, ecx
677
        DEBUGF  2,"To: %x-%x-%x-%x-%x-%x From: %x-%x-%x-%x-%x-%x Type:%x%x\n",\
677
        DEBUGF  1,"To: %x-%x-%x-%x-%x-%x From: %x-%x-%x-%x-%x-%x Type:%x%x\n",\
Line 678... Line 678...
678
        [esi+0]:2,[esi+1]:2,[esi+2]:2,[esi+3]:2,[esi+4]:2,[esi+5]:2,[esi+6]:2,[esi+7]:2,[esi+8]:2,[esi+9]:2,[esi+10]:2,[esi+11]:2,[esi+13]:2,[esi+12]:2
678
        [esi+0]:2,[esi+1]:2,[esi+2]:2,[esi+3]:2,[esi+4]:2,[esi+5]:2,[esi+6]:2,[esi+7]:2,[esi+8]:2,[esi+9]:2,[esi+10]:2,[esi+11]:2,[esi+13]:2,[esi+12]:2
679
 
679
 
680
        cmp     ecx, ETH_FRAME_LEN
680
        cmp     ecx, ETH_FRAME_LEN
Line 707... Line 707...
707
 
707
 
708
        set_io  P0_COMMAND
708
        set_io  P0_COMMAND
709
        mov     al, CMD_PS0 + CMD_TXP + CMD_RD2 + CMD_STA
709
        mov     al, CMD_PS0 + CMD_TXP + CMD_RD2 + CMD_STA
Line 710... Line 710...
710
        out     dx, al
710
        out     dx, al
Line 711... Line 711...
711
 
711
 
712
        DEBUGF  2," - Packet Sent!\n"
712
        DEBUGF  1,"Packet Sent!\n"
Line 713... Line 713...
713
 
713
 
Line 720... Line 720...
720
        stdcall KernelFree, [esp+4]
720
        stdcall KernelFree, [esp+4]
721
        xor     eax, eax
721
        xor     eax, eax
722
        ret     8
722
        ret     8
Line 723... Line 723...
723
 
723
 
724
.err:
724
  .err:
Line 725... Line 725...
725
        DEBUGF  2," - Error!\n"
725
        DEBUGF  2,"Transmit error!\n"
726
 
726
 
727
        or      eax, -1
727
        or      eax, -1
Line 858... Line 858...
858
        cmp     ecx, ETH_FRAME_LEN
858
        cmp     ecx, ETH_FRAME_LEN
859
        ja      .fail_3
859
        ja      .fail_3
Line 860... Line 860...
860
 
860
 
Line 861... Line 861...
861
; update stats
861
; update stats
Line 862... Line 862...
862
 
862
 
863
        DEBUGF  2,"Received %u bytes\n", ecx
863
        DEBUGF  1,"Received %u bytes\n", ecx
864
 
864
 
Line 877... Line 877...
877
        mov     ah, [device.memsize]
877
        mov     ah, [device.memsize]
878
        sub     eax, esi
878
        sub     eax, esi
879
        cmp     ecx, eax                ; eax = number of bytes till end of buffer, ecx = bytes we need to read
879
        cmp     ecx, eax                ; eax = number of bytes till end of buffer, ecx = bytes we need to read
880
        jbe     .no_wrap
880
        jbe     .no_wrap
Line 881... Line -...
881
 
-
 
882
        DEBUGF  2,"WRAP!\n"
-
 
883
 
881
 
Line 884... Line 882...
884
; Read first part
882
; Read first part
885
 
883
 
886
        sub     ecx, eax
884
        sub     ecx, eax
Line 927... Line 925...
927
  .fail_2:
925
  .fail_2:
Line 928... Line 926...
928
 
926
 
929
 
927
 
930
  .no_rx:
928
  .no_rx:
Line 931... Line 929...
931
        pop     ebx
929
        pop     ebx
932
        DEBUGF  2,"done\n"
930
        DEBUGF  1,"done\n"
933
 
931
 
934
        set_io  0
932
        set_io  0