Lines Matching refs:scratchpad
1622 /* Set up the scratchpad buffer array and scratchpad buffers, if needed. */
1629 xhci_dbg(xhci, "Allocating %d scratchpad buffers\n", num_sp);
1634 xhci->scratchpad = kzalloc(sizeof(*xhci->scratchpad), flags);
1635 if (!xhci->scratchpad)
1638 xhci->scratchpad->sp_array = dma_alloc_coherent(dev,
1640 &xhci->scratchpad->sp_dma, flags);
1641 if (!xhci->scratchpad->sp_array)
1644 xhci->scratchpad->sp_buffers = kzalloc(sizeof(void *) * num_sp, flags);
1645 if (!xhci->scratchpad->sp_buffers)
1648 xhci->scratchpad->sp_dma_buffers =
1651 if (!xhci->scratchpad->sp_dma_buffers)
1654 xhci->dcbaa->dev_context_ptrs[0] = cpu_to_le64(xhci->scratchpad->sp_dma);
1662 xhci->scratchpad->sp_array[i] = dma;
1663 xhci->scratchpad->sp_buffers[i] = buf;
1664 xhci->scratchpad->sp_dma_buffers[i] = dma;
1672 xhci->scratchpad->sp_buffers[i],
1673 xhci->scratchpad->sp_dma_buffers[i]);
1675 kfree(xhci->scratchpad->sp_dma_buffers);
1678 kfree(xhci->scratchpad->sp_buffers);
1682 xhci->scratchpad->sp_array,
1683 xhci->scratchpad->sp_dma);
1686 kfree(xhci->scratchpad);
1687 xhci->scratchpad = NULL;
1699 if (!xhci->scratchpad)
1706 xhci->scratchpad->sp_buffers[i],
1707 xhci->scratchpad->sp_dma_buffers[i]);
1709 kfree(xhci->scratchpad->sp_dma_buffers);
1710 kfree(xhci->scratchpad->sp_buffers);
1712 xhci->scratchpad->sp_array,
1713 xhci->scratchpad->sp_dma);
1714 kfree(xhci->scratchpad);
1715 xhci->scratchpad = NULL;