Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3152953imm; Fri, 20 Jul 2018 11:02:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc75tjJaTWj7pEpcJTmyAmUXL6vkPN5UNTT4RqS3UKb0d7z/Ye6qx07CkGbdO2LzwKTi10n X-Received: by 2002:a63:440a:: with SMTP id r10-v6mr2980681pga.27.1532109771669; Fri, 20 Jul 2018 11:02:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532109771; cv=none; d=google.com; s=arc-20160816; b=qHfPTKux6UXz0N4nAYHZJP1SpucmkvDTHHAIkJdBtruMI6Y9SyKZzWX1IyUiuj3qVe nuoDvlnVraJz82g+/6bb/9Yz1ex+o8sBt59Zb5uW32t9YX0nh6UvTShVkVgOSt6/SEZ4 pFK4iiP2rEA1rrBXzlEvwxcY87EDJ3rKUtw39t78UO1HV4BV4VuRj/Z3Mi2T3WYLS0pf AJQa2b8H23vEEPUE0IUUl14392ntc2uj2gLM65dVE2p5lS4Mk+Z5JkNcMppX5r6f0dlB VntcXSs2QjemYLmIW21ij0Wqs7wbmo6r9k5v5S5pMT2jKC9pUN8szQTRIAhz2esFtOp6 d2RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:message-id:date:cc:to:from :arc-authentication-results; bh=/W/43ycfCCoQgNvBKVjT+XEzmbcjYLiF/NCfQz2Kpq8=; b=bjap3vS17UqCTjI/saotcRWFdwjDlfQyNzr6ZbHp68JCquyYjRSD6J99yeJns5rhW3 sspvKxIPMFLo2olYb3weG2mAMRrpbW8MuYrt4G86XjY3gQBiS3C/EcRU8vemEUH5PGzE eBZYxKsiAEFcMeMbyg/UVQDyg0si8mCQw7wWdolbqHGRGWeLpf1Lfb9juupxEhZu0HXF M6w9h+bynIGV+wOTgMYg1hHdOK7Ay3YZBs+dmc/DyiyzG0ukduPgzpdbZ9CC9cDH+UFd j/utfZDydjUaegZvpHSaDcBngJXDCGACtU5M+4bi5MsV0ABTglugCTyl+4/bqmt26mth FhAA== 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 b2-v6si2362493pgc.541.2018.07.20.11.02.35; Fri, 20 Jul 2018 11:02:51 -0700 (PDT) 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 S2388486AbeGTSul (ORCPT + 99 others); Fri, 20 Jul 2018 14:50:41 -0400 Received: from ale.deltatee.com ([207.54.116.67]:38344 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388244AbeGTSuD (ORCPT ); Fri, 20 Jul 2018 14:50:03 -0400 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 1fgZhn-0008E0-0V; Fri, 20 Jul 2018 12:00:41 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1fgZhk-00012l-JJ; Fri, 20 Jul 2018 12:00:36 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Jon Mason Cc: Allen Hubbe , Serge Semin , Shyam Sundar S K , Shuah Khan , Doug Meyer , Logan Gunthorpe Date: Fri, 20 Jul 2018 12:00:26 -0600 Message-Id: <20180720180034.3964-1-logang@deltatee.com> X-Mailer: git-send-email 2.11.0 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, allenbh@gmail.com, fancer.lancer@gmail.com, Shyam-sundar.S-k@amd.com, shuah@kernel.org, dmeyer@gigaio.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) 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.1 Subject: [PATCH v2 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, This is mostly a resend. To reiterate the main points on the feedback: the switchtec driver, in the cross link mode, will not be able to implement the port number function callbacks and will have to always return 0. It's a physical impossibility due to the symmetry. Therefore, in order fix this feature (which worked when merged), the clients must be changed to support not knowing the port number in the way they worked previously (ie. a legacy mode where there will only be two ports and you know there will be two sets of doorbells, one for each peer). The majority of this patch set fixes these issues. The other point of controversy is the dma mask. I still strongly disagree with doing it in the driver as the code is clearly common to all and not at all driver specific. Moreover, I think as written, it is extra dangerous seeing all impleminting drivers are operating on the new struct device before it's initialized in ntb_register(). Patch 2 in this series also fixes that. Logan -- 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: Setup the DMA mask globally for all drivers 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 | 22 ++++++++++++++-------- drivers/ntb/test/ntb_perf.c | 22 +++++++++++++++++++--- drivers/ntb/test/ntb_pingpong.c | 14 ++++++-------- drivers/ntb/test/ntb_tool.c | 3 +-- tools/testing/selftests/ntb/ntb_test.sh | 2 +- 8 files changed, 41 insertions(+), 36 deletions(-) -- 2.11.0