Date: Sun, 3 Feb 2019 09:14:53 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r343710 - stable/12/sys/arm/mv Message-ID: <201902030914.x139ErkW037320@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gonzo Date: Sun Feb 3 09:14:53 2019 New Revision: 343710 URL: https://svnweb.freebsd.org/changeset/base/343710 Log: MFC r343028, r343104 r343028: [mv_pci] Increase default PCI space size for mv_pci mv_pci driver reads PCI memory window layout from DTB data and if the data is incomplete falls back to default value. The value is too small to fit two PCI spaces for mwlwifi devices on WRT3200ACM so the resource allocation for them fails. Increase the default to 4Mb from 1Mb so the devices can be properly attached. r343104: [mv] Fix invalid condition in fdt_fixup_ranges Add parentheses to perform assignment before comparison. The prior condition worked because fdt_parent_addr_cells returns 1 for the DTB on which fdt_fixup_ranges is called and accidentally par_addr_cells ends up to be set to the same value. PR: 210705 Submitted by: David Binderman <dcb314@hotmail.com> Modified: stable/12/sys/arm/mv/mv_common.c stable/12/sys/arm/mv/mv_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/mv/mv_common.c ============================================================================== --- stable/12/sys/arm/mv/mv_common.c Sun Feb 3 08:53:03 2019 (r343709) +++ stable/12/sys/arm/mv/mv_common.c Sun Feb 3 09:14:53 2019 (r343710) @@ -2935,7 +2935,7 @@ fdt_fixup_ranges(phandle_t root) /* Fix-up SoC ranges according to real fdt_immr_pa */ if ((node = fdt_find_compatible(root, "simple-bus", 1)) != 0) { if (fdt_addrsize_cells(node, &addr_cells, &size_cells) == 0 && - (par_addr_cells = fdt_parent_addr_cells(node) <= 2)) { + ((par_addr_cells = fdt_parent_addr_cells(node)) <= 2)) { tuple_size = sizeof(pcell_t) * (par_addr_cells + addr_cells + size_cells); len = OF_getprop(node, "ranges", ranges, Modified: stable/12/sys/arm/mv/mv_pci.c ============================================================================== --- stable/12/sys/arm/mv/mv_pci.c Sun Feb 3 08:53:03 2019 (r343709) +++ stable/12/sys/arm/mv/mv_pci.c Sun Feb 3 09:14:53 2019 (r343710) @@ -100,7 +100,7 @@ struct mv_pci_range { }; #define FDT_RANGES_CELLS ((3 + 3 + 2) * 2) -#define PCI_SPACE_LEN 0x00100000 +#define PCI_SPACE_LEN 0x00400000 static void mv_pci_range_dump(struct mv_pci_range *range)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902030914.x139ErkW037320>