Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3155 → Rev 3205

/kernel/branches/net/drivers/RTL8169.asm
253,8 → 253,8
ETH_DEVICE
 
.io_addr dd ?
.pci_bus db ?
.pci_dev db ?
.pci_bus dd ?
.pci_dev dd ?
.irq_line db ?
 
rb 256-(($ - device) and 255) ; align 256
442,8 → 442,11
mov ax , [eax+1] ;
.nextdevice:
mov ebx, [esi]
cmp ax , word [device.pci_bus] ; compare with pci and device num in device list (notice the usage of word instead of byte)
cmp al, byte[device.pci_bus]
jne @f
cmp ah, byte[device.pci_dev]
je .find_devicenum ; Device is already loaded, let's find it's device number
@@:
add esi, 4
loop .nextdevice
 
467,20 → 470,19
; save the pci bus and device numbers
 
mov eax, [IOCTL.input]
mov cl , [eax+1]
mov [device.pci_bus], cl
mov cl , [eax+2]
mov [device.pci_dev], cl
movzx ecx, byte[eax+1]
mov [device.pci_bus], ecx
movzx ecx, byte[eax+2]
mov [device.pci_dev], ecx
 
; Now, it's time to find the base io addres of the PCI device
 
find_io [device.pci_bus], [device.pci_dev], [device.io_addr]
mov eax, [device.io_addr]
mov [tpc.mmio_addr], eax
PCI_find_io
mov [tpc.mmio_addr], eax ; CHECKME
 
; We've found the io address, find IRQ now
 
find_irq [device.pci_bus], [device.pci_dev], [device.irq_line]
PCI_find_irq
 
DEBUGF 2,"Hooking into device, dev:%x, bus:%x, irq:%x, addr:%x\n",\
[device.pci_dev]:1,[device.pci_bus]:1,[device.irq_line]:1,[device.io_addr]:8
542,7 → 544,7
 
DEBUGF 1,"init_board\n"
 
make_bus_master [device.pci_bus], [device.pci_dev]
PCI_make_bus_master
 
; Soft reset the chip
set_io 0