ramips: 5.10: copy patches from 5.4
[openwrt/staging/rmilecki.git] / target / linux / ramips / patches-5.10 / 0119-staging-mt7621-pci-avoid-to-set-iomem_resource-addre.patch
1 From 4f0f36b67564311a4ce4441510ef94848febbab2 Mon Sep 17 00:00:00 2001
2 From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
3 Date: Sun, 22 Mar 2020 08:21:28 +0100
4 Subject: [PATCH] staging: mt7621-pci: avoid to set 'iomem_resource' addresses
5
6 Setting up kernel resource 'iomem_resource' for PCI with
7 addresses parsed from device tree gots into a conflict within
8 the usb xhci driver:
9
10 xhci-mtk 1e1c0000.xhci: can't request region for resource [mem 0x1e1c0000-0x1e1c0fff]
11 xhci-mtk: probe of 1e1c0000.xhci failed with error -16
12
13 Don't assign it and maintain the default addresses for this
14 resource seems to fix the problem. Checking legacy driver it
15 is being only setting the 'ioport_resource'.
16
17 Fixes: 09dd629eeabb ("staging: mt7621-pci: fix io space and properly set resource limits")
18 Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
19 Link: https://lore.kernel.org/r/20200322072128.4454-1-sergio.paracuellos@gmail.com
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 ---
22 drivers/staging/mt7621-pci/pci-mt7621.c | 2 --
23 1 file changed, 2 deletions(-)
24
25 --- a/drivers/staging/mt7621-pci/pci-mt7621.c
26 +++ b/drivers/staging/mt7621-pci/pci-mt7621.c
27 @@ -679,8 +679,6 @@ static int mt7621_pci_probe(struct platf
28 }
29
30 /* set resources limits */
31 - iomem_resource.start = pcie->mem.start;
32 - iomem_resource.end = pcie->mem.end;
33 ioport_resource.start = pcie->io.start;
34 ioport_resource.end = pcie->io.end;
35