All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antoine Tenart <antoine.tenart@bootlin.com>
To: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Antoine Tenart <antoine.tenart@bootlin.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/3] net: phy: marvell10g: add mdix control
Date: Tue, 3 Mar 2020 16:09:58 +0100	[thread overview]
Message-ID: <20200303150958.GD3179@kwain> (raw)
In-Reply-To: <E1j98m5-00057k-Q6@rmk-PC.armlinux.org.uk>

Hello Russell,

On Tue, Mar 03, 2020 at 02:43:57PM +0000, Russell King wrote:
>  
> +static int mv3310_config_mdix(struct phy_device *phydev)
> +{
> +	u16 val;
> +	int err;
> +
> +	switch (phydev->mdix_ctrl) {
> +	case ETH_TP_MDI_AUTO:
> +		val = MV_PCS_CSCR1_MDIX_AUTO;
> +		break;
> +	case ETH_TP_MDI_X:
> +		val = MV_PCS_CSCR1_MDIX_MDIX;
> +		break;
> +	case ETH_TP_MDI:
> +		val = MV_PCS_CSCR1_MDIX_MDI;
> +		break;
> +	default:
> +		return -EINVAL;
> +	}
> +
> +	err = phy_modify_mmd_changed(phydev, MDIO_MMD_PCS, MV_PCS_CSCR1,
> +				     MV_PCS_CSCR1_MDIX_MASK, val);
> +	if (err < 0)
> +		return err;
> +
> +	return mv3310_maybe_reset(phydev, MV_PCS_BASE_T, err > 0);

This helper is only introduced in patch 2.

Thanks,
Antoine

-- 
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2020-03-03 15:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 14:42 [PATCH net-next 0/3] marvell10g tunable and power saving support Russell King - ARM Linux admin
2020-03-03 14:43 ` [PATCH net-next 1/3] net: phy: marvell10g: add mdix control Russell King
2020-03-03 15:09   ` Antoine Tenart [this message]
2020-03-03 15:20     ` Russell King - ARM Linux admin
2020-03-03 14:44 ` [PATCH net-next 2/3] net: phy: marvell10g: add energy detect power down tunable Russell King
2020-03-03 15:07   ` Antoine Tenart
2020-03-03 15:12     ` Russell King - ARM Linux admin
2020-03-03 15:19       ` Antoine Tenart
2020-03-03 15:30         ` Russell King - ARM Linux admin
2020-03-03 15:33           ` Antoine Tenart
2020-03-03 14:44 ` [PATCH net-next 3/3] net: phy: marvell10g: place in powersave mode at probe Russell King

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=20200303150958.GD3179@kwain \
    --to=antoine.tenart@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    /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.