Changeset 792807f in mainline for uspace/lib/nic/src/nic_driver.c


Ignore:
Timestamp:
2011-12-16T21:16:23Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8708be3b, 9fe4db3
Parents:
9916841 (diff), c4be33a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

the Intel E1000 is now working and usable on ia32
(other platforms untested so far)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nic/src/nic_driver.c

    r9916841 r792807f  
    4646#include <ipc/irc.h>
    4747#include <sysinfo.h>
    48 
     48#include <as.h>
    4949#include <devman.h>
    5050#include <ddf/interrupt.h>
     
    13341334 * @return physical address of packet
    13351335 */
    1336 void *nic_dma_lock_packet(packet_t *packet)
    1337 {
    1338         void *phys_addr;
    1339         int rc = dmamem_lock(packet, &phys_addr, 1);
    1340         if (rc != EOK)
    1341                 return NULL;
    1342        
    1343         return phys_addr;
     1336int nic_dma_lock_packet(packet_t *packet, size_t size, void **phys)
     1337{
     1338        return dmamem_map(packet, SIZE2PAGES(size), 0, 0, phys);
    13441339}
    13451340
     
    13481343 * @param packet
    13491344 */
    1350 int nic_dma_unlock_packet(packet_t *packet)
    1351 {
    1352         return dmamem_unlock(packet, 1);
     1345int nic_dma_unlock_packet(packet_t *packet, size_t size)
     1346{
     1347        return dmamem_unmap(packet, size, 0);
    13531348}
    13541349
Note: See TracChangeset for help on using the changeset viewer.