diff options
author | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2024-10-04 06:37:23 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2024-10-04 06:37:23 +0000 |
commit | 0dba6a6f449208b18e9d12ebe3247e9b69c99f8e (patch) | |
tree | fe40c744b297c2b3088db5099466f9db40ded50f | |
parent | 76c1072688f82c1e44f4833ae87d72477735c35e (diff) |
As with other multiqueue drivers, print the number of queues we set up
along with the interrupt and ethernet address details.
ok dlg@
-rw-r--r-- | sys/dev/pci/if_mcx.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c index b934e832c51..516287c9b62 100644 --- a/sys/dev/pci/if_mcx.c +++ b/sys/dev/pci/if_mcx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mcx.c,v 1.115 2024/05/24 06:02:53 jsg Exp $ */ +/* $OpenBSD: if_mcx.c,v 1.116 2024/10/04 06:37:22 jmatthew Exp $ */ /* * Copyright (c) 2017 David Gwynne <dlg@openbsd.org> @@ -2927,23 +2927,25 @@ mcx_attach(struct device *parent, struct device *self, void *aux) goto teardown; } - printf(", %s, address %s\n", intrstr, - ether_sprintf(sc->sc_ac.ac_enaddr)); - msix--; /* admin ops took one */ sc->sc_intrmap = intrmap_create(&sc->sc_dev, msix, MCX_MAX_QUEUES, INTRMAP_POWEROF2); if (sc->sc_intrmap == NULL) { - printf("%s: unable to create interrupt map\n", DEVNAME(sc)); + printf(": unable to create interrupt map\n"); goto teardown; } sc->sc_queues = mallocarray(intrmap_count(sc->sc_intrmap), sizeof(*sc->sc_queues), M_DEVBUF, M_WAITOK|M_ZERO); if (sc->sc_queues == NULL) { - printf("%s: unable to create queues\n", DEVNAME(sc)); + printf(": unable to create queues\n"); goto intrunmap; } + printf(", %s, %d queue%s, address %s\n", intrstr, + intrmap_count(sc->sc_intrmap), + intrmap_count(sc->sc_intrmap) > 1 ? "s" : "", + ether_sprintf(sc->sc_ac.ac_enaddr)); + strlcpy(ifp->if_xname, DEVNAME(sc), IFNAMSIZ); ifp->if_softc = sc; ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX; |