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. MFC after: 2 weeks
This commit is contained in:
parent
49806b9c2c
commit
ae3ffb6e2d
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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),
|
||||
|
@ -3124,6 +3124,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),
|
||||
|
@ -1046,6 +1046,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),
|
||||
|
Loading…
Reference in New Issue
Block a user