Author: mav Date: Thu Nov 28 00:40:42 2019 New Revision: 355151 URL: https://svnweb.freebsd.org/changeset/base/355151
Log: MFC r354702: Make ntb(4) send bus_get_dma_tag() requests to parent buses passing real bus' child pointers instead of grandchilds. DMAR does not like requests from devices not parented directly by PCI. Modified: stable/12/sys/dev/ntb/ntb.c stable/12/sys/dev/ntb/ntb.h stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.c stable/12/sys/dev/ntb/ntb_hw/ntb_hw_intel.c stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ntb/ntb.c ============================================================================== --- stable/12/sys/dev/ntb/ntb.c Thu Nov 28 00:37:43 2019 (r355150) +++ stable/12/sys/dev/ntb/ntb.c Thu Nov 28 00:40:42 2019 (r355151) @@ -205,6 +205,13 @@ ntb_print_child(device_t dev, device_t child) return (retval); } +bus_dma_tag_t +ntb_get_dma_tag(device_t bus, device_t child) +{ + + return (bus_get_dma_tag(bus)); +} + void ntb_link_event(device_t dev) { Modified: stable/12/sys/dev/ntb/ntb.h ============================================================================== --- stable/12/sys/dev/ntb/ntb.h Thu Nov 28 00:37:43 2019 (r355150) +++ stable/12/sys/dev/ntb/ntb.h Thu Nov 28 00:40:42 2019 (r355151) @@ -39,6 +39,7 @@ int ntb_unregister_device(device_t ntb); int ntb_child_location_str(device_t dev, device_t child, char *buf, size_t buflen); int ntb_print_child(device_t dev, device_t child); +bus_dma_tag_t ntb_get_dma_tag(device_t bus, device_t child); /* * ntb_link_event() - notify driver context of a change in link status Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.c ============================================================================== --- stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Thu Nov 28 00:37:43 2019 (r355150) +++ stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Thu Nov 28 00:40:42 2019 (r355151) @@ -1266,6 +1266,7 @@ static device_method_t ntb_amd_methods[] = { /* Bus interface */ DEVMETHOD(bus_child_location_str, ntb_child_location_str), DEVMETHOD(bus_print_child, ntb_print_child), + DEVMETHOD(bus_get_dma_tag, ntb_get_dma_tag), /* NTB interface */ DEVMETHOD(ntb_port_number, amd_ntb_port_number), Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_intel.c ============================================================================== --- stable/12/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Thu Nov 28 00:37:43 2019 (r355150) +++ stable/12/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Thu Nov 28 00:40:42 2019 (r355151) @@ -3123,6 +3123,7 @@ static device_method_t ntb_intel_methods[] = { /* Bus interface */ DEVMETHOD(bus_child_location_str, ntb_child_location_str), DEVMETHOD(bus_print_child, ntb_print_child), + DEVMETHOD(bus_get_dma_tag, ntb_get_dma_tag), /* NTB interface */ DEVMETHOD(ntb_port_number, intel_ntb_port_number), DEVMETHOD(ntb_peer_port_count, intel_ntb_peer_port_count), Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c ============================================================================== --- stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Nov 28 00:37:43 2019 (r355150) +++ stable/12/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Nov 28 00:40:42 2019 (r355151) @@ -1052,6 +1052,7 @@ static device_method_t ntb_plx_methods[] = { /* Bus interface */ DEVMETHOD(bus_child_location_str, ntb_child_location_str), DEVMETHOD(bus_print_child, ntb_print_child), + DEVMETHOD(bus_get_dma_tag, ntb_get_dma_tag), /* NTB interface */ DEVMETHOD(ntb_port_number, ntb_plx_port_number), DEVMETHOD(ntb_peer_port_count, ntb_plx_peer_port_count), _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"