Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1090017imu; Wed, 9 Jan 2019 11:25:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN60d/lWziuiVkMJM8byCjLQNoJoah9Z2gcZyNlvB4d8AJ/8VFK9q9qNV+rsqadnvvWb10Tq X-Received: by 2002:a17:902:365:: with SMTP id 92mr5371470pld.327.1547061950957; Wed, 09 Jan 2019 11:25:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547061950; cv=none; d=google.com; s=arc-20160816; b=j2gBvhQTWJR1i72fOMFHnv7yocTYar71G8aFdyUzmHyWIGqZRWgPd03ns/Q176NC75 Y4PkDVjS+kBgVrkpD2hHzlPkNXPSMuaamg2zEOlGEBruo+ZIuZnsrSk56tRLNT/rAeM6 9Nqzhl2evdcV+KzztgNpfS+ceq41NYF0sE2pHHEpuw5viEkEQzHQShQiYEVTVbXkz6D2 AFdGEon7v8lB9zMkUlytLMlk8fUCmDj6DBbfJD7U4X11TmJaT/xVDRu/8VLslhfv0dne Q10jjllnK8inIrrThhipPb7HfjQzAb8Q2ppVpUhXfDIbkB58SjEI8ufaTZ1OQfe3lirX ojvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:message-id:date:cc:to:from; bh=OZJC7SS0SRev4urpWv8qAPfHizrujV9+XbLogGZBMYY=; b=vG890wKII6TB6C/cVwTs0ZItgleI7tlEd7YA3JEGPx/uIDMy1cwtjKLGywy3LvlhEZ q+WIyZrEriVKclvdugBU6FTX51GnJqkxb7I9g9ftcEgNsGfW4S3yu8IQh/sf1oz6CAEs bUgOAktfScPr8CEJNyD8ezvjk9kU5xj/+B+siDqlK7jMTO8xTqFcogWtN5tUxJumb+rb XmjY0Cqxf7xV5RNknDJkj71tWspAL1svxWEcidcOgTjyzpZhZHI/Cn/I2sPsXDznRuMa UGcmQVYUGWFBIOuuXST0CYdsV8odJeXch6d2FoPAS7VyajqMFwDSWmZsmFc1jlWjE84+ bKzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z188si50901552pgb.330.2019.01.09.11.25.35; Wed, 09 Jan 2019 11:25:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728547AbfAITXV (ORCPT + 99 others); Wed, 9 Jan 2019 14:23:21 -0500 Received: from ale.deltatee.com ([207.54.116.67]:59702 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728450AbfAITWs (ORCPT ); Wed, 9 Jan 2019 14:22:48 -0500 Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ghJR2-00053o-GE; Wed, 09 Jan 2019 12:22:47 -0700 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1ghJR1-0001Vc-11; Wed, 09 Jan 2019 12:22:39 -0700 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Jon Mason Cc: Allen Hubbe , Dave Jiang , Serge Semin , Logan Gunthorpe Date: Wed, 9 Jan 2019 12:22:25 -0700 Message-Id: <20190109192233.5752-1-logang@deltatee.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, jdmason@kudzu.us, dave.jiang@intel.com, allenbh@gmail.com, fancer.lancer@gmail.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_NO_TEXT autolearn=ham autolearn_force=no version=3.4.2 Subject: [PATCH v3 0/8] Fix breakage caused by the NTB multi-port patchset X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, I'm resending this because I've recently found out that the change we made to use the NTB struct device in DMA allocations is wrong and needs to be reverted. Turns out that, when running with an IOMMU, dma_alloc_coherent() will always fail if you pass it the NTB struct device. This is because the device has not been assigned an IOMMU group and the Intel IOMMU at least expect the devices to be on the PCI bus and be able to find a proper bus-dev-fn number through a struct pci device. Therefore, we must revert the change and I've changed patch 2 to do this and remove the no longer necessary DMA mask adjustments. I'm not sure if we can get past the impass in getting this series merged: I still maintain every patch in this series is necessary to fix a regression and there's no way to add port numbers to switchtec in the crosslink configuration so it can't be fixed in the other way that was suggested. Logan -- Changes since v2: - Rebased on v5.0-rc1 - Modify Patch 2 to revert back to using the PCI struct device instead of the NTB struct device in DMA calls - Collected Allen's Acks - Collected Alexander's Tested-By Changes since v1: - Rebased onto ntb-next (there was a minor conflict in a recent change to the intel driver) - Collected Dave's Ack -- Logan Gunthorpe (8): NTB: ntb_tool: reading the link file should not end in a NULL byte NTB: Revert the change to use the NTB device dev for DMA allocations NTB: Fix the default port and peer numbers for legacy drivers NTB: ntb_pingpong: Choose doorbells based on port number NTB: perf: Don't require one more memory window than number of peers NTB: perf: Fix support for hardware that doesn't have port numbers NTB: perf: Fix race condition when run with ntb_test NTB: ntb_test: Fix bug when counting remote files drivers/ntb/hw/amd/ntb_hw_amd.c | 4 ---- drivers/ntb/hw/idt/ntb_hw_idt.c | 6 ----- drivers/ntb/hw/intel/ntb_hw_gen1.c | 4 ---- drivers/ntb/ntb.c | 9 ++------ drivers/ntb/test/ntb_perf.c | 29 +++++++++++++++++++------ drivers/ntb/test/ntb_pingpong.c | 14 +++++------- drivers/ntb/test/ntb_tool.c | 9 ++++---- tools/testing/selftests/ntb/ntb_test.sh | 2 +- 8 files changed, 35 insertions(+), 42 deletions(-) -- 2.19.0