Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp423873ybv; Wed, 5 Feb 2020 07:56:14 -0800 (PST) X-Google-Smtp-Source: APXvYqxhJ9FwHagpbW+TK/4MeSajdojxlkIlqnGAHIGyOedehuI6vfFJsXq8sr5C3wzGL8FnlW9O X-Received: by 2002:a05:6830:1e2b:: with SMTP id t11mr27353802otr.81.1580918174666; Wed, 05 Feb 2020 07:56:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580918174; cv=none; d=google.com; s=arc-20160816; b=RR/onpbRxQyWjyb1pLJ19bTVFwK+Uvxm+MTYJ6ar0d5NgORWIeMtTyMHziuB411sE3 8df1VKK0CNrzcgewWAcQvDDe6cnObi7GAonQ37NsoLscD3ZUrzJwX+79qQzjWX8s8J0b 4K8yPktJAZcg0ci/3J4nwOwIepNuTwX3tIyLxYkgMX6Viia4Gzy3po2OnsdtCunsgiRs HYq/sYVU6U5zhQNjoJU4EEeIpr3eJ8cKKWhWTOETlHQjt8d+w5ckZuCMJiJ1zvBObiKl MWqaCOwaNpfpurwQ4RafNXfVRTDdwTgV9k/o0C2jXBqT/G4Cxglbcy+7YnTV4pM6tAr3 M8fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=OeTbs3cyKvuyu1XTWoXkCtNxO0aHwZN3JCJHavQfBCU=; b=xJaE5/6elfDq1+4sGrplTnjIkNKakoS+Is+GB6c/b1A5+/6cUUtlHMebC7E65NSp7F AVSOB4vNhDT8BrTq+bfcGYbtJxA0ELfTc2zZ/MfYx8wWbVCNUG/yjSM1wW3xCbncFzIl EeUZgltj7kxUyIyc2AOrVi8el/zwMp2O5Dyd1cu0la7ZPk8hhaI1ZQtILjw2aoYlymkM vfh35WAxFUeWB89QWxnBggz4yVV1VDR+azi8M5WXHN0qS0Edsnr9zToyumF421vuhHu2 epkBqzeCcOv9aMBAg4WiMNLPk3u6iiyyF3XIa965ik9qU8L1dDHF5Ie5ujMH0ijhO5x1 pE5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=tSxQWHB0; 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 c64si234600oig.178.2020.02.05.07.56.02; Wed, 05 Feb 2020 07:56:14 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=tSxQWHB0; 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 S1727517AbgBEPy7 (ORCPT + 99 others); Wed, 5 Feb 2020 10:54:59 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:41638 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727496AbgBEPy6 (ORCPT ); Wed, 5 Feb 2020 10:54:58 -0500 Received: by mail-pg1-f196.google.com with SMTP id l3so1158201pgi.8 for ; Wed, 05 Feb 2020 07:54:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=OeTbs3cyKvuyu1XTWoXkCtNxO0aHwZN3JCJHavQfBCU=; b=tSxQWHB04iYdusKGhVDF8HMwDTDEg0zV1A/JgtCqp2RNswNnWy2lPPeVDgG1U4ciMp S1442X0kj37yAgGsopVkcbSas1VGMoRsmtaIhuoIN0r5FkT1k9QwAwbEu8j8MEz0h1ti ULJqfBSFIqkaweNLnXs0rnRAsrDQWbLdoJqn0dW7NyirCHjjqvTlwJHgqU3boBikD8Q7 Ny4WZ5J3PEuHXiDvv76MTiZ9q4OhFLeOywte1WxAnDmNUDlnbNFyAlndQI2/0Y1rGOv/ NG4arpI04qinlAFilZmbJ5IKdmbTsefBaFkBHarRIT2QqCZMuv4OtFKnqgLX1ciZ+T+7 vOgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references; bh=OeTbs3cyKvuyu1XTWoXkCtNxO0aHwZN3JCJHavQfBCU=; b=GZ7NHa0M0ToSy9ruIX8NACz38AkVFf9qEUmjH2uJ1vQwQnLlTev2Xhc3XDXaH+ARSx 1o/NWZzzLEegbO+yOa+Pi6/MO85GOkwB0QNCGM63oHMzUAxbnbxnnBWv0HZLdzQKhSlk W5sibBoeIghelXXnB9OEBj43E1DdPbPFxckQnqJrbAvtGvkUMi0k1O66ec5+VfUNNBqI 6toeMQkfHB1qjFFqlRzNqbKRj7lHUPxQh4WQVTseHmKdauV3Sf5uj5z857Mq1iivepkz tur7wwck+81W1Ps4a4QtZPRTQaM2W8KXBYcjNG8+uQ9J/j2VRtzORF9Yr5kETcTruj4F cZ7Q== X-Gm-Message-State: APjAAAW2J019I+X0P8sJxuCKcSI560huaT6qkpuD4/N/yLnb1okXuT2b F2L/g56EXQLABRl9pIM5Fuw= X-Received: by 2002:a63:1101:: with SMTP id g1mr35938303pgl.435.1580918097602; Wed, 05 Feb 2020 07:54:57 -0800 (PST) Received: from emb-wallaby.amd.com ([165.204.156.251]) by smtp.gmail.com with ESMTPSA id z10sm195678pgz.88.2020.02.05.07.54.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 07:54:57 -0800 (PST) From: Arindam Nath To: Shyam Sundar S K , Jon Mason , Dave Jiang , Allen Hubbe , Jiasen Lin , Sanjay R Mehta Cc: linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org, Arindam Nath Subject: [PATCH 03/15] NTB: Enable link up and down event notification Date: Wed, 5 Feb 2020 21:24:20 +0530 Message-Id: <1fb68eb0ee7ee636ab92bb0b3b7340c56f4a20c3.1580914232.git.arindam.nath@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Link-Up and Link-Down events can occur irrespective of whether a data transfer is in progress or not. So we need to enable the interrupt delivery for these events early during driver load. Signed-off-by: Arindam Nath --- drivers/ntb/hw/amd/ntb_hw_amd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/ntb/hw/amd/ntb_hw_amd.c b/drivers/ntb/hw/amd/ntb_hw_amd.c index 150e4db11485..111f33ff2bd7 100644 --- a/drivers/ntb/hw/amd/ntb_hw_amd.c +++ b/drivers/ntb/hw/amd/ntb_hw_amd.c @@ -994,6 +994,7 @@ static enum ntb_topo amd_get_topo(struct amd_ntb_dev *ndev) static int amd_init_dev(struct amd_ntb_dev *ndev) { + void __iomem *mmio = ndev->self_mmio; struct pci_dev *pdev; int rc = 0; @@ -1015,6 +1016,10 @@ static int amd_init_dev(struct amd_ntb_dev *ndev) ndev->db_valid_mask = BIT_ULL(ndev->db_count) - 1; + /* Enable Link-Up and Link-Down event interrupts */ + ndev->int_mask &= ~(AMD_LINK_UP_EVENT | AMD_LINK_DOWN_EVENT); + writel(ndev->int_mask, mmio + AMD_INTMASK_OFFSET); + return 0; } -- 2.17.1