Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp927488rdb; Tue, 30 Jan 2024 03:00:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGEASHVt2O8FX4ZCcru3yW1gArV+rOROSqFrtSs4oGk6M/URE8lUq5TIonvcrsmNBYJNLMS X-Received: by 2002:ad4:5ecf:0:b0:686:309d:8915 with SMTP id jm15-20020ad45ecf000000b00686309d8915mr8265933qvb.6.1706612404624; Tue, 30 Jan 2024 03:00:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706612404; cv=pass; d=google.com; s=arc-20160816; b=bWl9lgBIZ+t28dFSdSb3Wc9IRaawybr5YeCelR3HV1+F0KOce4RPK8mSTvJ/q265MK 203IKWVb1xXv0t8S+gVDfgFo61/g/WKcUfhktmhMK9MusUY27JzZ9QkjM9Q3EMFyHoss qcmKtG3+xesz92GZdJ+Cbhxr9rJhdLtmukYAp2kosJixJWH7wCfivNZibp/pL1Mg55gE uDPWICvxRJYK1+ZtAHCaxhgP5Sh5mNKzgM4cmisWrAVlqWnglh8v3ZIIOKfplViUX6L/ Z0cc7BQmgG2lPbNOFNLxmgOxh02Og+/FBeDA6daIRcsNBclT8kQf3jHxq5510W/GaVdl 2ASg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4T+mFBJ3o60uxhGUe8lpTvGhK43cUu/qn/HJ2KhNSlE=; fh=+s7tCB11Iqekzk/xJxMsxmCWWUx2oEdqRoGcJO0ysL0=; b=Sup8nKzGzDX7EgtVibqB94IoaflQnOXvtytKBLRSRmW6pSK0ihAKL5vavmUs0VUMum uI2hnnHhTSFDjcTPWltSuwxJ+KafY9YfxPRDbneyao8MsM3NUhjzwoUW8SAePKiJ4mwB J/hIb0gTcWYbqlRONelM62MdP/gz04jit7WQ41quPnJHC5evvOfHrMb5/WiHy0tNpacl 4qDauq4kDQuN4zApSKgb8aAsz9ARfWT0I1yRR3jS2/EHmcNvB2eQpK5Ip9hi956+nzM0 zo58tOZumXv5CRQ8L06/g4sQcIbI1Vs9Xaai5YBhaEJlq1jMCDnyGDFBS7iU503+evYR sHyA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eypLwKGX; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-44277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44277-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jl13-20020ad45e8d000000b0068c3e46a567si7037885qvb.443.2024.01.30.03.00.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 03:00:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eypLwKGX; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-44277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44277-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9D41F1C2699C for ; Tue, 30 Jan 2024 09:40:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5FFC760DC1; Tue, 30 Jan 2024 09:39:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="eypLwKGX" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 6A4E96086F; Tue, 30 Jan 2024 09:39:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706607545; cv=none; b=PVsflpM5TiWq50b8bSe991PoYREKgkAttSvEljWuP0hHdmfx5rzYRTnqRISu7eMBu2xaG2BLb+ljQI/p0J5JrIX2+ndu8p+0hW2vUyMjhFuWgbNUSrq8HbNLyuTa5HHNTFEIbCn8AQrwpo1P3LSGpak2Ne4fSAXnVyTkEQyb+ws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706607545; c=relaxed/simple; bh=8PcqJlxljF/zb8Mml8cpcqus23dWCdPL2CEfWjg6wIk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HuTh3Q7OIJeArwohURycfQIsRO6vk115TxI8cw3iu/TljlAl/UIRBMCXkII9Dv7zoSNc1hqKnwGAk9JAhBlxpRKTH3CrCWIf8l8hEBxwIxoITJqa1FySADQTqdOACf0UXxmJSjycOVKpdgjl+4klPKAWp1NLtT02h/XxZ7agPjg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=eypLwKGX; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706607543; x=1738143543; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=8PcqJlxljF/zb8Mml8cpcqus23dWCdPL2CEfWjg6wIk=; b=eypLwKGXEw3D8JytZRhy0+EylE6I0Rx5BXUP8fQVBLDeecarglGX0NGO MYbyRg1APoVyW+tX7KbaCcG56PurQJYp9hy2k/PE06183laEYR2davDqh zNQcEa1nra3fZZhbqrpjRtmPAg4L87YLEsVGwew57kDNVzxjBHWK/kPtY 1f07+AYlDm4n4WiGkbW2Tt8JU8OsnuE27bc5bfWyi2mwISq4VNRna0eHw 6ZLVdCXiWedPNA4m0XokmV1D4ibt69uTEnsbs1/hPadBOANMT7hYndkjZ 0TRU9L2UhZh9S9hwqZsw1rbF39YyYMLB2L49o8/cuCiYjZcb1ae86LHTM g==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="16755554" X-IronPort-AV: E=Sophos;i="6.05,707,1701158400"; d="scan'208";a="16755554" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2024 01:39:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="878382637" X-IronPort-AV: E=Sophos;i="6.05,707,1701158400"; d="scan'208";a="878382637" Received: from yilunxu-optiplex-7050.sh.intel.com (HELO localhost) ([10.239.159.165]) by FMSMGA003.fm.intel.com with ESMTP; 30 Jan 2024 01:39:00 -0800 Date: Tue, 30 Jan 2024 17:35:35 +0800 From: Xu Yilun To: matthew.gerlach@linux.intel.com Cc: hao.wu@intel.com, trix@redhat.com, mdf@kernel.org, yilun.xu@intel.com, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fpga: dfl: afu: update initialization of port_hdr driver Message-ID: References: <20240122172433.537525-1-matthew.gerlach@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jan 24, 2024 at 11:40:05AM -0800, matthew.gerlach@linux.intel.com wrote: > > > On Tue, 23 Jan 2024, Xu Yilun wrote: > > > On Mon, Jan 22, 2024 at 09:24:33AM -0800, Matthew Gerlach wrote: > > > Revision 2 of the Device Feature List (DFL) Port feature has > > > slightly different requirements than revision 1. Revision 2 > > > does not need the port to reset at driver startup. In fact, > > > > Please help illustrate what's the difference between Revision 1 & 2, and > > why revision 2 needs not. > > I will update the commit message to clarify the differences between revision > 1 and 2. > > > > > > performing a port reset during driver initialization can cause > > > driver race conditions when the port is connected to a different > > > > Please reorganize this part, in this description there seems be a > > software racing bug and the patch is a workaround. But the fact is port > > reset shouldn't been done for a new HW. > > Reorganizing the commit message a bit will help to clarify why port reset > should not be performed during driver initialization with revision 2 of the > hardware. > > > > > BTW: Is there a way to tell whether the port is connected to a different > > PF? Any guarantee that revision 3, 4 ... would need a port reset or not? > > The use of revision 2 of the port_hdr IP block indicates that the port can > be connected multiple PFs, but there is nothing explicitly stating which PFs Sorry, I mean any specific indicator other than enumerate the revision number? As you said below, checking revision number may not make further things right, then you need to amend code each time. Thanks, Yilun > the port is connected to. > > It is hard to predict the requirements and implementation of a future > revision of an IP block. If a requirement of a future revision is to work > with existing software, then the future revision would not require a port > reset at driver initialization. >