]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 17:10:59 +0000 (18:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 17:10:59 +0000 (18:10 +0100)
added patches:
usb-gadget-bdc-64-bit-pointer-capability-check.patch
usb-gadget-udc-add-missing-platform_device_put-on-error-in-bdc_pci_probe.patch

queue-4.4/series
queue-4.4/usb-gadget-bdc-64-bit-pointer-capability-check.patch [new file with mode: 0644]
queue-4.4/usb-gadget-udc-add-missing-platform_device_put-on-error-in-bdc_pci_probe.patch [new file with mode: 0644]

index b505a613abe8030ce9ed7fd103f292ac3d997575..49fb14838c80eaaa68f1072437e6e3ab86cbded3 100644 (file)
@@ -129,3 +129,5 @@ scsi-sg-only-check-for-dxfer_len-greater-than-256m.patch
 arm-dts-logicpd-torpedo-fix-i2c1-pinmux.patch
 btrfs-alloc_chunk-fix-dup-stripe-size-handling.patch
 btrfs-fix-use-after-free-when-cleaning-up-fs_devs-with-a-single-stale-device.patch
+usb-gadget-udc-add-missing-platform_device_put-on-error-in-bdc_pci_probe.patch
+usb-gadget-bdc-64-bit-pointer-capability-check.patch
diff --git a/queue-4.4/usb-gadget-bdc-64-bit-pointer-capability-check.patch b/queue-4.4/usb-gadget-bdc-64-bit-pointer-capability-check.patch
new file mode 100644 (file)
index 0000000..e5bbad8
--- /dev/null
@@ -0,0 +1,37 @@
+From c8e4e5bdb62a5ac6f860ebcaaf7b467b62f453f1 Mon Sep 17 00:00:00 2001
+From: Srinath Mannam <srinath.mannam@broadcom.com>
+Date: Thu, 15 Jun 2017 14:39:22 +0530
+Subject: usb: gadget: bdc: 64-bit pointer capability check
+
+From: Srinath Mannam <srinath.mannam@broadcom.com>
+
+commit c8e4e5bdb62a5ac6f860ebcaaf7b467b62f453f1 upstream.
+
+Corrected the register to check the 64-bit pointer
+capability state. 64-bit pointer implementation capability
+was checking in wrong register, which causes the BDC
+enumeration failure in 64-bit memory address.
+
+Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for
+Broadcom USB3.0 device controller IP BDC")
+
+Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: Srinath Mannam <srinath.mannam@broadcom.com>
+Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/udc/bdc/bdc_core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/udc/bdc/bdc_core.c
++++ b/drivers/usb/gadget/udc/bdc/bdc_core.c
+@@ -475,7 +475,7 @@ static int bdc_probe(struct platform_dev
+       bdc->dev = dev;
+       dev_dbg(bdc->dev, "bdc->regs: %p irq=%d\n", bdc->regs, bdc->irq);
+-      temp = bdc_readl(bdc->regs, BDC_BDCSC);
++      temp = bdc_readl(bdc->regs, BDC_BDCCAP1);
+       if ((temp & BDC_P64) &&
+                       !dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64))) {
+               dev_dbg(bdc->dev, "Using 64-bit address\n");
diff --git a/queue-4.4/usb-gadget-udc-add-missing-platform_device_put-on-error-in-bdc_pci_probe.patch b/queue-4.4/usb-gadget-udc-add-missing-platform_device_put-on-error-in-bdc_pci_probe.patch
new file mode 100644 (file)
index 0000000..ff48129
--- /dev/null
@@ -0,0 +1,31 @@
+From 8874ae5f15f3feef3b4a415b9aed51edcf449aa1 Mon Sep 17 00:00:00 2001
+From: Wei Yongjun <weiyongjun1@huawei.com>
+Date: Tue, 23 Jan 2018 09:35:14 +0000
+Subject: USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe()
+
+From: Wei Yongjun <weiyongjun1@huawei.com>
+
+commit 8874ae5f15f3feef3b4a415b9aed51edcf449aa1 upstream.
+
+Add the missing platform_device_put() before return from bdc_pci_probe()
+in the platform_device_add_resources() error handling case.
+
+Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC")
+Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
+Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/udc/bdc/bdc_pci.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/gadget/udc/bdc/bdc_pci.c
++++ b/drivers/usb/gadget/udc/bdc/bdc_pci.c
+@@ -82,6 +82,7 @@ static int bdc_pci_probe(struct pci_dev
+       if (ret) {
+               dev_err(&pci->dev,
+                       "couldn't add resources to bdc device\n");
++              platform_device_put(bdc);
+               return ret;
+       }