Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Dario Alcocer <dalcocer@helixd.com>
Cc: netdev@vger.kernel.org
Subject: Re: Marvell switch port shows LOWERLAYERDOWN, ping fails
Date: Wed, 28 Jul 2021 21:24:10 +0200	[thread overview]
Message-ID: <YQGu2r02XdMR5Ajp@lunn.ch> (raw)
In-Reply-To: <59790fef-bf4a-17e5-4927-5f8d8a1645f7@helixd.com>

On Wed, Jul 28, 2021 at 11:33:35AM -0700, Dario Alcocer wrote:
> On 7/28/21 11:23 AM, Andrew Lunn wrote:
> > On Wed, Jul 28, 2021 at 11:07:37AM -0700, Dario Alcocer wrote:
> > > It appears the port link-state issue is caused by the mv88e6xxx switch
> > > driver. The function mv88e6xxx_mac_config identifies the PHY as internal and
> > > skips the call to mv88e6xxx_port_setup_mac.
> > > 
> > > It does not make sense to me why internal PHY configuration should be
> > > skipped.
> > 
> > The switch should do the configuration itself for internal PHYs. At
> > least that works for other switches. What value does CMODE have for
> > the port? 0xf?
> > 
> >      Andrew
> > 
> 
> Is CMODE available via the DSA debugfs? Here are the registers for port0,
> which should be lan1:
> 
> root@dali:~# ls /sys/kernel/debug/dsa/switch0/
> port0/        port1/        port2/        port3/        port4/ port5/
> port6/        tag_protocol  tree
> root@dali:~# ls /sys/kernel/debug/dsa/switch0/port0/
> fdb    mdb    regs   stats  vlan
> root@dali:~# cat /sys/kernel/debug/dsa/switch0/port0/regs
>  0: 100f

It is the lower nibble of this register. So 0xf.

Take a look at:

https://github.com/lunn/mv88e6xxx_dump/blob/master/mv88e6xxx_dump.c

The 1 in 100f means it has found the PHY. But there is no link,
10/Half duplex, etc.

>  1: 0003

This at least looks sensible. Nothing is forced, normal speed
detection should be performed. So what should happen is the link
speed, duplex etc from the internal PHY should directly appear in
register 0. There is no need for software to ask the PHY and then
configure the MAC.

	  Andrew

  reply	other threads:[~2021-07-28 19:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 22:55 Dario Alcocer
2021-07-23 13:41 ` Andrew Lunn
2021-07-23 18:21   ` Dario Alcocer
2021-07-23 18:25     ` Andrew Lunn
2021-07-23 18:36       ` Dario Alcocer
2021-07-23 21:58         ` Dario Alcocer
2021-07-24 17:34           ` Andrew Lunn
2021-07-25  2:26             ` Dario Alcocer
2021-07-25  2:36               ` Dario Alcocer
2021-07-27  1:39                 ` Dario Alcocer
2021-07-28 18:07                   ` Dario Alcocer
2021-07-28 18:23                     ` Andrew Lunn
2021-07-28 18:33                       ` Dario Alcocer
2021-07-28 19:24                         ` Andrew Lunn [this message]
2021-07-28 19:37                           ` Dario Alcocer
2021-07-28 20:47                             ` Andrew Lunn
2021-07-28 20:54                               ` Dario Alcocer
2021-07-28 21:09                             ` Andrew Lunn
2021-08-05 21:44                             ` Dario Alcocer
2021-08-06 16:03                               ` Dario Alcocer
2021-08-06 23:46                                 ` Dario Alcocer
2021-08-07 18:57                                   ` Andrew Lunn
2021-08-09 16:28                                     ` Dario Alcocer
2021-08-10 20:58                                       ` Dario Alcocer
2021-08-10 22:13                                         ` Andrew Lunn
2021-08-11 13:16                                           ` Dario Alcocer
2021-08-07 17:44                               ` 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=YQGu2r02XdMR5Ajp@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=dalcocer@helixd.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: Marvell switch port shows LOWERLAYERDOWN, ping fails' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).