]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 May 2017 12:15:48 +0000 (14:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 May 2017 12:15:48 +0000 (14:15 +0200)
added patches:
usb-host-xhci-mem-allocate-zeroed-scratchpad-buffer.patch
usb-host-xhci-plat-propagate-return-value-of-platform_get_irq.patch
xhci-apply-pme_stuck_quirk-and-missing_cas-quirk-for-denverton.patch
xhci-remove-gfp_dma-flag-from-allocation.patch

queue-4.9/series
queue-4.9/usb-host-xhci-mem-allocate-zeroed-scratchpad-buffer.patch [new file with mode: 0644]
queue-4.9/usb-host-xhci-plat-propagate-return-value-of-platform_get_irq.patch [new file with mode: 0644]
queue-4.9/xhci-apply-pme_stuck_quirk-and-missing_cas-quirk-for-denverton.patch [new file with mode: 0644]
queue-4.9/xhci-remove-gfp_dma-flag-from-allocation.patch [new file with mode: 0644]

index f845cea3a42a74d1b19adf63f191e2e7aef9af50..8d0ecc2c2dad099690b9a166b279324b588eb110 100644 (file)
@@ -75,3 +75,7 @@ usb-chaoskey-fix-alea-quirk-on-big-endian-hosts.patch
 f2fs-check-entire-encrypted-bigname-when-finding-a-dentry.patch
 fscrypt-avoid-collisions-when-presenting-long-encrypted-filenames.patch
 libnvdimm-fix-clear-length-of-nvdimm_forget_poison.patch
+xhci-remove-gfp_dma-flag-from-allocation.patch
+usb-host-xhci-plat-propagate-return-value-of-platform_get_irq.patch
+xhci-apply-pme_stuck_quirk-and-missing_cas-quirk-for-denverton.patch
+usb-host-xhci-mem-allocate-zeroed-scratchpad-buffer.patch
diff --git a/queue-4.9/usb-host-xhci-mem-allocate-zeroed-scratchpad-buffer.patch b/queue-4.9/usb-host-xhci-mem-allocate-zeroed-scratchpad-buffer.patch
new file mode 100644 (file)
index 0000000..0947fe7
--- /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
+@@ -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;
diff --git a/queue-4.9/usb-host-xhci-plat-propagate-return-value-of-platform_get_irq.patch b/queue-4.9/usb-host-xhci-plat-propagate-return-value-of-platform_get_irq.patch
new file mode 100644 (file)
index 0000000..7af654b
--- /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
+@@ -153,7 +153,7 @@ static int xhci_plat_probe(struct platfo
+       irq = platform_get_irq(pdev, 0);
+       if (irq < 0)
+-              return -ENODEV;
++              return irq;
+       /* Try to set 64-bit DMA first */
+       if (WARN_ON(!pdev->dev.dma_mask))
diff --git a/queue-4.9/xhci-apply-pme_stuck_quirk-and-missing_cas-quirk-for-denverton.patch b/queue-4.9/xhci-apply-pme_stuck_quirk-and-missing_cas-quirk-for-denverton.patch
new file mode 100644 (file)
index 0000000..b76ed7e
--- /dev/null
@@ -0,0 +1,49 @@
+From a0c16630d35a874e82bdf2088f58ecaca1024315 Mon Sep 17 00:00:00 2001
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+Date: Wed, 17 May 2017 18:32:00 +0300
+Subject: xhci: apply PME_STUCK_QUIRK and MISSING_CAS quirk for Denverton
+
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+
+commit a0c16630d35a874e82bdf2088f58ecaca1024315 upstream.
+
+Intel Denverton microserver is Atom based and need the PME and CAS quirks
+as well.
+
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-pci.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -52,6 +52,7 @@
+ #define PCI_DEVICE_ID_INTEL_BROXTON_M_XHCI            0x0aa8
+ #define PCI_DEVICE_ID_INTEL_BROXTON_B_XHCI            0x1aa8
+ #define PCI_DEVICE_ID_INTEL_APL_XHCI                  0x5aa8
++#define PCI_DEVICE_ID_INTEL_DNV_XHCI                  0x19d0
+ static const char hcd_name[] = "xhci_hcd";
+@@ -166,7 +167,8 @@ static void xhci_pci_quirks(struct devic
+                pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI ||
+                pdev->device == PCI_DEVICE_ID_INTEL_BROXTON_M_XHCI ||
+                pdev->device == PCI_DEVICE_ID_INTEL_BROXTON_B_XHCI ||
+-               pdev->device == PCI_DEVICE_ID_INTEL_APL_XHCI)) {
++               pdev->device == PCI_DEVICE_ID_INTEL_APL_XHCI ||
++               pdev->device == PCI_DEVICE_ID_INTEL_DNV_XHCI)) {
+               xhci->quirks |= XHCI_PME_STUCK_QUIRK;
+       }
+       if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
+@@ -175,7 +177,8 @@ static void xhci_pci_quirks(struct devic
+       }
+       if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
+           (pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI ||
+-           pdev->device == PCI_DEVICE_ID_INTEL_APL_XHCI))
++           pdev->device == PCI_DEVICE_ID_INTEL_APL_XHCI ||
++           pdev->device == PCI_DEVICE_ID_INTEL_DNV_XHCI))
+               xhci->quirks |= XHCI_MISSING_CAS;
+       if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
diff --git a/queue-4.9/xhci-remove-gfp_dma-flag-from-allocation.patch b/queue-4.9/xhci-remove-gfp_dma-flag-from-allocation.patch
new file mode 100644 (file)
index 0000000..17ee477
--- /dev/null
@@ -0,0 +1,34 @@
+From 5db851cf20857c5504b146046e97cb7781f2a743 Mon Sep 17 00:00:00 2001
+From: Matthias Lange <matthias.lange@kernkonzept.com>
+Date: Wed, 17 May 2017 18:32:04 +0300
+Subject: xhci: remove GFP_DMA flag from allocation
+
+From: Matthias Lange <matthias.lange@kernkonzept.com>
+
+commit 5db851cf20857c5504b146046e97cb7781f2a743 upstream.
+
+There is no reason to restrict allocations to the first 16MB ISA DMA
+addresses.
+
+It is causing problems in a virtualization setup with enabled IOMMU
+(x86_64). The result is that USB is not working in the VM.
+
+Signed-off-by: Matthias Lange <matthias.lange@kernkonzept.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
+@@ -56,7 +56,7 @@ static struct xhci_segment *xhci_segment
+       }
+       if (max_packet) {
+-              seg->bounce_buf = kzalloc(max_packet, flags | GFP_DMA);
++              seg->bounce_buf = kzalloc(max_packet, flags);
+               if (!seg->bounce_buf) {
+                       dma_pool_free(xhci->segment_pool, seg->trbs, dma);
+                       kfree(seg);