Subversion Repositories Kolibri OS

Rev

Rev 3155 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3155 Rev 3205
Line 274... Line 274...
274
 
274
 
275
        .tx_desc        rb NUM_TX_DESC*mtd_desc.size
275
        .tx_desc        rb NUM_TX_DESC*mtd_desc.size
Line 276... Line 276...
276
        .rx_desc        rb NUM_RX_DESC*mtd_desc.size
276
        .rx_desc        rb NUM_RX_DESC*mtd_desc.size
277
 
277
 
278
        .io_addr        dd ?
278
        .io_addr        dd ?
279
        .pci_bus        db ?
279
        .pci_bus        dd ?
280
        .pci_dev        db ?
280
        .pci_dev        dd ?
Line 281... Line 281...
281
        .irq_line       db ?
281
        .irq_line       db ?
Line 384... Line 384...
384
 
384
 
385
;        mov     eax, [IOCTL.input]                     ; get the pci bus and device numbers
385
;        mov     eax, [IOCTL.input]                     ; get the pci bus and device numbers
386
        mov     ax , [eax+1]                            ;
386
        mov     ax , [eax+1]                            ;
387
  .nextdevice:
387
  .nextdevice:
388
        mov     ebx, [esi]
388
        mov     ebx, [esi]
-
 
389
        cmp     al, byte[device.pci_bus]
-
 
390
        jne     @f
389
        cmp     ax , word [device.pci_bus]              ; compare with pci and device num in device list (notice the usage of word instead of byte)
391
        cmp     ah, byte[device.pci_dev]
-
 
392
        je      .find_devicenum                         ; Device is already loaded, let's find it's device number
390
        je      .find_devicenum                         ; Device is already loaded, let's find it's device number
393
       @@:
391
        add     esi, 4
394
        add     esi, 4
Line 392... Line 395...
392
        loop    .nextdevice
395
        loop    .nextdevice
Line 409... Line 412...
409
        mov     [device.name], my_service
412
        mov     [device.name], my_service
Line 410... Line 413...
410
 
413
 
Line 411... Line 414...
411
; save the pci bus and device numbers
414
; save the pci bus and device numbers
412
 
415
 
413
        mov     eax, [IOCTL.input]
416
        mov     eax, [IOCTL.input]
414
        mov     cl , [eax+1]
417
        movzx   ecx, byte[eax+1]
415
        mov     [device.pci_bus], cl
418
        mov     [device.pci_bus], ecx
Line 416... Line 419...
416
        mov     cl , [eax+2]
419
        movzx   ecx, byte[eax+2]
Line 417... Line 420...
417
        mov     [device.pci_dev], cl
420
        mov     [device.pci_dev], ecx
Line 418... Line 421...
418
 
421
 
Line 419... Line 422...
419
; Now, it's time to find the base io addres of the PCI device
422
; Now, it's time to find the base io addres of the PCI device
Line 420... Line 423...
420
 
423
 
421
        find_io [device.pci_bus], [device.pci_dev], [device.io_addr]
424
        PCI_find_io
Line 422... Line 425...
422
 
425
 
Line 511... Line 514...
511
align 4
514
align 4
512
probe:
515
probe:
Line 513... Line 516...
513
 
516
 
Line 514... Line 517...
514
        DEBUGF  2,"Probing mtd80x device\n"
517
        DEBUGF  2,"Probing mtd80x device\n"
Line 515... Line -...
515
 
-
 
516
        make_bus_master [device.pci_bus], [device.pci_dev]
-
 
517
 
518
 
Line 518... Line 519...
518
        movzx   eax, [device.pci_bus]
519
        PCI_make_bus_master
519
        movzx   ecx, [device.pci_dev]
520
 
520
        stdcall PciRead32, eax ,ecx ,0
521
        stdcall PciRead32, [device.pci_bus], [device.pci_dev], 0
521
 
522