From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F40B1C433DF for ; Tue, 23 Jun 2020 20:59:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA89320656 for ; Tue, 23 Jun 2020 20:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592945994; bh=9NE9nisQ1DquUP0EnbAPzo4ORKVh7iHb3MsORRTQgNE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Xs7/HuIUGnN4uJ3U2pRwYsS1d/BkWcFNRqjTXqUiro9fClitmC9NoXVOsxneJ9CRV G0eOQUojxRAxWszd7KxboQJKiHjOdhuFharNAJp55k2J5xwSjj7iwVW4Mza7zykmZN aZJrZljKlqKs2XTe8+7o8eqRXhKrbg2g9uyJxHsg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392541AbgFWU7w (ORCPT ); Tue, 23 Jun 2020 16:59:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:36860 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392261AbgFWUkn (ORCPT ); Tue, 23 Jun 2020 16:40:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 38DE72053B; Tue, 23 Jun 2020 20:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592944842; bh=9NE9nisQ1DquUP0EnbAPzo4ORKVh7iHb3MsORRTQgNE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dypZ+vxqQdSlzRaUvb5vYawXg5kGkviYTHJPilmyThZDF5XooopyQmgI82GuxzXnh p9wirDCvNEsPTjqXeH7fpjGKRdH7K/lDV+tt8IFwwolbo2DcZXbXo18RyYpEozk/Vr 66SE1ITr84dylIyi3rcVsGwaOJxap0kKRG+3PJDA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Logan Gunthorpe , Alexander Fomichev , Jon Mason , Sasha Levin Subject: [PATCH 4.19 146/206] NTB: Revert the change to use the NTB device dev for DMA allocations Date: Tue, 23 Jun 2020 21:57:54 +0200 Message-Id: <20200623195324.171222781@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195316.864547658@linuxfoundation.org> References: <20200623195316.864547658@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Logan Gunthorpe [ Upstream commit 40da7d9a93c8941737ef4a1208d32c13ce017fe1 ] Commit 417cf39cfea9 ("NTB: Set dma mask and dma coherent mask to NTB devices") started using the NTB device for DMA allocations which was turns out was wrong. If the IOMMU is enabled, such alloctanions will always fail with messages such as: DMAR: Allocating domain for 0000:02:00.1 failed This is because the IOMMU has not setup the device for such use. Change the tools back to using the PCI device for allocations seeing it doesn't make sense to add an IOMMU group for the non-physical NTB device. Also remove the code that sets the DMA mask as it no longer makes sense to do this. Fixes: 7f46c8b3a552 ("NTB: ntb_tool: Add full multi-port NTB API support") Signed-off-by: Logan Gunthorpe Tested-by: Alexander Fomichev Signed-off-by: Jon Mason Signed-off-by: Sasha Levin --- drivers/ntb/ntb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/ntb/ntb.c b/drivers/ntb/ntb.c index c9a0912b175fa..f8f75a504a581 100644 --- a/drivers/ntb/ntb.c +++ b/drivers/ntb/ntb.c @@ -311,4 +311,3 @@ static void __exit ntb_driver_exit(void) bus_unregister(&ntb_bus); } module_exit(ntb_driver_exit); - -- 2.25.1