summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2020-07-11 00:54:19 +0000
committerdlg <dlg@openbsd.org>2020-07-11 00:54:19 +0000
commit4497d1835e6b0e6ddf2cec31282d1ebf44ba9ab1 (patch)
tree8f4ea0f71fa4810a0ebb860b8c9252a67c3056e5 /sys
parentAdd hw.cpuspeed and hw.setperf (diff)
downloadwireguard-openbsd-4497d1835e6b0e6ddf2cec31282d1ebf44ba9ab1.tar.xz
wireguard-openbsd-4497d1835e6b0e6ddf2cec31282d1ebf44ba9ab1.zip
don't complain if the API is too low to support "query phy types".
it just means we won't know what to show in ifconfig media output, but that's not a huge deal. there's still some more issues around api versions and driver support that we're working on though. ok sthen@ jmatthew@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_ixl.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/pci/if_ixl.c b/sys/dev/pci/if_ixl.c
index cb6906156d7..60242d44167 100644
--- a/sys/dev/pci/if_ixl.c
+++ b/sys/dev/pci/if_ixl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ixl.c,v 1.64 2020/07/10 13:26:38 patrick Exp $ */
+/* $OpenBSD: if_ixl.c,v 1.65 2020/07/11 00:54:19 dlg Exp $ */
/*
* Copyright (c) 2013-2015, Intel Corporation
@@ -3891,15 +3891,16 @@ ixl_get_phy_types(struct ixl_softc *sc, uint64_t *phy_types_ptr)
switch (rv) {
case -1:
printf("%s: GET PHY ABILITIES timeout\n", DEVNAME(sc));
- goto done;
+ goto err;
case IXL_AQ_RC_OK:
break;
case IXL_AQ_RC_EIO:
- printf("%s: unable to query phy types\n", DEVNAME(sc));
- break;
+ /* API is too old to handle this command */
+ phy_types = 0;
+ goto done;
default:
printf("%s: GET PHY ABILITIIES error %u\n", DEVNAME(sc), rv);
- goto done;
+ goto err;
}
phy = IXL_DMA_KVA(&idm);
@@ -3907,11 +3908,12 @@ ixl_get_phy_types(struct ixl_softc *sc, uint64_t *phy_types_ptr)
phy_types = lemtoh32(&phy->phy_type);
phy_types |= (uint64_t)phy->phy_type_ext << 32;
+done:
*phy_types_ptr = phy_types;
rv = 0;
-done:
+err:
ixl_dmamem_free(sc, &idm);
return (rv);
}