netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Don Bollinger <don@thebollingers.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, brandon_chuang@edge-core.com,
	wally_wang@accton.com, roy_lee@edge-core.com,
	rick_burchett@edge-core.com, quentin.chang@quantatw.com,
	jeffrey.townsend@bitswitch.com, scotte@cumulusnetworks.com,
	roopa@cumulusnetworks.com, David Ahern <dsa@cumulusnetworks.com>,
	luke.williams@canonical.com, Guohan Lu <gulv@microsoft.com>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] optoe: driver to read/write SFP/QSFP EEPROMs
Date: Tue, 12 Jun 2018 20:11:09 +0200	[thread overview]
Message-ID: <20180612181109.GD12251@lunn.ch> (raw)
In-Reply-To: <496e06b9-9f02-c4ae-4156-ab6221ba23fd@amd.com>

> There's an SFP driver under drivers/net/phy.  Can that driver be extended
> to provide this support?  Adding Russel King who developed sfp.c, as well
> at the netdev mailing list.

I agree, the current SFP code should be used.

My observations seem to be there are two different ways {Q}SFP are used:

1) The Linux kernel has full control, as assumed by the devlink/SFP
frame work. We parse the SFP data to find the capabilities of the SFP
and use it to program the MAC to use the correct mode. The MAC can be
a NIC, but it can also be a switch. DSA is gaining support for
PHYLINK, so SFP modules should just work with most switches which DSA
support.  And there is no reason a plain switchdev switch can not use
PHYLINK.

2) Firmware is in control of the PHY layer, but there is a wish to
expose some of the data which is available via i2c from the {Q}SFP to
linux.

It appears this optoe supports this second case. It does not appear to
support any in kernel API to actually make use of the SFP data in the
kernel.

We should not be duplicating code. We should share the SFP code for
both use cases above. There is also a Linux standard API for getting
access to this information. ethtool -m/--module-info. Anything which
is exporting {Q}SFP data needs to use this API.

   Andrew

  reply	other threads:[~2018-06-12 18:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180611042515.ml6zbcmz6dlvjmrp@thebollingers.org>
2018-06-11 18:33 ` [PATCH] optoe: driver to read/write SFP/QSFP EEPROMs Tom Lendacky
2018-06-12 18:11   ` Andrew Lunn [this message]
2018-06-15  2:26     ` Don Bollinger
2018-06-15  3:24       ` Florian Fainelli
2018-06-18 19:13         ` Don Bollinger
2018-06-15  7:54       ` Andrew Lunn
2018-06-18 19:41         ` Don Bollinger
2018-06-19 15:15           ` Andrew Lunn
     [not found]             ` <20180621052425.pa464laxjrebm5s3@thebollingers.org>
2018-06-21  8:11               ` Andrew Lunn
2018-06-21 20:28                 ` Don Bollinger
2018-06-22  7:28                   ` Andrew Lunn

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=20180612181109.GD12251@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=brandon_chuang@edge-core.com \
    --cc=don@thebollingers.org \
    --cc=dsa@cumulusnetworks.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gulv@microsoft.com \
    --cc=jeffrey.townsend@bitswitch.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke.williams@canonical.com \
    --cc=netdev@vger.kernel.org \
    --cc=quentin.chang@quantatw.com \
    --cc=rick_burchett@edge-core.com \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=roopa@cumulusnetworks.com \
    --cc=roy_lee@edge-core.com \
    --cc=scotte@cumulusnetworks.com \
    --cc=thomas.lendacky@amd.com \
    --cc=wally_wang@accton.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).