summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmatthew <jmatthew@openbsd.org>2018-09-10 04:56:13 +0000
committerjmatthew <jmatthew@openbsd.org>2018-09-10 04:56:13 +0000
commit52c4f284fee75b5b027d10ad39fa220cd7d835cd (patch)
tree11323208d0f119b723ef17a16a72b458095e5cff
parentbit rates over 2G won't fit in an int, so use uint64_ts instead (diff)
downloadwireguard-openbsd-52c4f284fee75b5b027d10ad39fa220cd7d835cd.tar.xz
wireguard-openbsd-52c4f284fee75b5b027d10ad39fa220cd7d835cd.zip
if the adapter can't determine the phy type on a port, pretend it's baseCR
so we get a usable list of media types to pick from. tested by and ok ccardenas@
-rw-r--r--sys/dev/pci/if_bnxt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/if_bnxt.c b/sys/dev/pci/if_bnxt.c
index 416d66df847..34b9b97ddd1 100644
--- a/sys/dev/pci/if_bnxt.c
+++ b/sys/dev/pci/if_bnxt.c
@@ -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: