linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Xu Yilun <yilun.xu@intel.com>
Cc: arnd@arndb.de, lee.jones@linaro.org,
	linux-kernel@vger.kernel.org, trix@redhat.com,
	lgoncalv@redhat.com, hao.wu@intel.com, matthew.gerlach@intel.com,
	russell.h.weight@intel.com
Subject: Re: [PATCH 2/2] misc: add support for retimers interfaces on Intel MAX 10 BMC
Date: Wed, 6 Jan 2021 10:06:14 +0100	[thread overview]
Message-ID: <X/V9hvXYlUOT9U2n@kroah.com> (raw)
In-Reply-To: <20210106085329.GA13860@yilunxu-OptiPlex-7050>

On Wed, Jan 06, 2021 at 04:53:29PM +0800, Xu Yilun wrote:
> On Wed, Jan 06, 2021 at 08:56:42AM +0100, Greg KH wrote:
> > On Wed, Jan 06, 2021 at 03:36:07PM +0800, Xu Yilun wrote:
> > > This driver supports the ethernet retimers (C827) for the Intel PAC
> > > (Programmable Acceleration Card) N3000, which is a FPGA based Smart NIC.
> > > 
> > > C827 is an Intel(R) Ethernet serdes transceiver chip that supports
> > > up to 100G transfer. On Intel PAC N3000 there are 2 C827 chips
> > > managed by the Intel MAX 10 BMC firmware. They are configured in 4 ports
> > > 10G/25G retimer mode. Host could query their link states and firmware
> > > version information via retimer interfaces (Shared registers) on Intel
> > > MAX 10 BMC. The driver creates sysfs interfaces for users to query these
> > > information.
> > > 
> > > Signed-off-by: Xu Yilun <yilun.xu@intel.com>
> > > ---
> > >  .../ABI/testing/sysfs-driver-intel-m10-bmc-retimer |  32 +++++
> > >  drivers/misc/Kconfig                               |  10 ++
> > >  drivers/misc/Makefile                              |   1 +
> > >  drivers/misc/intel-m10-bmc-retimer.c               | 158 +++++++++++++++++++++
> > >  4 files changed, 201 insertions(+)
> > >  create mode 100644 Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-retimer
> > >  create mode 100644 drivers/misc/intel-m10-bmc-retimer.c
> > > 
> > > diff --git a/Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-retimer b/Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-retimer
> > > new file mode 100644
> > > index 0000000..528712a
> > > --- /dev/null
> > > +++ b/Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-retimer
> > > @@ -0,0 +1,32 @@
> > > +What:		/sys/bus/platform/devices/n3000bmc-retimer.*.auto/tag
> > > +Date:		Jan 2021
> > > +KernelVersion:	5.12
> > > +Contact:	Xu Yilun <yilun.xu@intel.com>
> > > +Description:	Read only. Returns the tag of the retimer chip. Now there are 2
> > > +		retimer chips on Intel PAC N3000, they are tagged as
> > > +		'retimer_A' and 'retimer_B'.
> > > +		Format: "retimer_%c".
> > > +
> > > +What:		/sys/bus/platform/devices/n3000bmc-retimer.*.auto/sbus_version
> > > +Date:		Jan 2021
> > > +KernelVersion:	5.12
> > > +Contact:	Xu Yilun <yilun.xu@intel.com>
> > > +Description:	Read only. Returns the Transceiver bus firmware version of
> > > +		the retimer chip.
> > > +		Format: "0x%04x".
> > > +
> > > +What:		/sys/bus/platform/devices/n3000bmc-retimer.*.auto/serdes_version
> > > +Date:		Jan 2021
> > > +KernelVersion:	5.12
> > > +Contact:	Xu Yilun <yilun.xu@intel.com>
> > > +Description:	Read only. Returns the SERDES firmware version of the retimer
> > > +		chip.
> > > +		Format: "0x%04x".
> > > +
> > > +What:		/sys/bus/platform/devices/n3000bmc-retimer.*.auto/link_statusX
> > > +Date:		Jan 2021
> > > +KernelVersion:	5.12
> > > +Contact:	Xu Yilun <yilun.xu@intel.com>
> > > +Description:	Read only. Returns the status of each line side link. "1" for
> > > +		link up, "0" for link down.
> > > +		Format: "%u".
> > 
> > Who is going to use all of these read-only attributes?
> 
> The Intel OPAE (Open Programmable Acceleration Engine) lib handles these
> attrs.

I have no idea what that is, you should put a pointer to the source for
this in either the changelog comment, or here in the sysfs entries to
show who is using this.

> For the version attrs, the OPAE retimer firmware update tool will query
> them to make sure the update is succeed.

Why does anyone care about that?  The firmware download logic should
handle that properly, right?

> For the link_status attrs, the OPAE net tools handles it.

So not the normal userspace networking tools?

If not, we need to get an ack from the networking developers as to why
you are not following their existing user/kernel apis.

thanks,

greg k-h

  reply	other threads:[~2021-01-06  9:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06  7:36 [PATCH 0/2] Add retimer interfaces support for Intel MAX 10 BMC Xu Yilun
2021-01-06  7:36 ` [PATCH 1/2] mfd: intel-m10-bmc: specify the retimer sub devices Xu Yilun
2021-01-06  8:23   ` Lee Jones
2021-01-07  4:16     ` Xu Yilun
2021-01-06  7:36 ` [PATCH 2/2] misc: add support for retimers interfaces on Intel MAX 10 BMC Xu Yilun
2021-01-06  7:56   ` Greg KH
2021-01-06  8:53     ` Xu Yilun
2021-01-06  9:06       ` Greg KH [this message]
2021-01-07  4:14         ` Xu Yilun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X/V9hvXYlUOT9U2n@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=hao.wu@intel.com \
    --cc=lee.jones@linaro.org \
    --cc=lgoncalv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.gerlach@intel.com \
    --cc=russell.h.weight@intel.com \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).