]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 May 2017 12:13:36 +0000 (14:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 May 2017 12:13:36 +0000 (14:13 +0200)
added patches:
usb-host-xhci-mem-allocate-zeroed-scratchpad-buffer.patch
usb-host-xhci-plat-propagate-return-value-of-platform_get_irq.patch

queue-3.18/series
queue-3.18/usb-host-xhci-mem-allocate-zeroed-scratchpad-buffer.patch [new file with mode: 0644]
queue-3.18/usb-host-xhci-plat-propagate-return-value-of-platform_get_irq.patch [new file with mode: 0644]

index 40ec2ae360dd49d067f515af92d813d1fd91c31a..308687cae7e3ef2953ca83d9d7710b4dbffc7edb 100644 (file)
@@ -17,3 +17,5 @@ iio-dac-ad7303-fix-channel-description.patch
 pid_ns-sleep-in-task_interruptible-in-zap_pid_ns_processes.patch
 usb-serial-ftdi_sio-fix-setting-latency-for-unprivileged-users.patch
 usb-serial-ftdi_sio-add-olimex-arm-usb-tiny-h-pids.patch
+usb-host-xhci-plat-propagate-return-value-of-platform_get_irq.patch
+usb-host-xhci-mem-allocate-zeroed-scratchpad-buffer.patch
diff --git a/queue-3.18/usb-host-xhci-mem-allocate-zeroed-scratchpad-buffer.patch b/queue-3.18/usb-host-xhci-mem-allocate-zeroed-scratchpad-buffer.patch
new file mode 100644 (file)
index 0000000..cd5f631
--- /dev/null
@@ -0,0 +1,37 @@
+From 7480d912d549f414e0ce39331870899e89a5598c Mon Sep 17 00:00:00 2001
+From: Peter Chen <peter.chen@nxp.com>
+Date: Wed, 17 May 2017 18:32:01 +0300
+Subject: usb: host: xhci-mem: allocate zeroed Scratchpad Buffer
+
+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
+@@ -1676,7 +1676,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;
diff --git a/queue-3.18/usb-host-xhci-plat-propagate-return-value-of-platform_get_irq.patch b/queue-3.18/usb-host-xhci-plat-propagate-return-value-of-platform_get_irq.patch
new file mode 100644 (file)
index 0000000..cc9ec59
--- /dev/null
@@ -0,0 +1,32 @@
+From 4b148d5144d64ee135b8924350cb0b3a7fd21150 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Wed, 17 May 2017 18:32:06 +0300
+Subject: usb: host: xhci-plat: propagate return value of platform_get_irq()
+
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+commit 4b148d5144d64ee135b8924350cb0b3a7fd21150 upstream.
+
+platform_get_irq() returns an error code, but the xhci-plat driver
+ignores it and always returns -ENODEV. This is not correct, and
+prevents -EPROBE_DEFER from being propagated properly.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-plat.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/xhci-plat.c
++++ b/drivers/usb/host/xhci-plat.c
+@@ -81,7 +81,7 @@ static int xhci_plat_probe(struct platfo
+       irq = platform_get_irq(pdev, 0);
+       if (irq < 0)
+-              return -ENODEV;
++              return irq;
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!res)