Ignore:
File:
1 edited

Legend:

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

    rc6ae4c2 r49bd793b  
    4646#include <ipc/irc.h>
    4747#include <sysinfo.h>
    48 #include <as.h>
     48
    4949#include <devman.h>
    5050#include <ddf/interrupt.h>
     
    13291329}
    13301330
     1331// FIXME: Later
     1332#if 0
     1333
    13311334/** Lock packet for DMA usage
    13321335 *
     
    13341337 * @return physical address of packet
    13351338 */
    1336 int nic_dma_lock_packet(packet_t *packet, size_t size, void **phys)
    1337 {
    1338         return dmamem_map(packet, SIZE2PAGES(size), 0, 0, phys);
     1339void *nic_dma_lock_packet(packet_t *packet)
     1340{
     1341        void *phys_addr;
     1342        size_t locked;
     1343        int rc = dma_lock(packet, &phys_addr, 1, &locked);
     1344        if (rc != EOK)
     1345                return NULL;
     1346       
     1347        assert(locked == 1);
     1348        return phys_addr;
    13391349}
    13401350
     
    13431353 * @param packet
    13441354 */
    1345 int nic_dma_unlock_packet(packet_t *packet, size_t size)
    1346 {
    1347         return dmamem_unmap(packet, size, 0);
    1348 }
     1355void nic_dma_unlock_packet(packet_t *packet)
     1356{
     1357        size_t unlocked;
     1358        int rc = dma_unlock(packet, 1, &unlocked);
     1359        if (rc != EOK)
     1360                return;
     1361       
     1362        assert(unlocked == 1);
     1363}
     1364
     1365#endif
    13491366
    13501367/** @}
Note: See TracChangeset for help on using the changeset viewer.