All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 2/3] net: phy: add __phy_speed_down and phy_resolve_min_speed
Date: Mon, 12 Aug 2019 23:32:25 +0200	[thread overview]
Message-ID: <20190812213225.GC15047@lunn.ch> (raw)
In-Reply-To: <e499c226-7141-d5be-990c-b46b7dd048f8@gmail.com>

> +int __phy_speed_down(struct phy_device *phydev)
> +{
> +	int min_common_speed = phy_resolve_min_speed(phydev, true);
> +
> +	if (min_common_speed == SPEED_UNKNOWN)
> +		return -EINVAL;
> +
> +	return __set_linkmode_max_speed(phydev, min_common_speed,
> +					phydev->advertising);
> +}
> +
>  static void mmd_phy_indirect(struct mii_bus *bus, int phy_addr, int devad,
>  			     u16 regnum)
>  {
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 781f4810c..4be6d3b47 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -665,6 +665,7 @@ size_t phy_speeds(unsigned int *speeds, size_t size,
>  		  unsigned long *mask);
>  void of_set_phy_supported(struct phy_device *phydev);
>  void of_set_phy_eee_broken(struct phy_device *phydev);
> +int __phy_speed_down(struct phy_device *phydev);

It seems odd having a __ function exported. Can we find a better name
for it, and drop the __?

    Andrew

  reply	other threads:[~2019-08-12 21:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 21:18 [PATCH net-next 0/3] net: phy: let phy_speed_down/up support speeds >1Gbps Heiner Kallweit
2019-08-12 21:19 ` [PATCH net-next 1/3] net: phy: add __set_linkmode_max_speed Heiner Kallweit
2019-08-12 21:27   ` Andrew Lunn
2019-08-12 21:31     ` Heiner Kallweit
2019-08-12 21:20 ` [PATCH net-next 2/3] net: phy: add __phy_speed_down and phy_resolve_min_speed Heiner Kallweit
2019-08-12 21:32   ` Andrew Lunn [this message]
2019-08-12 21:20 ` [PATCH net-next 3/3] net: phy: let phy_speed_down/up support speeds >1Gbps Heiner Kallweit
2019-08-12 21:40   ` Andrew Lunn

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=20190812213225.GC15047@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.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 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.