From owner-svn-src-all@freebsd.org Thu Nov 28 00:41:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F24E1BCFDE; Thu, 28 Nov 2019 00:41:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Nf3C3L4Mz3Jny; Thu, 28 Nov 2019 00:41:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 571831DB8E; Thu, 28 Nov 2019 00:41:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAS0fhiS060730; Thu, 28 Nov 2019 00:41:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAS0fgZk060603; Thu, 28 Nov 2019 00:41:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911280041.xAS0fgZk060603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 28 Nov 2019 00:41:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355152 - in stable/11/sys/dev/ntb: . ntb_hw X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11/sys/dev/ntb: . ntb_hw X-SVN-Commit-Revision: 355152 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 00:41:43 -0000 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),