Author: jhibbits Date: Sat Jan 11 22:29:44 2020 New Revision: 356640 URL: https://svnweb.freebsd.org/changeset/base/356640
Log: powerpc/mpc85xx: Fix localbus child reg property decoding r302340, as an attempt to fix the localbus child handling post-rman change, actually broke child resource allocation, due to typos in fdt_lbc_reg_decode(). This went unnoticed because there aren't any drivers currently in tree that use localbus. Modified: head/sys/powerpc/mpc85xx/lbc.c Modified: head/sys/powerpc/mpc85xx/lbc.c ============================================================================== --- head/sys/powerpc/mpc85xx/lbc.c Sat Jan 11 20:07:30 2020 (r356639) +++ head/sys/powerpc/mpc85xx/lbc.c Sat Jan 11 22:29:44 2020 (r356640) @@ -391,13 +391,13 @@ fdt_lbc_reg_decode(phandle_t node, struct lbc_softc *s /* Get address/size. */ start = count = 0; - for (j = 0; j < addr_cells; j++) { + for (j = 0; j < addr_cells - 1; j++) { start <<= 32; start |= reg[j]; } for (j = 0; j < size_cells; j++) { count <<= 32; - count |= reg[addr_cells + j - 1]; + count |= reg[addr_cells + j]; } reg += addr_cells - 1 + size_cells; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"