svn commit: r355152 - in stable/11/sys/dev/ntb: . ntb_hw
Alexander Motin
mav at FreeBSD.org
Thu Nov 28 00:41:43 UTC 2019
Author: mav
Date: Thu Nov 28 00:41:42 2019
New Revision: 355152
URL: https://svnweb.freebsd.org/changeset/base/355152
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/11/sys/dev/ntb/ntb.c
stable/11/sys/dev/ntb/ntb.h
stable/11/sys/dev/ntb/ntb_hw/ntb_hw_intel.c
stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/ntb/ntb.c
==============================================================================
--- stable/11/sys/dev/ntb/ntb.c Thu Nov 28 00:40:42 2019 (r355151)
+++ stable/11/sys/dev/ntb/ntb.c Thu Nov 28 00:41:42 2019 (r355152)
@@ -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/11/sys/dev/ntb/ntb.h
==============================================================================
--- stable/11/sys/dev/ntb/ntb.h Thu Nov 28 00:40:42 2019 (r355151)
+++ stable/11/sys/dev/ntb/ntb.h Thu Nov 28 00:41:42 2019 (r355152)
@@ -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/11/sys/dev/ntb/ntb_hw/ntb_hw_intel.c
==============================================================================
--- stable/11/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Thu Nov 28 00:40:42 2019 (r355151)
+++ stable/11/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Thu Nov 28 00:41:42 2019 (r355152)
@@ -3088,6 +3088,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_link_is_up, intel_ntb_link_is_up),
DEVMETHOD(ntb_link_enable, intel_ntb_link_enable),
Modified: stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c
==============================================================================
--- stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Nov 28 00:40:42 2019 (r355151)
+++ stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Nov 28 00:41:42 2019 (r355152)
@@ -1009,6 +1009,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_link_is_up, ntb_plx_link_is_up),
DEVMETHOD(ntb_link_enable, ntb_plx_link_enable),
More information about the svn-src-all
mailing list