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.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 C1A4FC433E0 for ; Thu, 18 Jun 2020 01:55:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A078A221FA for ; Thu, 18 Jun 2020 01:55:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592445351; bh=csJ8IE/XOc4BW2uiPxYot+bTQhRZhV07EeUQSgae858=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gJNEpSfX8q6Z+TXD6vAFf+92b9YmKan2KzynY21tJHfAoaRXgNTGXcALVf0sYimuN 3JXvedk/040NSCHVYEWSpIPMf/Vqv6eZmTFyeBLuYsHv+4lkEYrbxgowOiD8ic/KzC Jx4v4gojlgpU9pG9p7kk3rkQgupy/ZkTsZ2SBbv8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729737AbgFRBZj (ORCPT ); Wed, 17 Jun 2020 21:25:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:60946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731477AbgFRBZi (ORCPT ); Wed, 17 Jun 2020 21:25:38 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A566C2075E; Thu, 18 Jun 2020 01:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592443538; bh=csJ8IE/XOc4BW2uiPxYot+bTQhRZhV07EeUQSgae858=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=asKxOOlUz4k0MNjMzhafx8NgOTbRbexa9eXudcm/YEOKtcLjnpQWIj0x/eztRCJWO yUzWzbgICnFAP8rPQrjZEePYI6Q2K3nYHiilrQv9+1mL/O52SImMFT15vjOZW6qKZI yjFUNaox/WhZu9scXp3QdLGfkY2Gvs+KRofAZz0o= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Logan Gunthorpe , Alexander Fomichev , Jon Mason , Sasha Levin , linux-ntb@googlegroups.com Subject: [PATCH AUTOSEL 4.19 156/172] NTB: Revert the change to use the NTB device dev for DMA allocations Date: Wed, 17 Jun 2020 21:22:02 -0400 Message-Id: <20200618012218.607130-156-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200618012218.607130-1-sashal@kernel.org> References: <20200618012218.607130-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 c9a0912b175f..f8f75a504a58 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