Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp507742lqt; Thu, 6 Jun 2024 09:42:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAmvl/MWlu+CokTdixw/LuGuJj/GNwJvs9vtB6eop1kuTLAGwbbSYh6TFCrnRCdqSh3bhF7CeSu7pilGG9JreCu/q81pZI3nkA7kMhYQ== X-Google-Smtp-Source: AGHT+IG8td1KfVXAh9lER0PeyJMtoaIAmVfyVT/gujuayvaN0J41NKyjYcmGuwYk7jgU1ENde7d7 X-Received: by 2002:a17:90b:3114:b0:2c1:b16e:7567 with SMTP id 98e67ed59e1d1-2c2bc9bdac0mr67163a91.9.1717692157425; Thu, 06 Jun 2024 09:42:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717692157; cv=pass; d=google.com; s=arc-20160816; b=zx5EUu2frMfAZmiKGjUHPiHqXpAGewV7eqSKTUcU5SfmQW+rp+DdaDgx8uicosIh5K dtrmZO6NPAauIftNuMLiOSg9lEq2+w7UMs/904MM403W5DoJvJI3aVFEyaSEIVL1tNsY LNnqW1a3LZnAWlG+NMbXoYDOYw9P3+3PFpkq5o7lKOnRrv98IdWGkHgszfo5DZZEqD+4 A6uMKFkQaz0dSa7azLPBytzvLZCRkvQHNqfUmmyaeBwWbHlQcGxbk3mM6BYq30NxmU3I Ty37cPzCwjO9ndRDhW22id8ME60qmtMyHboVWwWOOtT7DvnnDo5dcvCK/CNm0QonP8AI KCIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=sMXx5rW7u4HlQEyZ10R2KLdRsX4dbVpX6U7YoYtfi2E=; fh=4hfY0i7DQHYEbsIR20li5lmcQJ9QOnRLsLXzO7xpuPU=; b=frQRubD2Rm53PnI3BKD385SqXlgGnLIaLnYUnsWyFRp9yIslnsuvIWXwaYok0zVbZh sFR2QwJmUisrr0zgkTJKKxGQItAN0FoVnMrReLxMhBSmK0OktSZ0q7zHlDa98ZvsbB4a xY2xAoyoS1Aaynj9pe4ZXTy5JYe5sfyOsMqUIJLsYa3Zc1+XG1JvTU9JW+1ZukGtKz0J 6PeFXOD1cCBMWwCHnJZYylEgcGtcCA4yk9+ErhAN0YkJHOzp1RiWz6q0w+zYhP8pzCEW phrNhRdcA+3EDzXrvFqByKDM5xn2jIMrEyFz7W8PZhmGAngXsLmcJcxhu1LsjP9xr8yL JkTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YoQzvTM+; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-204715-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204715-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c2806334dcsi668632a91.27.2024.06.06.09.42.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 09:42:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204715-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YoQzvTM+; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-204715-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204715-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0E114284380 for ; Thu, 6 Jun 2024 16:42:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21C77198A0C; Thu, 6 Jun 2024 16:42:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YoQzvTM+" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB220197A8A for ; Thu, 6 Jun 2024 16:42:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717692141; cv=none; b=nI2Z+9lYvy7F8YpSkPYobpgGZi/y0lUjqNaDSiSRuBcsoM/bFPat08ml+B7ysfOl6ajezxNQlptANYX2nv3dmKCYfbtvU+Ys99htoRLtoWzimPJ2NoNp92z9wBJ/iL3rDpPW9S9/GzRB/cK3KpVka7tnxHfM5HohVq4GQMHflrk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717692141; c=relaxed/simple; bh=cWpzDaeOq4hbqXwXasp7bZKjFceO8AZcWZsT9YOGBX0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=RcwFIBiMPtRbBRUJhSWBzppJzp1bt4zT6ZL/V/q1WbzJpy5WZnHZY/HI3vQ69wvmfwqddaCp2CbQAkhqSdcqUSnx8klYA1zkQ3uYpNkavlMAKBPD8GUio11ZkqZBd3LEDpi/zfmx2A/7XV3zf3V5leGo9SriY+Gt66lDO09aYb0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=YoQzvTM+; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717692140; x=1749228140; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=cWpzDaeOq4hbqXwXasp7bZKjFceO8AZcWZsT9YOGBX0=; b=YoQzvTM+v2pfk0i0phXkf8Jde795ieG2TKPpravSV+TqtjEdEcStWRvL h+SlNXAuYdEdTUkTcB49VKcmEiCOkREqtVG7TlIH/QsB6lkdLHHAnjP3S mpxYdOIq9+rjORKhFiEk+hyQsNi9cwALsmdi8zUPUvInyVP4JTS40HIAv jQH/FiWgE3MGd+jtWSGmpG/BvT+V9/dw6zQnmldA75lueVWm8RTxRRkpG p3N2f3K2iA7KVBWtYgU6jgjq/FPOt7cbDWHjuc4WpSW2BXXui50ywSS3t ymveJ6JRw/rUVed054rE7dTnfN5Rqmcq8zwCROzvWU7q7eJT0wf2m1AOA g==; X-CSE-ConnectionGUID: HopaGxQsR0ahw10XlFo/mw== X-CSE-MsgGUID: j2HNiaZATOaUodJmfNREAA== X-IronPort-AV: E=McAfee;i="6600,9927,11095"; a="14219754" X-IronPort-AV: E=Sophos;i="6.08,219,1712646000"; d="scan'208";a="14219754" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2024 09:42:19 -0700 X-CSE-ConnectionGUID: 2ZvPuiBmR8CKGoCENhdyrg== X-CSE-MsgGUID: A0TgiLWLRteTMIG6A7t1fA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,219,1712646000"; d="scan'208";a="38708199" Received: from djiang5-mobl3.amr.corp.intel.com (HELO [10.125.109.168]) ([10.125.109.168]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2024 09:42:19 -0700 Message-ID: Date: Thu, 6 Jun 2024 09:42:18 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ntb: intel: Fix using link status DB's To: n.shubin@yadro.com, Jon Mason , Allen Hubbe Cc: Nikita Shubin , ntb@lists.linux.dev, linux-kernel@vger.kernel.org, linux@yadro.com References: <20240606-ntb_intel_db_fix-v1-1-ba9033aea289@yadro.com> Content-Language: en-US From: Dave Jiang In-Reply-To: <20240606-ntb_intel_db_fix-v1-1-ba9033aea289@yadro.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/6/24 1:15 AM, Nikita Shubin via B4 Relay wrote: > From: Nikita Shubin > > Make sure we are not using DB's which were remapped for link status. > > Fixes: f6e51c354b60 ("ntb: intel: split out the gen3 code") > Signed-off-by: Nikita Shubin Thank you for the patch. Reviewed-by: Dave Jiang > --- > Hello Dave, sending a patch as planned. > > Thank you for looking into this! > > Link: https://lore.kernel.org/all/686c55cc658564e8f37147e0d6d5ab62bb8372af.camel@maquefel.me/ > --- > drivers/ntb/hw/intel/ntb_hw_gen3.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/ntb/hw/intel/ntb_hw_gen3.c b/drivers/ntb/hw/intel/ntb_hw_gen3.c > index ffcfc3e02c35..a5aa96a31f4a 100644 > --- a/drivers/ntb/hw/intel/ntb_hw_gen3.c > +++ b/drivers/ntb/hw/intel/ntb_hw_gen3.c > @@ -215,6 +215,9 @@ static int gen3_init_ntb(struct intel_ntb_dev *ndev) > } > > ndev->db_valid_mask = BIT_ULL(ndev->db_count) - 1; > + /* Make sure we are not using DB's used for link status */ > + if (ndev->hwerr_flags & NTB_HWERR_MSIX_VECTOR32_BAD) > + ndev->db_valid_mask &= ~ndev->db_link_mask; > > ndev->reg->db_iowrite(ndev->db_valid_mask, > ndev->self_mmio + > > --- > base-commit: 2df0193e62cf887f373995fb8a91068562784adc > change-id: 20240606-ntb_intel_db_fix-036299fabc48 > > Best regards,