Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1470521rdb; Tue, 30 Jan 2024 22:16:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAsePXCOzP9tbxk9s6uvHL/jX7T7QXVeFJF0hfEqKd36ZFzl8Y6//Keh/mfGY7kzeZHOYm X-Received: by 2002:a25:6812:0:b0:dbf:164a:e3b2 with SMTP id d18-20020a256812000000b00dbf164ae3b2mr846307ybc.33.1706681771665; Tue, 30 Jan 2024 22:16:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706681771; cv=pass; d=google.com; s=arc-20160816; b=jF+tTpwRgE+FAZXwIYDW50NR6+Vnr2tEXlXtiwdWKvUfwbdFWnc5mgBSj+zFX8O8tG +muGjh0SCEG00C/tSnZNGIZxs3EKjQ+wdNZNLXwv7FHf2F0PRNfDtlpfx79aEKICQ6xZ yVzH/8Pyb/41+/JIfLeF+l6E2UHDMoonDmyt0W70Qt6jenGXepCFqh6aNWCuW4WFPlaS ggQF8fqhu6zCcZVBfV9YJqyzBkC19A7pQxMrW8lFS40/FAGNpA+RhUVW+YfznXXMKtBx atXI/dXXd3WAiXGf38O/7S0B9lElWdzdQc7lUW7PH4egRV+RaD9cEEgL5ZxdYRMjLLX3 sTTQ== 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=t22Y2Qoq5bmiZe5+UjBAWIFYCEPrZOpiVUZM7FZvQSY=; fh=ASGX2lR+cMaByMs5h3R78ietnGQkxHY9UZAI0AenH9I=; b=Li1eRJ7g8uaGrmdrdecGQHNbLygVo/CW3M1OMaRUn+dL+tExd/oG1nQvTVlvvF1fvI pPtDFq+7jqEixpm8P6BkbT6HTcVqFd6WpUEHGTEKt1OeSYaKAEUYscTUnsfYnZUexNLL 0UfISW9crlqtwA1vzJQbTQTug0BewSb4Vfi9UIN6kTV/wOS3K7Tx8sWbJFVSxPMWwHnP obbvYpriSjis8CcVRpFfUTkyHUUWaHKNc6l0HRPAJmPdi/beso6e1IsZIksd1y3kLcR2 eGNJuwDHb6fxMY8FIAg8L3Ald+ZJm8beXly501pTUS7ibNKuEm5dIBR7bnBJFSKD+9Di qiPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Td4WUMu+; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-45752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45752-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCWGdcdu0Vj/PfkhynEIgBZLwpo90JwgeUnuEuTmYom3Q4lAc2MUy1rjTsKaT9xw1I/HrOtGs7IbQHlANDpFcy9Up0U+sS6Rls5QEFRMKA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id n29-20020a638f1d000000b005cdfaea88adsi8670059pgd.774.2024.01.30.22.16.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 22:16:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Td4WUMu+; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-45752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45752-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 290FFB2589B for ; Wed, 31 Jan 2024 05:03:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC3F53D0BD; Wed, 31 Jan 2024 05:03:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Td4WUMu+" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 6D88B3D0B3; Wed, 31 Jan 2024 05:03:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706677397; cv=none; b=B7HvCFaYhHa8m1WZRQJRwjyIWllqwCLAp8PryGrDYgi44547cnAiJZPDMJ3wA1hha8AaAWul+hQNNL8kuKMDiEUAJtgnK50tl+xwT3nwVGp6SBUZc4wMbdYNHhkHdr+OneNa5ZCaxcftB2srXxzN5z4rvLFbj3HdERTZnOJvkRM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706677397; c=relaxed/simple; bh=3A3KWNJcACtPoEMNnBT3nWG60WJk0RJJbmzMM+Klf5c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=r8bARrehmFk/G9zEjAnISAVumNVcHKPBtEzYD9YbMtCjRbI2hSUnDFFk/4LNcfSsd/V2/3EoNZTFo3ADnylNZ+9AHuCfP/my3YqJuurhdoMvT5GU/C+XNjI8uhtSZe8wQAHnnslv47UnGAA8smg1EIdF1F9rvVYUhp6oB19nx1M= 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=Td4WUMu+; arc=none smtp.client-ip=198.175.65.9 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=1706677396; x=1738213396; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3A3KWNJcACtPoEMNnBT3nWG60WJk0RJJbmzMM+Klf5c=; b=Td4WUMu+CCHY8qqu/K4VfmVMlWuMnPgtLJBDCaiqX2M7W3BOUBNRe69r cWy/L/mXGjD/EVn1I3kUS5or5I7j3RZ7uZpPsClnnEGoobAii3M2UsX5V 9pUFqLH7s6NSPRRs0GZZ+PBXN5HGuKAOAUQCFvtzRLWVT7eDDYOlgCFXG DMot532C0CYZZ6/b/uZJ01gIQ3Q2EWpi1z5ijq1SHh0UpRUWdK5J0c0rv CijBXbV7+YbyEtJRvxuCGpNnW4hCzlnLm9KosoHrMCfc8SdVuxinI62Ni 9f+0bXBtgod3ExZzoFPuIjHhg/hvjHBjk0qm6Xv6J4dN3xPlkEEcwbHGa A==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="22004111" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="22004111" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2024 21:03:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="36737953" Received: from yilunxu-optiplex-7050.sh.intel.com (HELO localhost) ([10.239.159.165]) by orviesa001.jf.intel.com with ESMTP; 30 Jan 2024 21:03:12 -0800 Date: Wed, 31 Jan 2024 12:59:45 +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 Tue, Jan 30, 2024 at 09:13:56AM -0800, matthew.gerlach@linux.intel.com wrote: > > > 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 If you still want to make the existing driver work, some capability indication would have more compatibility. That's more reasonable approach. Or you need to change existing behavior for each new revision, that's not actually widely used. > of functionality level did you have in mind? I'm not trying to make the design. You tell me. If finally no indicator could be used, we have to use revision number. That's OK but make SW work harder, so I'm asking if anything could be done to avoid that. > > 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. People make the IP block, and be compatible should be the concern if it want upstream support. Thanks, Yilun > > 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. > > > > >