Rev 3205 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3205 | Rev 3346 | ||
---|---|---|---|
Line 326... | Line 326... | ||
326 | movzx ecx, byte[eax+1] |
326 | movzx ecx, byte[eax+1] |
327 | mov [device.pci_bus], ecx |
327 | mov [device.pci_bus], ecx |
328 | movzx ecx, byte[eax+2] |
328 | movzx ecx, byte[eax+2] |
329 | mov [device.pci_dev], ecx |
329 | mov [device.pci_dev], ecx |
330 | ; 4j. Fill in the direct call addresses into the struct. |
330 | ; 4j. Fill in the direct call addresses into the struct. |
331 | ; Note that get_MAC pointer is filled in initialization by probe. |
- | |
332 | mov [device.reset], reset |
331 | mov [device.reset], reset |
333 | mov [device.transmit], transmit |
332 | mov [device.transmit], transmit |
334 | mov [device.set_MAC], write_mac |
- | |
335 | mov [device.unload], unload |
333 | mov [device.unload], unload |
336 | mov [device.name], my_service |
334 | mov [device.name], my_service |
Line 337... | Line 335... | ||
337 | 335 | ||
338 | ; 4k. Now, it's time to find the base io addres of the PCI device |
336 | ; 4k. Now, it's time to find the base io addres of the PCI device |
Line 437... | Line 435... | ||
437 | je .ok |
435 | je .ok |
438 | add esi, 12 ; Advance to next entry |
436 | add esi, 12 ; Advance to next entry |
439 | jmp .tableloop |
437 | jmp .tableloop |
Line 440... | Line 438... | ||
440 | 438 | ||
441 | .ok: |
- | |
442 | mov eax, [esi + 4] ; Get pointer to "get MAC" function |
- | |
Line 443... | Line 439... | ||
443 | mov [device.get_MAC], eax |
439 | .ok: |
Line 444... | Line 440... | ||
444 | 440 | ||
445 | call [device.get_MAC] |
441 | call dword[esi + 4] ; "get MAC" function |
446 | 442 | ||
447 | ; Set table entries |
443 | ; Set table entries |
Line 660... | Line 656... | ||
660 | set_io ier ; Interrupt enable |
656 | set_io ier ; Interrupt enable |
661 | mov eax, 1 |
657 | mov eax, 1 |
662 | out dx, eax |
658 | out dx, eax |
Line 663... | Line 659... | ||
663 | 659 | ||
664 | mov [device.mtu], 1514 |
- | |
Line -... | Line 660... | ||
- | 660 | mov [device.mtu], 1514 |
|
- | 661 | ||
- | 662 | ; Set link state to unknown |
|
- | 663 | mov [device.state], ETH_LINK_UNKOWN |
|
665 | xor eax, eax |
664 | |
Line 666... | Line 665... | ||
666 | 665 | xor eax, eax |
|
667 | ret |
666 | ret |
668 | 667 |