netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	fugang.duan@nxp.com, Chris Healy <Chris.Healy@zii.aero>
Subject: Re: [PATCH net-next v2 2/3] net: ethernet: fec: Allow configuration of MDIO bus speed
Date: Sat, 18 Apr 2020 18:49:02 +0200	[thread overview]
Message-ID: <20200418164902.GK804711@lunn.ch> (raw)
In-Reply-To: <b6b6c42b-aa2d-8036-958e-4f9929752536@gmail.com>

> > I don't see how that would work. Each device on the bus needs to be
> > able to receiver the transaction in order to decode the device
> > address, and then either discard it, or act on it. So the same as I2C
> > where the device address is part of the transaction. You need the bus
> > to run as fast as the slowest device on the bus. So a bus property is
> > the simplest. You could have per device properties, and during the bus
> > scan, figure out what the slowest device is, but that seems to add
> > complexity for no real gain. I2C does not have this either.
> > 
> > If MDIO was more like SPI, with per device chip select lines, then a
> > per device frequency would make sense.
> 
> OK, that is a good point, but then again, just like patch #3 you need to
> ensure that you are setting a MDIO bus controller frequency that is the
> lowest common denominator of all MDIO slaves on the bus, which means that
> you need to know about what devices do support.

Hi Florian

I've been following what I2C does, since MDIO and I2C is very similar.
I2C has none of what you are asking for. If I2C does not need any of
this, does MDIO? I2C assumes what whoever writes the DT knows what
they are doing and will set a valid clock frequency which works for
all devices on the bus. This seems to work for I2C, so why should it
not work for MDIO?

My preference is KISS.

    Andrew

  reply	other threads:[~2020-04-18 16:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-18  0:03 [PATCH net-next v2 0/3] FEC MDIO speedups Andrew Lunn
2020-04-18  0:03 ` [PATCH net-next v2 1/3] net: ethernet: fec: Replace interrupt driven MDIO with polled IO Andrew Lunn
2020-04-18 13:55   ` [EXT] " Andy Duan
2020-04-18 22:39     ` Chris Healy
2020-04-19  0:35       ` Andrew Lunn
2020-04-19  6:22       ` Andy Duan
2020-04-19 20:47       ` Andrew Lunn
2020-04-18 16:21   ` Fabio Estevam
2020-04-18 21:06   ` Florian Fainelli
2020-04-18  0:03 ` [PATCH net-next v2 2/3] net: ethernet: fec: Allow configuration of MDIO bus speed Andrew Lunn
2020-04-18  0:34   ` Florian Fainelli
2020-04-18 14:23     ` Andrew Lunn
2020-04-18 16:01       ` Florian Fainelli
2020-04-18 16:49         ` Andrew Lunn [this message]
2020-04-18 21:07           ` Florian Fainelli
2020-04-18 21:08   ` Florian Fainelli
2020-04-18  0:03 ` [PATCH net-next v2 3/3] net: ethernet: fec: Allow the MDIO preamble to be disabled Andrew Lunn
2020-04-18  0:39   ` Florian Fainelli
2020-04-18 14:27     ` Andrew Lunn
2020-04-18 16:02       ` Florian Fainelli
2020-04-18 21:09   ` Florian Fainelli

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=20200418164902.GK804711@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Chris.Healy@zii.aero \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=fugang.duan@nxp.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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).