From: Andrew Lunn <andrew@lunn.ch>
To: Alvaro Gamez Machado <alvaro.gamez@hazent.com>
Cc: "Anirudha Sarangi" <anirudh@xilinx.com>,
"John Linn" <John.Linn@xilinx.com>,
"Michal Simek" <michal.simek@xilinx.com>,
"Sören Brinkmann" <soren.brinkmann@xilinx.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Florian Fainelli" <f.fainelli@gmail.com>
Subject: Re: [PATCH] net: axienet: add support for standard phy-mode binding
Date: Thu, 6 Jul 2017 15:34:55 +0200 [thread overview]
Message-ID: <20170706133455.GB8810@lunn.ch> (raw)
In-Reply-To: <20170706085011.2828-1-alvaro.gamez@hazent.com>
On Thu, Jul 06, 2017 at 10:50:11AM +0200, Alvaro Gamez Machado wrote:
> Keep supporting proprietary "xlnx,phy-type" attribute and add support for
> MII connectivity to the PHY.
Hi Alvaro
Thanks for picking this up.
>
> Signed-off-by: Alvaro Gamez Machado <alvaro.gamez@hazent.com>
> ---
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 48 +++++++++++++++++------
> 1 file changed, 36 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index 33c595f4691d..f669b8e69e8b 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -531,11 +531,11 @@ static void axienet_adjust_link(struct net_device *ndev)
> link_state = phy->speed | (phy->duplex << 1) | phy->link;
> if (lp->last_link != link_state) {
> if ((phy->speed == SPEED_10) || (phy->speed == SPEED_100)) {
> - if (lp->phy_type == XAE_PHY_TYPE_1000BASE_X)
> + if (lp->phy_type == PHY_INTERFACE_MODE_1000BASEX)
In my suggestion patch, i renamed it to phy_mode. That is the
convention used by other drivers. Since we are also changing what it
means, it gives the compiler a chance to error out on any instances we
didn't find and are still trying to use the old meaning.
It would be nice to document this in a device tree binding
document. Something like Documentation/devicetree/binding/net/xilinx_axienet.txt
XILINX Axi Ethernet device driver
---------------------------------
Required properties:
- compatible : Must be one of "xlnx,axi-ethernet-1.00.a",
"xlnx,axi-ethernet-1.01.a", or "xlnx,axi-ethernet-2.01.a"
- reg : Address and length of the IO space.
- interrupts : Should be a list of two interrupt, TX and RX.
Optional properties:
- phy-mode : See ethernet.txt
- xlnx,phy-type : Deprecated, do not use, but still accepted in preference to phy-mode.
There are other properties, but they can be added later. The important
thing is it documents this change.
Thanks
Andrew
prev parent reply other threads:[~2017-07-06 13:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 8:50 Alvaro Gamez Machado
2017-07-06 13:34 ` 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=20170706133455.GB8810@lunn.ch \
--to=andrew@lunn.ch \
--cc=John.Linn@xilinx.com \
--cc=alvaro.gamez@hazent.com \
--cc=anirudh@xilinx.com \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=soren.brinkmann@xilinx.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
all inboxes | Powered by JetHome®