Microchip-Ethernet / EVB-KSZ9477

Repository for using Microchip EVB-KSZ9477 board. Product Supported: KSZ9477, KSZ9567, KSZ9897, KSZ9896, KSZ8567, KSZ8565, KSZ9893, KSZ9563, KSZ8563, LAN9646, Phys(KSZ9031/9131, LAN8770
76 stars 79 forks source link

unable to get more than two eth interfaces with multi_dev=1 #87

Closed gilbertwaltoon closed 1 year ago

gilbertwaltoon commented 1 year ago

I've a EVB-KSZ9477 evaluation board running the factory-installed buildroot 3.18.14.

I'm trying to get three interfaces once linux boots: eth0 connected to port 1 only, eth1 connected to port 2 only, eth2 connected to port 3 only.

This repository's Software Setup Guide implies I can get this by setting Uboot environment variables.

I can get two linux interfaces (eth0, eth1) connected to separate ports, by setting U-boot variables

 multi_dev=1 
 eth1_ports=1
 eth1_vlan=0x7d
 eth2_vlan=0x7e

All my attempts to get three have failed however. From the Guide I imagined this would work:

 multi_dev=1 
 eth1_ports=1
 eth2_ports=2
 eth1_vlan=0x7d
 eth2_vlan=0x7e
 eth3_vlan=0x7f

but it makes things worse: Not only do I not get the desired three interfaces, but eth1 disappears and I only get eth0 and a bunch of eth0.201,eth0.202 ...

Is this a driver bug or am I missing something basic?

I noticed the default uboot _bootargs (see photo in the Software Setup Guide section 5.1) get passed an _extraparam that's constructed from _eth1ports , _eth1vlan, _eth2ports ...via lines like

 dev2_ports=${_drvname}.eth2_ports=${eth2_ports}

but there're no corresponding _dev3ports etc. lines. I've tried adding some, but again no success. My current uboot environment variables are attached. These include my attempts to modify _extraparam . But undoing this modification doesn't seem to help either.

boot_args_modified.txt

Any advice appreciated.