Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1193829rdb; Tue, 30 Jan 2024 10:30:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IEsjUK+vf+wNH3qd4hBlHKDmh3jlBwlC+pSW1J/TVpObURWs2/hI7oTG1G78DkoXIdrA/sS X-Received: by 2002:a05:620a:10b0:b0:783:e02a:258f with SMTP id h16-20020a05620a10b000b00783e02a258fmr10669478qkk.66.1706639411384; Tue, 30 Jan 2024 10:30:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706639411; cv=pass; d=google.com; s=arc-20160816; b=hbZz+B0DGKir8t2QPqBakBxHOI7HNASgTyFnn/2Phz0d64pOHSd524J5aXXADb2kGH f7O8QmQ8tML+0A/6e1cn8CM2r0+v+aKm4IcJdpvqHg627GuJkqt9uYdGNUXbQ+CcB4d3 n9mQ8TG7wKg8j0rB15JkHZd27QBO5NFI+9TpD0si4Ox0nRv091PcowjCnDKSSeP0qc9T WcMMAp5DWw/LxqxAz4XuMd6jmrb9PxqujHRXyCiXOFwsGxSSAQk00ejxs3zzgHWaXbDx Yg3FUXN/Q2s3yrxAa6OR7Po4YIizpg+ToRO8bBNXxQl4DThAFnBpOSaAR0D3HgoIs/5t IEbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date:dkim-signature; bh=jzhmjEVVCkA7SnApFGgCI1oPVU0r4zHCHCPW8UtIvhg=; fh=YBlZxtiIrshkk8PoAKgf2DqPtYwsjufGkGuxtOJsnfo=; b=kACYenOVe/4XRUfFNfem2CilOAwvGPZgRGl4WzZxdxwHN4FZfmNA1rFzk1IklatULh Auc5nQeXoM5QOezdQ3pXnT8Nkt+aNLZrIrkucswH+xdkSXz/+DFIC7yVj2R40CS640vD /JegEYJl0LyxkSOxQrCGYwLtjD9aFvixzrlaRT3k9qwZSURK1qDs++YNJWIg9Bg8TWIx y39VMo5cHjT0b1/amL5rLCto6lDd4J/P0hEsiu+VcODvNTVIv6lMfHhi3vCDqDHwt5GL 1WoLnb0aScsA8HLxNuaBbV3xAJymRbdDpVxHuOsjPb/BV5PXqQG6Zk/rxG3OeC1c7WNm w4Ag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SfuL+G1a; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-45025-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45025-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. [147.75.199.223]) by mx.google.com with ESMTPS id g21-20020ae9e115000000b00783daaec208si9486768qkm.17.2024.01.30.10.30.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 10:30:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45025-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SfuL+G1a; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-45025-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45025-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 5A1771C2390C for ; Tue, 30 Jan 2024 17:14:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 334E51292DC; Tue, 30 Jan 2024 17:14:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SfuL+G1a" 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 79304128368; Tue, 30 Jan 2024 17:14:11 +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=1706634853; cv=none; b=Ge1Alt2aFkRQ7g6xMHV5CsYwIRfrphYgcdrqFlmcLlaFqC7sOr1Udh0gYBOKrWcr6Yja6zMsXWqUBaOtQANrq6v7/PHChgCnfyLOWXI8clpAKGoeBWSTQjp9WwqAMuUX6hwY/jCIZ28vyeqnYrkKKKFkbOw8gRu7ElM+MA0QwJM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706634853; c=relaxed/simple; bh=ZtnvKA0MBtljWKQs48hUXZdK7+kAzm5mqJcPPFEK4hI=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=kLGWu+9uStWVTiV6bqDwCU7ZUytWMZNKq8KABAmtEdPLqNBD5/jRci0+BdsFUfFgbtnS28SP84HYjy5gzoGRVALBDPKVPG/k2oe4VPyX5cvQyilK2meBP9spLDXWVfshHiS1odRJiwh2yqQMlSYx1ZVgg8fbg8zQsJtP7k+lhxU= 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=SfuL+G1a; 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=1706634851; x=1738170851; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=ZtnvKA0MBtljWKQs48hUXZdK7+kAzm5mqJcPPFEK4hI=; b=SfuL+G1atooWhXXw2MCktYFSWFtObasFYOj2LrDGYpTr+9Z3m99m2QiW 8ujkvYqUuDkCkI4o1t2WtPpwnIE50aWHoMJOu/8u1FRYQ3OkZPY7B5Pno YBOmB/Kq3ZzmZxwMWaAbE5uKhN8P+iOzVFS9Sh+WbU/4KT+ovcEpWCqnu TSH/J1/PPomE7mJNklC3qXtRLdDruqDDqOxnJqqQpma0j7yTB2o/MrXVN PufpQqyDkp+WcD5v5qhN+lNmxOj2nK2dsF5gagoLrnydYPGivip1zpNxg cQUw3+9EBm6V0fIalwLdI0s7nw7BziQ2BbXAhGDPN1X1DDHghxshDAPlO Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="16872223" X-IronPort-AV: E=Sophos;i="6.05,230,1701158400"; d="scan'208";a="16872223" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2024 09:14:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="788259970" X-IronPort-AV: E=Sophos;i="6.05,230,1701158400"; d="scan'208";a="788259970" Received: from sj-4150-psse-sw-opae-dev2.sj.intel.com ([10.233.115.162]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2024 09:14:09 -0800 Date: Tue, 30 Jan 2024 09:13:56 -0800 (PST) From: matthew.gerlach@linux.intel.com X-X-Sender: mgerlach@sj-4150-psse-sw-opae-dev2 To: Xu Yilun 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 In-Reply-To: Message-ID: References: <20240122172433.537525-1-matthew.gerlach@linux.intel.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) 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; format=flowed On Tue, 30 Jan 2024, Xu Yilun wrote: > 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. Using a revision number to indicate the level of functionality for a particular IP block seems to be a widely used approach. What other indicator of functionality level did you have in mind? The revision number of an IP block would change when new functionality is added to an IP block or the behavior of the IP block changes. It would be expected that SW might need to change in order to use the new functionality or to handle the change in behavior of the IP block. Ideally the new revision of an IP block would be compatible with existing SW, but that cannot be guaranteed. Thanks, Matthew > > 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. >> >