netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Christian Herber <christian.herber@nxp.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 1/1] Added BASE-T1 PHY support to PHY Subsystem
Date: Thu, 15 Aug 2019 17:56:13 +0200	[thread overview]
Message-ID: <20190815155613.GE15291@lunn.ch> (raw)
In-Reply-To: <20190815153209.21529-2-christian.herber@nxp.com>

On Thu, Aug 15, 2019 at 03:32:29PM +0000, Christian Herber wrote:
> BASE-T1 is a category of Ethernet PHYs.
> They use a single copper pair for transmission.
> This patch add basic support for this category of PHYs.
> It coveres the discovery of abilities and basic configuration.
> It includes setting fixed speed and enabling auto-negotiation.
> BASE-T1 devices should always Clause-45 managed.
> Therefore, this patch extends phy-c45.c.
> While for some functions like auto-neogtiation different registers are
> used, the layout of these registers is the same for the used fields.
> Thus, much of the logic of basic Clause-45 devices can be reused.
> 
> Signed-off-by: Christian Herber <christian.herber@nxp.com>
> ---
>  drivers/net/phy/phy-c45.c    | 113 +++++++++++++++++++++++++++++++----
>  drivers/net/phy/phy-core.c   |   4 +-
>  include/uapi/linux/ethtool.h |   2 +
>  include/uapi/linux/mdio.h    |  21 +++++++
>  4 files changed, 129 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
> index b9d4145781ca..9ff0b8c785de 100644
> --- a/drivers/net/phy/phy-c45.c
> +++ b/drivers/net/phy/phy-c45.c
> @@ -8,13 +8,23 @@
>  #include <linux/mii.h>
>  #include <linux/phy.h>
>  
> +#define IS_100BASET1(phy) (linkmode_test_bit( \
> +			   ETHTOOL_LINK_MODE_100baseT1_Full_BIT, \
> +			   (phy)->supported))
> +#define IS_1000BASET1(phy) (linkmode_test_bit( \
> +			    ETHTOOL_LINK_MODE_1000baseT1_Full_BIT, \
> +			    (phy)->supported))

Hi Christian

We already have the flag phydev->is_gigabit_capable. Maybe add a flag
phydev->is_t1_capable

> +
> +static u32 get_aneg_ctrl(struct phy_device *phydev);
> +static u32 get_aneg_stat(struct phy_device *phydev);

No forward declarations please. Put the code in the right order so
they are not needed.

Thanks

     Andrew

  reply	other threads:[~2019-08-15 15:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 15:32 [PATCH net-next 0/1] Add BASE-T1 PHY support Christian Herber
2019-08-15 15:32 ` [PATCH net-next 1/1] Added BASE-T1 PHY support to PHY Subsystem Christian Herber
2019-08-15 15:56   ` Andrew Lunn [this message]
2019-08-15 16:34     ` Heiner Kallweit
2019-08-16 12:05       ` [EXT] " Christian Herber
2019-08-16 11:56     ` Christian Herber
2019-08-16 21:13   ` Heiner Kallweit
2019-08-19  6:40     ` Christian Herber
2019-08-15 15:43 ` [PATCH net-next 0/1] Add BASE-T1 PHY support Andrew Lunn
2019-08-16 20:59 ` Heiner Kallweit
2019-08-19  6:32   ` Christian Herber
2019-08-19 19:07     ` Heiner Kallweit
2019-08-20 13:36       ` [EXT] " Christian Herber
2019-08-21 17:09         ` Heiner Kallweit
2019-08-21 18:57           ` Andrew Lunn
2019-08-22  7:18             ` Christian Herber
2019-08-24 15:03               ` Heiner Kallweit
2019-08-26  7:57                 ` Christian Herber
2019-10-16  8:37   ` Lucas Stach

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=20190815155613.GE15291@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=christian.herber@nxp.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --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).