Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2114743yba; Mon, 22 Apr 2019 00:12:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0BJ8E+Bi/EM+INiNQ2fi/hNFwSLl2rL/Syc042Zbiu+Q7YLAp+mhvIo/wUoY/qufRLefS X-Received: by 2002:a63:2c4c:: with SMTP id s73mr17557796pgs.42.1555917155226; Mon, 22 Apr 2019 00:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555917155; cv=none; d=google.com; s=arc-20160816; b=LIX37MVTjlVRa83ZvOQLJCECCleiaR0kLqmDMW0Od3TjxaZp5zOEsIbeIBEz8ojFHB X0E3vDHn21SRMtcQLAJUpidQ0+whfr1TqCUO6Tn56GtorNjFhSzDiqIMNwNV0gYTjoKw 4ICQxh4Ez57ZC2EpHqHSttINplTaod8JI3NrA2iUZnzhIu0jFvE/kVYL97wsiSWG74nv qWspbO95kpRfnCo7XS2px/j02qvrBb7gycJ8OWzVDk8Gm+rnKpdj0V2Vp4y3EC+bqYuE c4GJLTEEImMuXIITDgC32dWyRC2mTDfbo8TIdx+QP5vryqOnHHyJrK2SQaSVtLwN8Jgd B5Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=i6sWPR3vHjitvPfgI3eq0MESoD5kG7uZyY+E0HaP/Ps=; b=eINxc3bBQSyu7A8pgFTtYXJ5gKEBJwHBKpGG35/inOj3TxX9eH+3SxFCL0QBYcM8lD K/QcLH8gbnf1LmaCgb6upq+jgSmdpX5LSpjfriQkfPPY/hLtStMCDoSOKrxm+Fzomws9 +nyZcHvEhCUYOeqEhvXn877Ra69xK4UlIP0P0NLV9OnKrneOHPnDHF18ge/BaWFTzF0r Of6DplPkaLc8TY+fedMUs9bYFIPDH/8d0VGVZQjb9mgKtW0Wvb2t9eNAMku0WO3F9/57 vsC/AlH4sYg2RDymiQQa2nKu/qXMDfiKtjl37Sh8UIIL65QyEUxsLFpaX7mvbXwtXjJW Glng== 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 a5si12828132pff.39.2019.04.22.00.12.17; Mon, 22 Apr 2019 00:12:35 -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 S1726801AbfDVGoK (ORCPT + 99 others); Mon, 22 Apr 2019 02:44:10 -0400 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:37746 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726190AbfDVGoK (ORCPT ); Mon, 22 Apr 2019 02:44:10 -0400 X-IronPort-AV: E=Sophos;i="5.60,380,1549954800"; d="scan'208";a="31972701" Received: from unknown (HELO smtp.microsemi.com) ([208.19.99.222]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 21 Apr 2019 23:44:08 -0700 Received: from AUSMBX3.microsemi.net (10.201.34.33) by AUSMBX2.microsemi.net (10.201.34.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 22 Apr 2019 01:44:07 -0500 Received: from AUSMBX3.microsemi.net (10.201.34.33) by AUSMBX3.microsemi.net (10.201.34.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 22 Apr 2019 01:44:06 -0500 Received: from server1.microsemi.net (10.188.116.203) by ausmbx3.microsemi.net (10.201.34.33) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Mon, 22 Apr 2019 01:44:03 -0500 From: Wesley Sheng To: , , , , , , , CC: , , Subject: [PATCH 2/3] ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window for crosslink case Date: Mon, 22 Apr 2019 22:42:57 +0800 Message-ID: <1555944178-1957-3-git-send-email-wesley.sheng@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555944178-1957-1-git-send-email-wesley.sheng@microchip.com> References: <1555944178-1957-1-git-send-email-wesley.sheng@microchip.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In case of NTB crosslink topology, the setting of shared memory window in the virtual partition doesn't reset on peer's reboot. So skip the unnecessary re-setup of shared memory window for that case. Signed-off-by: Wesley Sheng Reviewed-by: Logan Gunthorpe --- drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c index 947ed0b..6cf15c18 100644 --- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c +++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c @@ -1459,6 +1459,9 @@ static int switchtec_ntb_reinit_peer(struct switchtec_ntb *sndev) { int rc; + if (crosslink_is_enabled(sndev)) + return 0; + dev_info(&sndev->stdev->dev, "reinitialize shared memory window\n"); rc = config_rsvd_lut_win(sndev, sndev->mmio_peer_ctrl, 0, sndev->self_partition, -- 2.7.4