netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Ioana Ciornei <ioana.ciornei@nxp.com>
Cc: Russell King - ARM Linux admin <linux@armlinux.org.uk>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Alexandru Marginean <alexandru.marginean@nxp.com>,
	Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com>
Subject: Re: [PATCH RFC 0/6] DPAA2 MAC Driver
Date: Mon, 17 Jun 2019 16:46:10 +0200	[thread overview]
Message-ID: <20190617144610.GE25211@lunn.ch> (raw)
In-Reply-To: <VI1PR0402MB2800BBC003EA7C572FBEF09DE0EE0@VI1PR0402MB2800.eurprd04.prod.outlook.com>

On Fri, Jun 14, 2019 at 03:26:50PM +0000, Ioana Ciornei wrote:
> > Subject: Re: [PATCH RFC 0/6] DPAA2 MAC Driver
> > 
> > On Fri, Jun 14, 2019 at 02:55:47AM +0300, Ioana Ciornei wrote:
> > > After today's discussion with Russell King about what phylink exposes
> > > in
> > > .mac_config(): https://marc.info/?l=linux-netdev&m=156043794316709&w=2
> > > I am submitting for initial review the dpaa2-mac driver model.
> > >
> > > At the moment, pause frame support is missing so inherently all the
> > > USXGMII modes that rely on backpressure applied by the PHY in rate
> > > adaptation between network side and system side don't work properly.
> > >
> > > As next steps, the driver will have to be integrated with the SFP bus
> > > so commands such as 'ethtool --dump-module-eeprom' will have to work
> > > through the current callpath through firmware.
> > 
> > From what I understand having read the doc patch, would it be fair to say
> > that every operation that is related to the link state has to be passed from
> > the ETH driver to the firmware, and then from the firmware back to the
> > kernel to the MAC driver?
> 
> That is correct.
> 
> > 
> > Does this mean that "ethtool --dump-module-eeprom" goes through this
> > process as well - eth driver into firmware, which then gets forwarded out of
> > the formware on the MAC side, via phylink to the SFP cage?
> > 
> > If that is true, what is the proposal - to forward a copy of the EEPROM on
> > module insertion into the firmware, so that it is stored there when anyone
> > requests it?  What about the diagnostic monitoring that is real-time?
> > 
> 
> At the moment, we do not have a proposal that could solve all these issues.
> We thought about a solution where the eth driver issues a command to the firmware that then issues an IRQ to the mac driver which could retrieve and then pass back the information.
> This doesn't seem too feasible since the ethernet driver should be waiting for the data to arrive back from the firmware while in an ethtool callback.
> 
> 
> > Or is the SFP cage entirely handled by firmware?
> 
> No, the SFP cage is not handled by firmware.

Hi Ioana

At the moment, you seem to be in a bad middle ground. The firmware
cannot do everything, so you want Linux and PHYLINK to do some
bits. But Linux expects to do everything, have full control of the
hardware. And it is not fitting together.

Maybe you need to step back and look at the overall architecture. And
then decide which way you want to go to get out of the middle
ground. There are good examples of the firmware controlling
everything, and the driver just using the high level ethtool API calls
to report state. And there are good examples of low levels of the
hardware, the MDIO bus so Linux can control the PHYs, the i2c bus and
GPIOs for the SFP cage, etc being exposed so PHYLINK can control
everything.

To have a sensible architecture and driver implementation you need to
go one way or the other. All or nothing.

   Andrew

      reply	other threads:[~2019-06-17 14:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13 23:55 [PATCH RFC 0/6] DPAA2 MAC Driver Ioana Ciornei
2019-06-13 23:55 ` [PATCH RFC 1/6] net: phy: update the autoneg state in phylink_phy_change Ioana Ciornei
2019-06-13 23:55 ` [PATCH RFC 2/6] dpaa2-eth: add support for new link state APIs Ioana Ciornei
2019-06-14  1:01   ` Andrew Lunn
2019-06-14 14:03     ` Ioana Ciornei
2019-06-13 23:55 ` [PATCH RFC 3/6] dpaa2-mac: add MC API for the DPMAC object Ioana Ciornei
2019-06-14  1:12   ` Andrew Lunn
2019-06-14 14:06     ` Ioana Ciornei
2019-06-17 14:28       ` Andrew Lunn
2019-06-13 23:55 ` [PATCH RFC 4/6] dpaa2-mac: add initial driver Ioana Ciornei
2019-06-14  1:42   ` Andrew Lunn
2019-06-14  9:50     ` Russell King - ARM Linux admin
2019-06-14 16:54       ` Ioana Ciornei
2019-06-14 17:03         ` Russell King - ARM Linux admin
2019-06-14 14:08     ` Ioana Ciornei
2019-06-14 10:20   ` Russell King - ARM Linux admin
2019-06-14 16:34     ` Ioana Ciornei
2019-06-13 23:55 ` [PATCH RFC 5/6] dpaa2-eth: add autoneg support Ioana Ciornei
2019-06-13 23:55 ` [PATCH RFC 6/6] net: documentation: add MAC/PHY proxy driver documentation Ioana Ciornei
2019-06-14  9:42 ` [PATCH RFC 0/6] DPAA2 MAC Driver Russell King - ARM Linux admin
2019-06-14 15:26   ` Ioana Ciornei
2019-06-17 14:46     ` Andrew Lunn [this message]

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=20190617144610.GE25211@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=alexandru.marginean@nxp.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=ruxandra.radulescu@nxp.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).