diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2020-07-11 00:54:20 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2020-07-11 00:54:20 +0000 |
commit | 6ccd24a3e06a8f71561fe9c5cc8d7a1231298491 (patch) | |
tree | 23b32efffd9a4ef2c8fd31ba1ab4ab50e02ef938 /sys/dev/pci | |
parent | 9a7c8fb0c94970ff4b3dda296e7bef5cb233dd9f (diff) |
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/dev/pci')
-rw-r--r-- | sys/dev/pci/if_ixl.c | 14 |
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); } |