netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Robert Hancock <robert.hancock@calian.com>
Cc: andrew@lunn.ch, hkallweit1@gmail.com, davem@davemloft.net,
	netdev@vger.kernel.org
Subject: Re: [PATCH v2] net: phy: marvell: add special handling of Finisar modules with 88E1111
Date: Tue, 20 Oct 2020 21:39:43 +0100	[thread overview]
Message-ID: <20201020203943.GF1551@shell.armlinux.org.uk> (raw)
In-Reply-To: <20201020191048.756652-1-robert.hancock@calian.com>

On Tue, Oct 20, 2020 at 01:10:48PM -0600, Robert Hancock wrote:
> The Finisar FCLF8520P2BTL 1000BaseT SFP module uses a Marvel 88E1111 PHY
> with a modified PHY ID. Add support for this ID using the 88E1111
> methods.
> 
> By default these modules do not have 1000BaseX auto-negotiation enabled,
> which is not generally desirable with Linux networking drivers. Add
> handling to enable 1000BaseX auto-negotiation when these modules are
> used in 1000BaseX mode. Also, some special handling is required to ensure
> that 1000BaseT auto-negotiation is enabled properly when desired.
> 
> Based on existing handling in the AMD xgbe driver and the information in
> the Finisar FAQ:
> https://www.finisar.com/sites/default/files/resources/an-2036_1000base-t_sfp_faqreve1.pdf

Just one further point...

> 
> Signed-off-by: Robert Hancock <robert.hancock@calian.com>
> ---
>  drivers/net/phy/marvell.c   | 99 ++++++++++++++++++++++++++++++++++++-
>  include/linux/marvell_phy.h |  3 ++
>  2 files changed, 101 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
> index 5aec673a0120..49392d15035c 100644
> --- a/drivers/net/phy/marvell.c
> +++ b/drivers/net/phy/marvell.c
> @@ -80,8 +80,11 @@
>  #define MII_M1111_HWCFG_MODE_FIBER_RGMII	0x3
>  #define MII_M1111_HWCFG_MODE_SGMII_NO_CLK	0x4
>  #define MII_M1111_HWCFG_MODE_RTBI		0x7
> +#define MII_M1111_HWCFG_MODE_COPPER_1000BX_AN	0x8

I would suggest using MII_M1111_HWCFG_MODE_COPPER_1000X_AN, as there
is a 1000BASE-BX.

>  #define MII_M1111_HWCFG_MODE_COPPER_RTBI	0x9
>  #define MII_M1111_HWCFG_MODE_COPPER_RGMII	0xb
> +#define MII_M1111_HWCFG_MODE_COPPER_1000BX_NOAN 0xc

Same here.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

      reply	other threads:[~2020-10-20 20:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20 19:10 [PATCH v2] net: phy: marvell: add special handling of Finisar modules with 88E1111 Robert Hancock
2020-10-20 20:39 ` Russell King - ARM Linux admin [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=20201020203943.GF1551@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=robert.hancock@calian.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).