On Thu, Oct 20, 2016 at 03:51:50PM +0000, Visa Hankala wrote: > On Thu, Oct 20, 2016 at 04:53:32PM +0300, Paul Irofti wrote: > > cn30xxgmx0 at iobus0 base 0x1180008000000 > > port are disable > > cn30xxgmx1 at iobus0 base 0x1180010000000 > > panic: : don't know phy address for port 16 > > The first GMX interface is disabled in the chip config. So far, so good, > I think. The second interface is apparently enabled, but the lookup of > the first port's PHY address failed because there is no hard-coded entry > for the board. > > The board's firmware might provide fdt data. Does the following > diff help?
Not really. I also just committed a diff that fixes the build. Were you able to build before? -------------------------------------------------------------------------------- Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2016 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 6.0-current (GENERIC) #0: Fri Oct 21 10:50:19 EEST 2016 bulib...@sci.irofti.net:/usr/src/sys/arch/octeon/compile/GENERIC real mem = 1073741824 (1024MB) avail mem = 1048494080 (999MB) warning: no entropy supplied by boot loader mainbus0 at root cpu0 at mainbus0: Cavium OCTEON II CPU rev 0.1 800 MHz, Software FP emulation cpu0: cache L1-I 512KB D 8KB 64 way, L2 1024KB 8 way clock0 at mainbus0: int 5 iobus0 at mainbus0 octuctl0 at iobus0 base 0x118006f000000 irq 56 ehci0 at octuctl0 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 configuration 1 interface 0 "Octeon EHCI root hub" rev 2.00/1.00 addr 1 ohci0 at octuctl0, version 1.0 usb1 at ohci0: USB revision 1.0 uhub1 at usb1 configuration 1 interface 0 "Octeon OHCI root hub" rev 1.00/1.00 addr 1 octcf0 at iobus0 base 0x1d000800 irq 0: <TS16GCF170> octcf0: 1-sector PIO, CHS, 7559MB, 16383 cyl, 15 head, 63 sec, 15481935 sectors octrng0 at iobus0 base 0x1400000000000 irq 0 cn30xxgmx0 at iobus0 base 0x1180008000000 port are disable cn30xxgmx1 at iobus0 base 0x1180010000000 cnmac0 at cn30xxgmx1: SGMII, address 00:90:0b:31:d8:5f cnmac1 at cn30xxgmx1: SGMII, address 00:90:0b:31:d8:60 panic: : don't know phy address for port 18 Stopped at 0xffffffff812c6564: jr ra 0xffffffff812c6568: nop TID PID UID PRFLAGS PFLAGS CPU COMMAND * 0 0 0 0x10000 0x200 0 swapper 0xffffffff812c6560 (0,9001070000000200,200,0) ra 0xffffffff810f8578 sp 0x98000 0002000bc70, sz 0 0xffffffff810f842c (0,9001070000000200,200,0) ra 0x0 sp 0x980000002000bc70, sz 0 User-level: pid 0 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. -------------------------------------------------------------------------------- > > Index: arch/octeon/dev/cn30xxgmx.c > =================================================================== > RCS file: src/sys/arch/octeon/dev/cn30xxgmx.c,v > retrieving revision 1.26 > diff -u -p -r1.26 cn30xxgmx.c > --- arch/octeon/dev/cn30xxgmx.c 4 Aug 2016 13:10:31 -0000 1.26 > +++ arch/octeon/dev/cn30xxgmx.c 20 Oct 2016 15:35:49 -0000 > @@ -33,6 +33,8 @@ > #include <sys/malloc.h> > #include <sys/syslog.h> > > +#include <dev/ofw/openfirm.h> > + > #include <machine/bus.h> > #include <machine/octeon_model.h> > #include <machine/octeonvar.h> > @@ -181,6 +183,22 @@ cn30xxgmx_port_phy_addr(int port) > /* portwell cam-0100 */ > 0x02, 0x03, 0x22 > }; > + char name[64]; > + int phynode = 0; > + int portnode = -1; > + uint32_t phy = 0; > + > + snprintf(name, sizeof(name), > + "/soc/pip@11800a0000000/interface@%x/ethernet@%x", > + port / 16, port % 16); > + portnode = OF_finddevice(name); > + if (portnode != -1) { > + phy = OF_getpropint(portnode, "phy-handle", 0); > + if (phy != 0) > + phynode = OF_getnodebyphandle(phy); > + if (phynode != 0) > + return OF_getpropint(phynode, "reg", 0); > + } > > switch (octeon_boot_info->board_type) { > case BOARD_TYPE_UBIQUITI_E100: /* port 0: 7, port 1: 6 */