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 190... Line 190...
190
        .phy_mode       dw ?
190
        .phy_mode       dw ?
191
        .mcr0           dw ?
191
        .mcr0           dw ?
192
        .mcr1           dw ?
192
        .mcr1           dw ?
193
        .switch_sig     dw ?
193
        .switch_sig     dw ?
Line 194... Line 194...
194
 
194
 
195
        .pci_bus        db ?
195
        .pci_bus        dd ?
196
        .pci_dev        db ?
196
        .pci_dev        dd ?
Line 197... Line 197...
197
        .irq_line       db ?
197
        .irq_line       db ?
Line 198... Line 198...
198
 
198
 
199
        rb 1            ; dword alignment
199
        rb 3            ; dword alignment
Line 200... Line 200...
200
 
200
 
Line 283... Line 283...
283
 
283
 
284
;        mov     eax, [IOCTL.input]                      ; get the pci bus and device numbers
284
;        mov     eax, [IOCTL.input]                      ; get the pci bus and device numbers
285
        mov     ax , [eax+1]                            ;
285
        mov     ax , [eax+1]                            ;
286
  .nextdevice:
286
  .nextdevice:
287
        mov     ebx, [esi]
287
        mov     ebx, [esi]
-
 
288
        cmp     al, byte[device.pci_bus]
-
 
289
        jne     @f
288
        cmp     ax , word [device.pci_bus]              ; compare with pci and device num in device list (notice the usage of word instead of byte)
290
        cmp     ah, byte[device.pci_dev]
-
 
291
        je      .find_devicenum                         ; Device is already loaded, let's find it's device number
289
        je      .find_devicenum                         ; Device is already loaded, let's find it's device number
292
       @@:
290
        add     esi, 4
293
        add     esi, 4
Line 291... Line 294...
291
        loop    .nextdevice
294
        loop    .nextdevice
Line 308... Line 311...
308
        mov     [device.name], my_service
311
        mov     [device.name], my_service
Line 309... Line 312...
309
 
312
 
Line 310... Line 313...
310
; save the pci bus and device numbers
313
; save the pci bus and device numbers
311
 
314
 
312
        mov     eax, [IOCTL.input]
315
        mov     eax, [IOCTL.input]
313
        mov     cl , [eax+1]
316
        movzx   ecx, byte[eax+1]
314
        mov     [device.pci_bus], cl
317
        mov     [device.pci_bus], ecx
Line 315... Line 318...
315
        mov     cl , [eax+2]
318
        movzx   ecx, byte[eax+2]
Line 316... Line 319...
316
        mov     [device.pci_dev], cl
319
        mov     [device.pci_dev], ecx
Line 317... Line 320...
317
 
320
 
Line 318... Line 321...
318
; Now, it's time to find the base io addres of the PCI device
321
; Now, it's time to find the base io addres of the PCI device
Line 319... Line 322...
319
 
322
 
320
        find_io [device.pci_bus], [device.pci_dev], [device.io_addr]
323
        PCI_find_io
Line 321... Line 324...
321
 
324
 
Line 414... Line 417...
414
 
417
 
415
align 4
418
align 4
416
probe:
419
probe:
Line 417... Line 420...
417
        DEBUGF  2,"Probing R6040 device\n"
420
        DEBUGF  2,"Probing R6040 device\n"
Line 418... Line 421...
418
 
421
 
419
        make_bus_master [device.pci_bus], [device.pci_dev]
422
        PCI_make_bus_master
Line 420... Line 423...
420
 
423