summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@nxp.com>2017-05-17 18:32:01 +0300
committerBen Hutchings <ben@decadent.org.uk>2017-09-15 20:30:44 +0300
commit6b90abb0bc79e3ab1a2a8b6e5d5f69a267742b0c (patch)
tree45dd89d7b27fb2957df3716b3650adfc63c6cc7b /drivers
parentda2507969fa7b8cc0367fd8cdf651856e1d3bae6 (diff)
downloadlinux-6b90abb0bc79e3ab1a2a8b6e5d5f69a267742b0c.tar.xz
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> [bwh: Backported to 3.2: we only do one allocation for scratchpad buffers] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/xhci-mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 337b86695dfc..841eb6878e97 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1591,7 +1591,7 @@ static int scratchpad_alloc(struct xhci_hcd *xhci, gfp_t flags)
if (!xhci->scratchpad)
goto fail_sp;
- xhci->scratchpad->sp_array = dma_alloc_coherent(dev,
+ xhci->scratchpad->sp_array = dma_zalloc_coherent(dev,
num_sp * sizeof(u64),
&xhci->scratchpad->sp_dma, flags);
if (!xhci->scratchpad->sp_array)