Subject: Re: Marvell switch port shows LOWERLAYERDOWN, ping fails

From: Dario Alcocer <[email-masked]>
Date: Thu, 5 Aug 2021 14:44:32 -0700

On 7/28/21 12:37 PM, Dario Alcocer wrote:
> On 7/28/21 12:24 PM, Andrew Lunn wrote:
>> Take a look at:
>>
>> https://github.com/lunn/mv88e6xxx_dump/blob/master/mv88e6xxx_dump.c
>>
> 
> Many thanks for the link; I will build and install it on the target. 
> Hope it will work with the older kernel (5.4.114) we're using.

I've got a dumb question: is mv88e6xxx_dump intended to be built on the 
target, or do I use a cross compiler?

Unfortunately, the storage available on the target is too limited to 
entertain installing autotools, gcc and glibc headers.

On the other hand, the Yocto environment I'm using to cross-compile 
target binaries doesn't play nice with respect to kernel-source headers. 
In particular, the generic 5.2 uapi/linux/devlink.h provided by the 
build environment is missing various DEVLINK_CMD_* and DEVLINK_ATTR_* 
enums that prevent compilation of mv88e6xxx_dump.c.

One alternative I investigated was applying the debugfs patch to 5.13.6, 
but this resulted in many patch conflicts. Given this situation, it 
seems using mv88e6xxx_dump would be the easier path.

Regarding the original problem, using 5.13.6 no longer results in 
LOWERLAYERDOWN being reported; after a 5-6 second delay when bringing up 
the port interface, the switch port comes up. The RJ45 LED on the link 
peer turns on. However, pings do not make it to the link peer.

I will need to continue troubleshooting the switch configuration, so 
building a working mv88e6xxx_dump seems like the next task for me to tackle.

Thanks in advance for any suggestions you may have.