Lines Matching refs:scratchpad
1630 xhci->scratchpad = kzalloc_node(sizeof(*xhci->scratchpad), flags, in scratchpad_alloc()
1632 if (!xhci->scratchpad) in scratchpad_alloc()
1635 xhci->scratchpad->sp_array = dma_alloc_coherent(dev, in scratchpad_alloc()
1637 &xhci->scratchpad->sp_dma, flags); in scratchpad_alloc()
1638 if (!xhci->scratchpad->sp_array) in scratchpad_alloc()
1641 xhci->scratchpad->sp_buffers = kcalloc_node(num_sp, sizeof(void *), in scratchpad_alloc()
1643 if (!xhci->scratchpad->sp_buffers) in scratchpad_alloc()
1646 xhci->dcbaa->dev_context_ptrs[0] = cpu_to_le64(xhci->scratchpad->sp_dma); in scratchpad_alloc()
1654 xhci->scratchpad->sp_array[i] = dma; in scratchpad_alloc()
1655 xhci->scratchpad->sp_buffers[i] = buf; in scratchpad_alloc()
1663 xhci->scratchpad->sp_buffers[i], in scratchpad_alloc()
1664 xhci->scratchpad->sp_array[i]); in scratchpad_alloc()
1666 kfree(xhci->scratchpad->sp_buffers); in scratchpad_alloc()
1670 xhci->scratchpad->sp_array, in scratchpad_alloc()
1671 xhci->scratchpad->sp_dma); in scratchpad_alloc()
1674 kfree(xhci->scratchpad); in scratchpad_alloc()
1675 xhci->scratchpad = NULL; in scratchpad_alloc()
1687 if (!xhci->scratchpad) in scratchpad_free()
1694 xhci->scratchpad->sp_buffers[i], in scratchpad_free()
1695 xhci->scratchpad->sp_array[i]); in scratchpad_free()
1697 kfree(xhci->scratchpad->sp_buffers); in scratchpad_free()
1699 xhci->scratchpad->sp_array, in scratchpad_free()
1700 xhci->scratchpad->sp_dma); in scratchpad_free()
1701 kfree(xhci->scratchpad); in scratchpad_free()
1702 xhci->scratchpad = NULL; in scratchpad_free()