[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46d79992-a7cb-0424-1819-c6351e674847@gmail.com>
Date: Mon, 3 Sep 2018 10:32:34 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Andrew Lunn <andrew@...n.ch>, David Miller <davem@...emloft.net>
Cc: netdev <netdev@...r.kernel.org>, maxime.chevallier@...tlin.com
Subject: Re: [PATCH net-next 05/12] net: ethernet: genet: Fix speed selection
On 9/2/2018 10:06 AM, Andrew Lunn wrote:
> The phy supported speed is being used to determine if the MAC should
> be configured to 100 or 1G. The masking logic is broken. Instead, look
> 1G supported speeds to enable 1G MAC support.
>
> Signed-off-by: Andrew Lunn <andrew@...n.ch>
> ---
> drivers/net/ethernet/broadcom/genet/bcmmii.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c
> index 881e566730f3..69587a61e8d6 100644
> --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
> +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
> @@ -220,11 +220,10 @@ int bcmgenet_mii_config(struct net_device *dev, bool init)
> * capabilities, use that knowledge to also configure the
> * Reverse MII interface correctly.
> */
> - if ((dev->phydev->supported & PHY_BASIC_FEATURES) ==
> - PHY_BASIC_FEATURES)
> - port_ctrl = PORT_MODE_EXT_RVMII_25;
> - else
> + if (dev->phydev->supported & PHY_1000BT_FEATURES)
> port_ctrl = PORT_MODE_EXT_RVMII_50;
> + else
> + port_ctrl = PORT_MODE_EXT_RVMII_25;
Your change is not wrong, but the driver was wrong previously, reverse
MII is 10/100 only, but the reference clock selection (25Mhz or 50Mhz)
cannot be automatically discovered and we need the help of Device
Tree/platform data here. I will submit a separate patch for "net", and
this one can go in for now.
Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
--
Florian
Powered by blists - more mailing lists