All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Moritz Fischer <moritz.fischer@ettus.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Kees Cook <keescook@chromium.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	netdev@vger.kernel.org, Alex Williams <alex.williams@ni.com>
Subject: Re: [PATCH net-next 1/3] net: nixge: Add support for fixed-link subnodes
Date: Thu, 30 Aug 2018 19:54:19 +0200	[thread overview]
Message-ID: <20180830175419.GD31581@lunn.ch> (raw)
In-Reply-To: <CAAtXAHe_fX9_XExvFj20a0L-=b0Z1gX410=wnR=P2DjO-hEByA@mail.gmail.com>

> > The hardware has MDIO, but you don't have a PHY connected on it, and
> > use fixed link.
> 
> Since it's an FPGA design in that case we'd probably build the hardware without
> MDIO to save resources.

You can save resources, but is it worth the complexity else where,
like in the software?

> > It is important you have the mdio subnode, with PHYs and switches as
> > children. The driver currently gets this wrong, it uses
> > pdev->dev.of_node.
> 
> Oh, whoops.

Yes, and i also missed it. I generally review all new network drivers
and look at their MDIO and PHY code.

> Any good examples of drivers doing it right? Is the one going with
> the DT snippet above a good example?

That comes from the Freescale fec_main.c. It only supports DT, and
always uses of_mdiobus_register. You need to be a bit more flexible
for when you don't have DT. I'm not sure there are good example of
this, since they either don't need this flexibility, or they get it
wrong :-(

      Andrew

  reply	other threads:[~2018-08-30 17:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-30  0:40 [PATCH net-next 0/3] nixge: fixed-link support Moritz Fischer
2018-08-30  0:40 ` [PATCH net-next 1/3] net: nixge: Add support for fixed-link subnodes Moritz Fischer
2018-08-30  3:04   ` Andrew Lunn
2018-08-30 17:21     ` Moritz Fischer
2018-08-30 17:54       ` Andrew Lunn [this message]
2018-08-30 21:09         ` Moritz Fischer
2018-08-30 17:44   ` kbuild test robot
2018-08-30  0:40 ` [PATCH net-next 2/3] net: nixge: Add support for having nixge as subdevice Moritz Fischer
2018-08-30  1:07   ` Moritz Fischer
2018-08-30  3:11   ` Andrew Lunn
2018-08-30 16:39     ` Moritz Fischer
2018-08-30 17:42       ` Andrew Lunn
2018-08-30  0:40 ` [PATCH net-next 3/3] net: nixge: Use sysdev instead of ndev->dev.parent for DMA Moritz Fischer

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=20180830175419.GD31581@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=alex.williams@ni.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moritz.fischer@ettus.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.