avoids a division by 0 when up'ing the non-working cnmac2 on er-poe
feedback from visa@:
"The cnmac2 link is connected to a discrete Ethernet switch chip on the
PoE, and this link does not carry RGMII in-band PHY status. If the code
were to support such hardware designs in the future, something like this
patch would be needed."
this diff from miod@, same diff from visa@ in 2017
(cf https://marc.info/?l=openbsd-bugs&m=
151017517115440&w=2)
ok visa@
-/* $OpenBSD: cn30xxgmx.c,v 1.54 2024/05/20 23:13:33 jsg Exp $ */
+/* $OpenBSD: cn30xxgmx.c,v 1.55 2024/07/08 08:07:45 landry Exp $ */
/*
* Copyright (c) 2007 Internet Initiative Japan, Inc.
baudrate = IF_Gbps(1);
break;
default:
- baudrate = 0/* XXX */;
+ /* Assume 1Gbps for now */
+ baudrate = IF_Gbps(1); /* XXX */
break;
}
ifp->if_baudrate = baudrate;
SET(prt_cfg, PRTN_CFG_SPEED);
break;
default:
- /* NOT REACHED! */
+ /* THEORETICALLY NOT REACHED! */
/* Following configuration is default value of system.
*/
tx_clk = 1;