Lines Matching refs:scratchpad
1635 xhci->scratchpad = kzalloc_node(sizeof(*xhci->scratchpad), flags, in scratchpad_alloc()
1637 if (!xhci->scratchpad) in scratchpad_alloc()
1640 xhci->scratchpad->sp_array = dma_alloc_coherent(dev, in scratchpad_alloc()
1642 &xhci->scratchpad->sp_dma, flags); in scratchpad_alloc()
1643 if (!xhci->scratchpad->sp_array) in scratchpad_alloc()
1646 xhci->scratchpad->sp_buffers = kcalloc_node(num_sp, sizeof(void *), in scratchpad_alloc()
1648 if (!xhci->scratchpad->sp_buffers) in scratchpad_alloc()
1651 xhci->dcbaa->dev_context_ptrs[0] = cpu_to_le64(xhci->scratchpad->sp_dma); in scratchpad_alloc()
1659 xhci->scratchpad->sp_array[i] = dma; in scratchpad_alloc()
1660 xhci->scratchpad->sp_buffers[i] = buf; in scratchpad_alloc()
1668 xhci->scratchpad->sp_buffers[i], in scratchpad_alloc()
1669 xhci->scratchpad->sp_array[i]); in scratchpad_alloc()
1671 kfree(xhci->scratchpad->sp_buffers); in scratchpad_alloc()
1675 xhci->scratchpad->sp_array, in scratchpad_alloc()
1676 xhci->scratchpad->sp_dma); in scratchpad_alloc()
1679 kfree(xhci->scratchpad); in scratchpad_alloc()
1680 xhci->scratchpad = NULL; in scratchpad_alloc()
1692 if (!xhci->scratchpad) in scratchpad_free()
1699 xhci->scratchpad->sp_buffers[i], in scratchpad_free()
1700 xhci->scratchpad->sp_array[i]); in scratchpad_free()
1702 kfree(xhci->scratchpad->sp_buffers); in scratchpad_free()
1704 xhci->scratchpad->sp_array, in scratchpad_free()
1705 xhci->scratchpad->sp_dma); in scratchpad_free()
1706 kfree(xhci->scratchpad); in scratchpad_free()
1707 xhci->scratchpad = NULL; in scratchpad_free()