All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@zonque.org>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
	netdev@vger.kernel.org, vivien.didelot@gmail.com,
	f.fainelli@gmail.com
Subject: Re: [PATCH] net: dsa: mv88e6xxx: Allow MAC configuration for ports with internal PHY
Date: Mon, 22 Jun 2020 21:16:59 +0200	[thread overview]
Message-ID: <bb89fbef-bde7-2a7f-9089-bbe86323dd63@zonque.org> (raw)
In-Reply-To: <20200622185837.GN1551@shell.armlinux.org.uk>

Hi Russell,

On 6/22/20 8:58 PM, Russell King - ARM Linux admin wrote:
> On Mon, Jun 22, 2020 at 08:44:51PM +0200, Daniel Mack wrote:
>> On 6/22/20 8:41 PM, Andrew Lunn wrote:

>>> How are you trying to change the speed?
>>
>> With ethtool for instance. But all userspace tools are bailing out early
>> on this port for the reason I described.
> 
> A simple "return" to ignore a call in a void function won't have that
> effect.

It has the effect that mv88e6xxx_port_setup_mac() is currently not being
called from mv88e6xxx_mac_config().

> I don't see an issue here:
> 
> # ethtool -s lan1 autoneg off speed 10 duplex half

I've tried that of course, but that doesn't fix the problem here. Which
switch port does 'lan1' map to in your setup? My CPU port maps to port 4.

Correct me if I'm mistaken, but speed and duplex settings are only being
communicated to the MAC driver through the aforementioned chain of
calls, right?

> I've also been able to change what is advertised just fine, and the
> link comes up as expected - in fact, I was running one of the switch
> ports at 10Mbps to one of my machines and using the 'scope on the
> ethernet signals over the weekend to debug a problem, which turned
> out to be broken RGMII clock delay timings.

To recap, my setup features a Cadence GEM that is connected to a 88E1510
PHY which is then connected to port 4 of the switch (which has an
internal PHY) through a transformer-less link. I know this is not
optimal as the speed is limited to 100M by that, but that was the only
way as all other ports where used up.

The setup works just fine in principle, I'm just struggling with a
correct way of configuring the drivers to allow that setting.

I can control what is advertised on eth0, which is the GEM, and the PHY
there reports the correct link speed:


# ethtool -s eth0 advertise 0x008
[   79.573992] macb e000b000.ethernet eth0: Link is Down
[   79.637048] mv88e6085 e000b000.ethernet-ffffffff:02: Link is Down
[   81.221974] macb e000b000.ethernet eth0: Link is Up - 100Mbps/Full -
flow control off
[   81.285639] mv88e6085 e000b000.ethernet-ffffffff:02: Link is Up -
100Mbps/Full - flow control off

However, the MAC in the switch is not changed by that, and it was forced
to 1 Gbit at probe time of the driver. Hence no packets are being seen
by the GEM, even though the PHYs seem to see each other just fine
(traffic is also signaled by an LED on the 88E1510).

I'm happy to try other solutions of course.


Thanks,
Daniel

  reply	other threads:[~2020-06-22 19:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 18:34 [PATCH] net: dsa: mv88e6xxx: Allow MAC configuration for ports with internal PHY Daniel Mack
2020-06-22 18:41 ` Andrew Lunn
2020-06-22 18:44   ` Daniel Mack
2020-06-22 18:52     ` Andrew Lunn
2020-06-22 18:58     ` Russell King - ARM Linux admin
2020-06-22 19:16       ` Daniel Mack [this message]
2020-06-22 19:29         ` Andrew Lunn
2020-06-22 19:43         ` Russell King - ARM Linux admin
2020-06-22 19:50           ` Daniel Mack
2020-06-22 18:52 ` Russell King - ARM Linux admin

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=bb89fbef-bde7-2a7f-9089-bbe86323dd63@zonque.org \
    --to=daniel@zonque.org \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=linux@armlinux.org.uk \
    --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.