Lines Matching refs:scratchpad
1652 xhci->scratchpad = kzalloc(sizeof(*xhci->scratchpad), flags); in scratchpad_alloc()
1653 if (!xhci->scratchpad) in scratchpad_alloc()
1656 xhci->scratchpad->sp_array = dma_alloc_coherent(dev, in scratchpad_alloc()
1658 &xhci->scratchpad->sp_dma, flags); in scratchpad_alloc()
1659 if (!xhci->scratchpad->sp_array) in scratchpad_alloc()
1662 xhci->scratchpad->sp_buffers = kzalloc(sizeof(void *) * num_sp, flags); in scratchpad_alloc()
1663 if (!xhci->scratchpad->sp_buffers) in scratchpad_alloc()
1666 xhci->scratchpad->sp_dma_buffers = in scratchpad_alloc()
1669 if (!xhci->scratchpad->sp_dma_buffers) in scratchpad_alloc()
1672 xhci->dcbaa->dev_context_ptrs[0] = cpu_to_le64(xhci->scratchpad->sp_dma); in scratchpad_alloc()
1680 xhci->scratchpad->sp_array[i] = dma; in scratchpad_alloc()
1681 xhci->scratchpad->sp_buffers[i] = buf; in scratchpad_alloc()
1682 xhci->scratchpad->sp_dma_buffers[i] = dma; in scratchpad_alloc()
1690 xhci->scratchpad->sp_buffers[i], in scratchpad_alloc()
1691 xhci->scratchpad->sp_dma_buffers[i]); in scratchpad_alloc()
1693 kfree(xhci->scratchpad->sp_dma_buffers); in scratchpad_alloc()
1696 kfree(xhci->scratchpad->sp_buffers); in scratchpad_alloc()
1700 xhci->scratchpad->sp_array, in scratchpad_alloc()
1701 xhci->scratchpad->sp_dma); in scratchpad_alloc()
1704 kfree(xhci->scratchpad); in scratchpad_alloc()
1705 xhci->scratchpad = NULL; in scratchpad_alloc()
1717 if (!xhci->scratchpad) in scratchpad_free()
1724 xhci->scratchpad->sp_buffers[i], in scratchpad_free()
1725 xhci->scratchpad->sp_dma_buffers[i]); in scratchpad_free()
1727 kfree(xhci->scratchpad->sp_dma_buffers); in scratchpad_free()
1728 kfree(xhci->scratchpad->sp_buffers); in scratchpad_free()
1730 xhci->scratchpad->sp_array, in scratchpad_free()
1731 xhci->scratchpad->sp_dma); in scratchpad_free()
1732 kfree(xhci->scratchpad); in scratchpad_free()
1733 xhci->scratchpad = NULL; in scratchpad_free()