Skip to content

Commit ec0b553

Browse files
Peter Chengregkh
authored andcommitted
usb: host: xhci-mem: allocate zeroed Scratchpad Buffer
commit 7480d912d549f414e0ce39331870899e89a5598c upstream. According to xHCI ch4.20 Scratchpad Buffers, the Scratchpad Buffer needs to be zeroed. ... The following operations take place to allocate Scratchpad Buffers to the xHC: ... b. Software clears the Scratchpad Buffer to '0' Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c0791b6 commit ec0b553

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/usb/host/xhci-mem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,7 @@ static int scratchpad_alloc(struct xhci_hcd *xhci, gfp_t flags)
17091709
xhci->dcbaa->dev_context_ptrs[0] = cpu_to_le64(xhci->scratchpad->sp_dma);
17101710
for (i = 0; i < num_sp; i++) {
17111711
dma_addr_t dma;
1712-
void *buf = dma_alloc_coherent(dev, xhci->page_size, &dma,
1712+
void *buf = dma_zalloc_coherent(dev, xhci->page_size, &dma,
17131713
flags);
17141714
if (!buf)
17151715
goto fail_sp5;

0 commit comments

Comments
 (0)