Author: jhibbits Date: Fri Jun 15 18:55:02 2018 New Revision: 335226 URL: https://svnweb.freebsd.org/changeset/base/335226
Log: Check for a 'pci' prefix rather than a full match in get_addr_props Summary: Newer OPAL device trees, such as those on POWER9 systems, use 'pciex' for device_type, not 'pci'. Rather than enumerating all possible variants, just check for a 'pci' prefix. Reviewed by: nwhitehorn, breno.leitao_gmail.com Differential Revision: https://reviews.freebsd.org/D15817 Modified: head/sys/dev/ofw/ofw_subr.c Modified: head/sys/dev/ofw/ofw_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_subr.c Fri Jun 15 18:50:24 2018 (r335225) +++ head/sys/dev/ofw/ofw_subr.c Fri Jun 15 18:55:02 2018 (r335226) @@ -61,7 +61,9 @@ get_addr_props(phandle_t node, uint32_t *addrp, uint32 res = OF_getprop(node, "device_type", type, sizeof(type)); if (res != -1) { type[sizeof(type) - 1] = '\0'; - pci = (strcmp(type, "pci") == 0) ? 1 : 0; + if (strcmp(type, "pci") == 0 || + strcmp(type, "pciex")== 0) + pci = 1; } } if (addrp != NULL) _______________________________________________ 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"