Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp296150pxa; Wed, 19 Aug 2020 01:14:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyD8ronwOB/KDmOYBZevQvUhwbjQ/Q0UMYhxk0zbUh3wkrmH1v2jjs31rZDC4laT7G0aq62 X-Received: by 2002:a17:906:938f:: with SMTP id l15mr25169142ejx.539.1597824888356; Wed, 19 Aug 2020 01:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597824888; cv=none; d=google.com; s=arc-20160816; b=y659jd0d7XwZa8LBi0G4lJtKk0GajIoJOUPLzadRlSQ+nD2U9mpfXMPXlapsMp0XVc 4g+vOcpSGh+aNreSzGnVULV1WxT8/JXEE4E0UyxGt0Zy6DX0o8+CTCPavE2G8DrrPREP pRAOZZmwW0+y5+xI15V7vIhZ+6tCU9zeCo+qtaTOk99gH0uSE6RukVQIPh5Ybb04yk5Z vL6p8pQAo7WKfDZeI0ISc+ndBQrTz8q2kKPO1F+/1SC2/ouCXHaw5IO840HCjP2A/Z4I aK6pOnLPg7s7lVXKOVmL9J4kh0xgpQmdZyWG72e6dtqx+cHww6QKHfgL9BHBZNRI9JSU wnbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=mGgSDyW0D3jts9n/7TlZXKi0MuOiqLmfBkvKEiymp8w=; b=q2qCD+OPSCnwE4rVSw7/A/yrAfbNAmsuSKw2glIFRzt5UkgHF9NNqr1bRnQ8dYKgYb Lcy+92gGnbhQaSQP3h+IbBkKPuwMeXGLRwcTn4qdppBAu2hDmIZxT5OkRVp3Dzyoy5ON ZuTeOKakToy024RqobFFVOS2hcFkc5PKPdJuPGE1qxQjpOuf8GbVFMAMsq0G9644iHXA p8Ze6fy7P9RlDMcvflXw7t0Tj8EsQCUHhOk2vH1tzcrO6H7cD+0Mbq8v3hglO31qoAjV Qc+M9NlGahi43UH3OxBxLJA9ATCVX1q/3PDgjFALS0jfbHB7ws3wTSs4kTbzGTL4CvI3 MNEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si14169259edq.275.2020.08.19.01.14.24; Wed, 19 Aug 2020 01:14:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726750AbgHSILp (ORCPT + 99 others); Wed, 19 Aug 2020 04:11:45 -0400 Received: from mga07.intel.com ([134.134.136.100]:41893 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgHSILo (ORCPT ); Wed, 19 Aug 2020 04:11:44 -0400 IronPort-SDR: LsiHm9uPnCT031TueHu3RcAByriBCoLlCzGXCtk7IhtLn0JIuMCbpmWV5nEtE0owFl08Io0b1T dcy8GNhTzSfQ== X-IronPort-AV: E=McAfee;i="6000,8403,9717"; a="219370985" X-IronPort-AV: E=Sophos;i="5.76,330,1592895600"; d="scan'208";a="219370985" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2020 01:11:43 -0700 IronPort-SDR: Z49Pch4lxOJzp3iUslwLCb8yl1WixJSdDwf+46h89vYah7xh4AOWplzcjfLtdXlQRCnaj1ZKHC q3FE/Iv7gkYA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,330,1592895600"; d="scan'208";a="497674177" Received: from yilunxu-optiplex-7050.sh.intel.com (HELO localhost) ([10.239.159.141]) by fmsmga005.fm.intel.com with ESMTP; 19 Aug 2020 01:11:41 -0700 Date: Wed, 19 Aug 2020 16:07:54 +0800 From: Xu Yilun To: "Wu, Hao" Cc: "mdf@kernel.org" , "linux-fpga@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "trix@redhat.com" , "lgoncalv@redhat.com" , Matthew Gerlach , "Weight, Russell H" Subject: Re: [PATCH v6 3/3] fpga: dfl: add support for N3000 Nios private feature Message-ID: <20200819080754.GB11659@yilunxu-OptiPlex-7050> References: <1597653612-5064-1-git-send-email-yilun.xu@intel.com> <1597653612-5064-4-git-send-email-yilun.xu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for your review, I'll fix them. Only one comment inline. On Mon, Aug 17, 2020 at 05:43:51PM +0800, Wu, Hao wrote: > > Subject: [PATCH v6 3/3] fpga: dfl: add support for N3000 Nios private feature > > > > This patch adds support for the Nios handshake private feature on Intel > > PAC (Programmable Acceleration Card) N3000. > > > > The Nios is the embedded processor on the FPGA card. This private feature > > provides a handshake interface to FPGA Nois firmware, which receives > > retimer configuration command from host and executes via an internal SPI > > master (spi-altera). When Nios finishes the configuration, host takes over > > the ownership of the SPI master to control an Intel MAX10 BMC (Board > > Management Controller) Chip on the SPI bus. > > > > For Nios firmware handshake part, this driver requests the retimer > > configuration for Nios with parameters from module param, and adds some > > sysfs nodes for user to query the onboard retimer's working mode and > > Nios firmware version. > > > > For SPI part, this driver adds a spi-altera platform device as well as > > the MAX10 BMC spi slave info. A spi-altera driver will be matched to > > handle the following SPI work. > > > > Signed-off-by: Xu Yilun > > Signed-off-by: Wu Hao > > Signed-off-by: Matthew Gerlach > > Signed-off-by: Russ Weight > > Reviewed-by: Tom Rix > > With some minor fixings below, > > Acked-by: Wu Hao > > Thanks > Hao > > > --- > > v3: Add the doc for this driver > > Minor fixes for comments from Tom > > v4: Move the err log in regmap implementation, and delete > > n3000_nios_writel/readl(), they have nothing to wrapper now. > > Some minor fixes and comments improvement. > > v5: Fix the output of fec_mode sysfs inf to "no" on 10G configuration, > > cause no FEC mode could be configured for 10G. > > Rename the dfl_n3000_nios_* to n3000_nios_* > > Improves comments. > > v6: Fix the output of fec_mode sysfs inf to "not supported" if in 10G, > > or the firmware version major < 3. > > Minor fixes and improves comments. > > --- > > .../ABI/testing/sysfs-bus-dfl-devices-n3000-nios | 21 + > > Documentation/fpga/dfl-n3000-nios.rst | 79 +++ > > Documentation/fpga/index.rst | 1 + > > drivers/fpga/Kconfig | 11 + > > drivers/fpga/Makefile | 2 + > > drivers/fpga/dfl-n3000-nios.c | 539 +++++++++++++++++++++ > > 6 files changed, 653 insertions(+) > > create mode 100644 Documentation/ABI/testing/sysfs-bus-dfl-devices- > > n3000-nios > > create mode 100644 Documentation/fpga/dfl-n3000-nios.rst > > create mode 100644 drivers/fpga/dfl-n3000-nios.c > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-dfl-devices-n3000-nios > > b/Documentation/ABI/testing/sysfs-bus-dfl-devices-n3000-nios > > new file mode 100644 > > index 0000000..ce5b474 > > --- /dev/null > > +++ b/Documentation/ABI/testing/sysfs-bus-dfl-devices-n3000-nios > > @@ -0,0 +1,21 @@ > > +What:/sys/bus/dfl/devices/dfl_dev.X/fec_mode > > +Date:Aug 2020 > > +KernelVersion:5.10 > > +Contact:Xu Yilun > > +Description:Read-only. It returns the FEC mode of the 25G links of the > > +ethernet retimers configured by NIOS firmware. "rs" for Reed > > +Solomon FEC, "kr" for Fire Code FEC, "no" for NO FEC. > > +"not supported" if the FEC mode setting is not supported, > > this > > +happens when the Nios firmware version major < 3, or no > > link is > > +configured to 25G. The FEC mode could be set by module > > or all links are configured to 10G. I think "no link is configured to 25G" may be better. 1. At the start of the description of the fec_mode, I wrote "It returns the FEC mode of the 25G links ..." So it may be better we say "no link is configured to 25G" as the condition of "not supported". I'm not sure if in future there are 40G, 50G ... links, and if the 40G, 50G links have the fec mode setting. So I just say we limit the scope of this node to 25G. 2. If some links are configured to reset and some are configured to 10G, or all links are in reset. The output of fec_mode is still "not supported". Thanks, Yilun.