From: Greg Kroah-Hartman Date: Mon, 19 Mar 2018 17:10:59 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.15.12~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d5273d1cc033c5aeb064ef12f1e681f75605336;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches 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 --- diff --git a/queue-4.4/series b/queue-4.4/series index b505a613abe..49fb14838c8 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -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 index 00000000000..e5bbad8d064 --- /dev/null +++ b/queue-4.4/usb-gadget-bdc-64-bit-pointer-capability-check.patch @@ -0,0 +1,37 @@ +From c8e4e5bdb62a5ac6f860ebcaaf7b467b62f453f1 Mon Sep 17 00:00:00 2001 +From: Srinath Mannam +Date: Thu, 15 Jun 2017 14:39:22 +0530 +Subject: usb: gadget: bdc: 64-bit pointer capability check + +From: Srinath Mannam + +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 +Signed-off-by: Srinath Mannam +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..ff48129c36a --- /dev/null +++ b/queue-4.4/usb-gadget-udc-add-missing-platform_device_put-on-error-in-bdc_pci_probe.patch @@ -0,0 +1,31 @@ +From 8874ae5f15f3feef3b4a415b9aed51edcf449aa1 Mon Sep 17 00:00:00 2001 +From: Wei Yongjun +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 + +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 +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + 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; + } +