Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1648846 > unrolled thread

[PATCH 4.9 080/164] usb: host: xhci-mem: allocate zeroed Scratchpad Buffer

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-05-23 23:50 +0200
Last post2017-05-23 23:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.9 080/164] usb: host: xhci-mem: allocate zeroed Scratchpad Buffer Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-23 23:50 +0200

#1648846 — [PATCH 4.9 080/164] usb: host: xhci-mem: allocate zeroed Scratchpad Buffer

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-23 23:50 +0200
Subject[PATCH 4.9 080/164] usb: host: xhci-mem: allocate zeroed Scratchpad Buffer
Message-ID<tKpQM-KR-75@gated-at.bofh.it>
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Peter Chen <peter.chen@nxp.com>

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>

---
 drivers/usb/host/xhci-mem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1721,7 +1721,7 @@ static int scratchpad_alloc(struct xhci_
 	xhci->dcbaa->dev_context_ptrs[0] = cpu_to_le64(xhci->scratchpad->sp_dma);
 	for (i = 0; i < num_sp; i++) {
 		dma_addr_t dma;
-		void *buf = dma_alloc_coherent(dev, xhci->page_size, &dma,
+		void *buf = dma_zalloc_coherent(dev, xhci->page_size, &dma,
 				flags);
 		if (!buf)
 			goto fail_sp5;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web