Changeset b39eb79 in mainline for uspace/lib/nic/src/nic_driver.c
- Timestamp:
- 2011-12-26T17:21:21Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9b56a8dd
- Parents:
- cf5c05c0 (diff), 7e1b130 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/nic/src/nic_driver.c
rcf5c05c0 rb39eb79 46 46 #include <ipc/irc.h> 47 47 #include <sysinfo.h> 48 48 #include <as.h> 49 49 #include <devman.h> 50 50 #include <ddf/interrupt.h> … … 1329 1329 } 1330 1330 1331 // FIXME: Later1332 #if 01333 1334 1331 /** Lock packet for DMA usage 1335 1332 * … … 1337 1334 * @return physical address of packet 1338 1335 */ 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; 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); 1349 1339 } 1350 1340 … … 1353 1343 * @param packet 1354 1344 */ 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 1345 int nic_dma_unlock_packet(packet_t *packet, size_t size) 1346 { 1347 return dmamem_unmap(packet, size); 1348 } 1366 1349 1367 1350 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.