MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dpaa2_dpdmai_dev_uninit

Function dpaa2_dpdmai_dev_uninit

dpdk/drivers/dma/dpaa2/dpaa2_qdma.c:1480–1507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1478};
1479
1480static int
1481dpaa2_dpdmai_dev_uninit(struct rte_dma_dev *dev)
1482{
1483 struct dpaa2_dpdmai_dev *dpdmai_dev = dev->data->dev_private;
1484 int ret;
1485
1486 DPAA2_QDMA_FUNC_TRACE();
1487
1488 ret = dpdmai_disable(&dpdmai_dev->dpdmai, CMD_PRI_LOW,
1489 dpdmai_dev->token);
1490 if (ret)
1491 DPAA2_QDMA_ERR("dmdmai disable failed");
1492
1493 /* Set up the DQRR storage for Rx */
1494 struct dpaa2_queue *rxq = &(dpdmai_dev->rx_queue[0]);
1495
1496 if (rxq->q_storage) {
1497 dpaa2_free_dq_storage(rxq->q_storage);
1498 rte_free(rxq->q_storage);
1499 }
1500
1501 /* Close the device at underlying layer*/
1502 ret = dpdmai_close(&dpdmai_dev->dpdmai, CMD_PRI_LOW, dpdmai_dev->token);
1503 if (ret)
1504 DPAA2_QDMA_ERR("Failure closing dpdmai device");
1505
1506 return 0;
1507}
1508
1509static int
1510dpaa2_dpdmai_dev_init(struct rte_dma_dev *dev, int dpdmai_id)

Callers 2

dpaa2_dpdmai_dev_initFunction · 0.85
dpaa2_qdma_removeFunction · 0.85

Calls 4

dpdmai_disableFunction · 0.85
dpaa2_free_dq_storageFunction · 0.85
rte_freeFunction · 0.85
dpdmai_closeFunction · 0.85

Tested by

no test coverage detected