All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Baruch Siach <baruch@tkos.co.il>
Cc: Vivien Didelot <vivien.didelot@gmail.com>,
	netdev@vger.kernel.org,
	Denis Odintsov <d.odintsov@traviangames.com>,
	Hubert Feurstein <h.feurstein@gmail.com>
Subject: Re: [BUG] mv88e6xxx: tx regression in v5.3
Date: Thu, 12 Dec 2019 14:14:48 +0100	[thread overview]
Message-ID: <20191212131448.GA9959@lunn.ch> (raw)
In-Reply-To: <20191212085045.nqhfldkbebqzzamv@sapphire.tkos.co.il>

> As you guessed, mv88e6xxx_mac_config() exits early because 
> mv88e6xxx_phy_is_internal() returns true for port number 2, and 'mode' is 
> MLO_AN_PHY. What is the right MAC/PHY setup flow in this case?

So this goes back to

commit d700ec4118f9d5e88db8f678e7342f28c93037b9
Author: Marek Vasut <marex@denx.de>
Date:   Wed Sep 12 00:15:24 2018 +0200

    net: dsa: mv88e6xxx: Make sure to configure ports with external PHYs
    
    The MV88E6xxx can have external PHYs attached to certain ports and those
    PHYs could even be on different MDIO bus than the one within the switch.
    This patch makes sure that ports with such PHYs are configured correctly
    according to the information provided by the PHY.

@@ -709,13 +717,17 @@ static void mv88e6xxx_mac_config(struct dsa_switch *ds, int port,
        struct mv88e6xxx_chip *chip = ds->priv;
        int speed, duplex, link, pause, err;
 
-       if (mode == MLO_AN_PHY)
+       if ((mode == MLO_AN_PHY) && mv88e6xxx_phy_is_internal(ds, port))
                return;

The idea being, that the MAC has direct knowledge of the PHY
configuration because it is internal. There is no need to configure
the MAC, it does it itself.

This assumption seems wrong for the switch you have.

I think it is just a optimisation. So we can probably remove this phy
internal test.

And
        } else if (!mv88e6xxx_phy_is_internal(ds, port)) {

also needs to change.

It would be interesting to know if the MAC is completely wrongly
configured, or it is just a subset of parameters.

	    Andrew

  reply	other threads:[~2019-12-12 13:14 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11  9:48 [BUG] mv88e6xxx: tx regression in v5.3 Baruch Siach
2019-12-11 13:11 ` Andrew Lunn
2019-12-11 17:07   ` Baruch Siach
2019-12-11 17:49     ` Andrew Lunn
2019-12-12  8:50       ` Baruch Siach
2019-12-12 13:14         ` Andrew Lunn [this message]
2019-12-12 14:19           ` Andreas Tobler
2019-12-12 15:08           ` Baruch Siach
2019-12-12 15:13             ` Andrew Lunn
2019-12-12 15:23               ` Baruch Siach
2019-12-12 18:17                 ` Baruch Siach
2019-12-12 18:32                   ` Marek Behun
2019-12-12 18:48                     ` Baruch Siach
2019-12-12 18:36                 ` Marek Behun
2019-12-12 19:06                   ` Baruch Siach
2019-12-12 19:31                     ` Andrew Lunn
2019-12-12 19:41                       ` Marek Behun
2019-12-12 20:49                         ` Andrew Lunn
2019-12-15 10:13                         ` Baruch Siach
2019-12-15 11:10                           ` Baruch Siach
2019-12-15 14:53                             ` Andrew Lunn
2019-12-15 15:08                               ` Baruch Siach
2019-12-15 16:14                                 ` Andrew Lunn
2019-12-17 18:26                                   ` Baruch Siach
2019-12-18 14:30                           ` Marek Behún
2019-12-18 16:04                             ` Baruch Siach
2019-12-19  9:04                             ` Baruch Siach

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=20191212131448.GA9959@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=baruch@tkos.co.il \
    --cc=d.odintsov@traviangames.com \
    --cc=h.feurstein@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.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 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.