Le Tue, Jul 02, 2024 at 07:50:56PM +0000, Miod Vallat a écrit : > > hi, > > > > playing with 7.5 on an edgerouter poe, it panics at boot: > > Congratulations, you've reached a divide by zero in the kernel. > > This is caused by cn30xxgmx_rgmii_speed() setting the local variable > `baudrate' to zero (with an XXX comment) prior to dividing by it. > > The following diff sweeps the issue under the rug by following the > "consider unknown value as 1Gbps" logic used all over the file. It might > help your setup.
it's right in the sense that it doesn't panic anymore and i can up/configure the interface: erpoe# ifconfig cnmac2 media cnmac2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 80:2a:a8:8e:2d:51 index 3 priority 0 llprio 3 media: Ethernet manual (none) supported media: media manual inet 10.0.2.2 netmask 0xffffff00 broadcast 10.0.2.255 but it shows no media type, doesn't work and no packets flow. digging in the archives, i found https://marc.info/?l=openbsd-bugs&m=151063517020444&w=2 which seems to say that it'd be better to apparently skip that port (and that there's no hope for the two remaining ports ?) visa, any hindsight on this ? trying the following diff adapted from the 2017 thread: Index: arch/octeon/dev/cn30xxsmi.c =================================================================== RCS file: /cvs/src/sys/arch/octeon/dev/cn30xxsmi.c,v diff -u -r1.12 cn30xxsmi.c --- arch/octeon/dev/cn30xxsmi.c 20 May 2024 23:13:33 -0000 1.12 +++ arch/octeon/dev/cn30xxsmi.c 3 Jul 2024 12:54:48 -0000 @@ -197,6 +197,10 @@ reg = nutm25_phys[port]; break; case BOARD_UBIQUITI_E100: + /* XXX Skip the switch port on ERPoe-5. + * XXX There is no driver for it. */ + if (port > 1) + return ENOENT; case BOARD_UBIQUITI_E120: if (port > 2) return ENOENT; dmesg goes from mainbus0 at root: board 20002 rev 1.27, model CN3xxx/CN5xxx ... octgmx0 at octpip0 interface 0 cnmac0 at octgmx0: port 0 RGMII, address 80:2a:a8:8e:2d:4f atphy0 at cnmac0 phy 7: AR8035 10/100/1000 PHY, rev. 2 cnmac1 at octgmx0: port 1 RGMII, address 80:2a:a8:8e:2d:50 atphy1 at cnmac1 phy 6: AR8035 10/100/1000 PHY, rev. 2 cnmac2 at octgmx0: port 2 RGMII, address 80:2a:a8:8e:2d:51 com0 at simplebus0: ns16550a, 64 byte fifo to now only two supported ports: octgmx0 at octpip0 interface 0 cnmac0 at octgmx0: port 0 RGMII, address 80:2a:a8:8e:2d:4f atphy0 at cnmac0 phy 7: AR8035 10/100/1000 PHY, rev. 2 cnmac1 at octgmx0: port 1 RGMII, address 80:2a:a8:8e:2d:50 atphy1 at cnmac1 phy 6: AR8035 10/100/1000 PHY, rev. 2 com0 at simplebus0: ns16550a, 64 byte fifo at least the edgerouter lite 3 physical ports are supported.. its' a pity having only 2 working ports on 5 physical... Landry