Changes in uspace/lib/nic/src/nic_driver.c [c6ae4c2:49bd793b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/nic/src/nic_driver.c
rc6ae4c2 r49bd793b 46 46 #include <ipc/irc.h> 47 47 #include <sysinfo.h> 48 #include <as.h> 48 49 49 #include <devman.h> 50 50 #include <ddf/interrupt.h> … … 1329 1329 } 1330 1330 1331 // FIXME: Later 1332 #if 0 1333 1331 1334 /** Lock packet for DMA usage 1332 1335 * … … 1334 1337 * @return physical address of packet 1335 1338 */ 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); 1339 void *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; 1339 1349 } 1340 1350 … … 1343 1353 * @param packet 1344 1354 */ 1345 int nic_dma_unlock_packet(packet_t *packet, size_t size) 1346 { 1347 return dmamem_unmap(packet, size, 0); 1348 } 1355 void 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 1349 1366 1350 1367 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.