]> git.itanic.dy.fi Git - linux-stable/commitdiff
staging: mt7621-pci: set end limit for 'ioport_resource'
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Sun, 22 Aug 2021 16:10:05 +0000 (18:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Sep 2021 15:31:13 +0000 (17:31 +0200)
We have increase IO_SPACE_LIMIT for ralink platform to get PCI IO resources
properly handled using PCI core APIs. To align those changes with driver
code we have to set 'ioport_resource' end limit to IO_SPACE_LIMIT to avoid
errors.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210822161005.22467-4-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-pci/pci-mt7621.c

index 6acfc94a16e731c6d7068f61f19be0c00a1cb98d..86d9c3d122e2c8163df86fe3e5bc8ebceb90ab8d 100644 (file)
@@ -526,6 +526,8 @@ static int mt7621_pci_probe(struct platform_device *pdev)
        if (!dev->of_node)
                return -ENODEV;
 
+       ioport_resource.end = IO_SPACE_LIMIT;
+
        bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie));
        if (!bridge)
                return -ENOMEM;