summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ix.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2014-11-27 07:54:07 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2014-11-27 07:54:07 +0000
commitddd0465185522f2451084b0b0e1a4e8a9fa9a479 (patch)
treeb08cb474c8747064f850fc2acef279a4e7615584 /sys/dev/pci/if_ix.c
parentef110e64dbda3a983f4318b0bc54dade24b12dcd (diff)
Use dv_xname instead of if_xname to establish our interrupt. The latter is
still unset when at this point, and some MD variants of pci_intr_establish(9) make a copy of the string instead of storing a pointer. Makes vmstat -i properly print the device name on sparc64. ok mikeb@, deraadt@
Diffstat (limited to 'sys/dev/pci/if_ix.c')
-rw-r--r--sys/dev/pci/if_ix.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index 69a42647e59..844464cd4de 100644
--- a/sys/dev/pci/if_ix.c
+++ b/sys/dev/pci/if_ix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ix.c,v 1.109 2014/11/26 00:09:27 dlg Exp $ */
+/* $OpenBSD: if_ix.c,v 1.110 2014/11/27 07:54:06 kettenis Exp $ */
/******************************************************************************
@@ -1414,7 +1414,6 @@ ixgbe_setup_optics(struct ix_softc *sc)
int
ixgbe_allocate_legacy(struct ix_softc *sc)
{
- struct ifnet *ifp = &sc->arpcom.ac_if;
struct ixgbe_osdep *os = &sc->osdep;
struct pci_attach_args *pa = &os->os_pa;
const char *intrstr = NULL;
@@ -1438,7 +1437,7 @@ ixgbe_allocate_legacy(struct ix_softc *sc)
intrstr = pci_intr_string(pc, ih);
sc->tag = pci_intr_establish(pc, ih, IPL_NET,
- ixgbe_intr, sc, ifp->if_xname);
+ ixgbe_intr, sc, sc->dev.dv_xname);
if (sc->tag == NULL) {
printf(": couldn't establish interrupt");
if (intrstr != NULL)