if the adapter can't determine the phy type on a port, pretend it's baseCR
authorjmatthew <jmatthew@openbsd.org>
Mon, 10 Sep 2018 04:56:13 +0000 (04:56 +0000)
committerjmatthew <jmatthew@openbsd.org>
Mon, 10 Sep 2018 04:56:13 +0000 (04:56 +0000)
so we get a usable list of media types to pick from.

tested by and ok ccardenas@

sys/dev/pci/if_bnxt.c

index 416d66d..34b9b97 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_bnxt.c,v 1.13 2018/09/10 04:52:23 jmatthew Exp $   */
+/*     $OpenBSD: if_bnxt.c,v 1.14 2018/09/10 04:56:13 jmatthew Exp $   */
 /*-
  * Broadcom NetXtreme-C/E network driver.
  *
@@ -1323,6 +1323,7 @@ uint64_t
 bnxt_get_media_type(uint64_t speed, int phy_type)
 {
        switch (phy_type) {
+       case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN:
        case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASECR:
        case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_25G_BASECR_CA_L:
        case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_25G_BASECR_CA_S: