Subversion Repositories Kolibri OS

Rev

Rev 10054 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10054 Rev 10065
Line 428... Line 428...
428
  .nextdevice:
428
  .nextdevice:
429
        mov     ebx, [esi]
429
        mov     ebx, [esi]
430
        cmp     al, byte[ebx + device.pci_bus]
430
        cmp     al, byte[ebx + device.pci_bus]
431
        jne     @f
431
        jne     @f
432
        cmp     ah, byte[ebx + device.pci_dev]
432
        cmp     ah, byte[ebx + device.pci_dev]
433
        je      .find_devicenum                         ; Device is already loaded, let's find it's device number
433
        je      .find_devicenum                         ; Device is already loaded, let's find its device number
434
       @@:
434
       @@:
435
        add     esi, 4
435
        add     esi, 4
436
        loop    .nextdevice
436
        loop    .nextdevice
Line 437... Line 437...
437
 
437
 
438
; This device doesn't have its own eth_device structure yet, lets create one
438
; This device doesn't have its own eth_device structure yet, let's create one
439
  .firstdevice:
439
  .firstdevice:
440
        cmp     [devices], MAX_DEVICES                  ; First check if the driver can handle one more card
440
        cmp     [devices], MAX_DEVICES                  ; First check if the driver can handle one more card
Line 441... Line 441...
441
        jae     .fail
441
        jae     .fail
Line 455... Line 455...
455
        movzx   ecx, byte[eax+1]
455
        movzx   ecx, byte[eax+1]
456
        mov     [ebx + device.pci_bus], ecx
456
        mov     [ebx + device.pci_bus], ecx
457
        movzx   ecx, byte[eax+2]
457
        movzx   ecx, byte[eax+2]
458
        mov     [ebx + device.pci_dev], ecx
458
        mov     [ebx + device.pci_dev], ecx
Line 459... Line 459...
459
 
459
 
Line 460... Line 460...
460
; Now, it's time to find the base io addres of the PCI device
460
; Now, it's time to find the base io address of the PCI device
461
 
461
 
Line 462... Line 462...
462
        stdcall PCI_find_io, [ebx + device.pci_bus], [ebx + device.pci_dev]
462
        stdcall PCI_find_io, [ebx + device.pci_bus], [ebx + device.pci_dev]
Line 691... Line 691...
691
 
691
 
Line 692... Line 692...
692
        loopz   .rsloop
692
        loopz   .rsloop
693
 
693
 
694
        DEBUGF 1,"Waiting for NIC to boot..\n"
694
        DEBUGF 1,"Waiting for NIC to boot..\n"
695
; wait for 2 seconds for NIC to boot
695
; wait for 2 seconds for NIC to boot
Line 696... Line 696...
696
        mov     esi, 2000               ; WTF? FIXME
696
        mov     esi, 2000               ; Hack!? FIXME
Line 2388... Line 2388...
2388
 
2388
 
2389
; switch to register window 2
2389
; switch to register window 2
2390
        mov     ax, SELECT_REGISTER_WINDOW+2
2390
        mov     ax, SELECT_REGISTER_WINDOW+2
Line 2391... Line 2391...
2391
        out     dx, ax
2391
        out     dx, ax
2392
 
2392
 
2393
; write MAC addres back into the station address registers
2393
; write MAC address back into the station address registers
2394
        set_io  [ebx + device.io_addr], REG_STATION_ADDRESS_LO
2394
        set_io  [ebx + device.io_addr], REG_STATION_ADDRESS_LO
2395
        lea     esi, [ebx + device.mac]
2395
        lea     esi, [ebx + device.mac]
2396
        outsw
2396
        outsw