forked from KolibriOS/kolibrios
* UDP data length includes sizeof UDP header
* fixes in RTL8139 driver * fixes in RTL8029 driver (works in Bochs, still problems in qemu) git-svn-id: svn://kolibrios.org@1173 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
26d83dcf4a
commit
65fa263646
@ -149,7 +149,7 @@ public version
|
||||
ISR_RDC equ 0x40 ; Remote DMA complete
|
||||
ISR_RST equ 0x80 ; reset
|
||||
|
||||
IRQ_MASK equ ISR_PRX + ISR_PTX + ISR_TXE
|
||||
IRQ_MASK equ ISR_PRX ; + ISR_PTX + ISR_TXE
|
||||
|
||||
RSTAT_PRX equ 0x01 ; successful recv
|
||||
RSTAT_CRC equ 0x02 ; CRC error
|
||||
@ -459,7 +459,7 @@ probe:
|
||||
|
||||
DEBUGF 2,"Trying 16-bit mode\n"
|
||||
|
||||
or [ebp + device.flags], FLAG_16BIT
|
||||
or [ebp + device.flags], FLAG_16BIT or FLAG_PIO
|
||||
mov [ebp + device.memsize], MEM_32768
|
||||
mov [ebp + device.tx_start], 64
|
||||
add [ebp + device.rx_start], TXBUF_SIZE + 64
|
||||
@ -707,6 +707,7 @@ nsr_002:
|
||||
call read_mac
|
||||
|
||||
; clear interupt status
|
||||
set_io 0
|
||||
set_io P0_ISR
|
||||
mov al, 0xff
|
||||
out dx, al
|
||||
|
@ -1192,25 +1192,15 @@ read_mac:
|
||||
DEBUGF 1,"Reading MAC: "
|
||||
|
||||
mov edx, [ebx + device.io_addr]
|
||||
|
||||
mov ecx, 2
|
||||
@@:
|
||||
lea eax, [EE_93C46_REG_ETH_ID+ecx]
|
||||
push ecx
|
||||
call read_eeprom
|
||||
pop ecx
|
||||
push ax
|
||||
dec cl
|
||||
jns @r
|
||||
|
||||
DEBUGF 1,"%x-%x-%x-%x-%x-%x\n",[esp+0]:2,[esp+1]:2,[esp+2]:2,[esp+3]:2,[esp+4]:2,[esp+5]:2
|
||||
|
||||
lea edi, [ebx + device.mac]
|
||||
pop eax
|
||||
in eax, edx
|
||||
stosd
|
||||
pop ax
|
||||
add dx, 4
|
||||
in ax, dx
|
||||
stosw
|
||||
|
||||
DEBUGF 1,"%x-%x-%x-%x-%x-%x\n",[edi-6]:2,[edi-5]:2,[edi-4]:2,[edi-3]:2,[edi-2]:2,[edi-1]:2
|
||||
|
||||
ret
|
||||
|
||||
|
||||
|
@ -219,9 +219,9 @@ UDP_create_Packet:
|
||||
cmp edi, -1
|
||||
je .exit
|
||||
|
||||
sub ecx , UDP_Packet.Data
|
||||
mov byte[edi + UDP_Packet.Length], ch
|
||||
mov byte[edi + UDP_Packet.Length+1], cl
|
||||
sub ecx , UDP_Packet.Data
|
||||
|
||||
pop esi
|
||||
push edi
|
||||
|
Loading…
Reference in New Issue
Block a user