return -ENOMEM;
/* Allocate the transfer descriptors for the pipe. */
- tdr = pci_alloc_consistent(ipc_protocol->pcie->pci,
- pipe->nr_of_entries * sizeof(*tdr),
- &pipe->phy_tdr_start);
+ tdr = dma_alloc_coherent(&ipc_protocol->pcie->pci->dev,
+ pipe->nr_of_entries * sizeof(*tdr),
+ &pipe->phy_tdr_start, GFP_ATOMIC);
if (!tdr) {
kfree(skbr);
dev_err(ipc_protocol->dev, "tdr alloc error");
/* Free and reset the td and skbuf circular buffers. kfree is save! */
if (pipe->tdr_start) {
- pci_free_consistent(ipc_protocol->pcie->pci,
- sizeof(*pipe->tdr_start) *
- pipe->nr_of_entries,
- pipe->tdr_start, pipe->phy_tdr_start);
+ dma_free_coherent(&ipc_protocol->pcie->pci->dev,
+ sizeof(*pipe->tdr_start) * pipe->nr_of_entries,
+ pipe->tdr_start, pipe->phy_tdr_start);
pipe->tdr_start = NULL;
}