diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-12-02 15:10:54 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-12-02 15:10:54 +0000 |
commit | 3971aab91f9292c392425113dfc03acbd47e5ae2 (patch) | |
tree | a3f01efc84c31f5c34ef1bccd261686bd0b70659 /sys/dev/pci/if_ix.c | |
parent | de1b6a94d5cf6d1c8ddb4539043372e81344af1f (diff) |
Disable the TX laser when interface is going down for all fiber modules
Previously only multi-rate fiber modules would disable the TX laser, but
newer Intel driver does it for single rate modules as well. Reminded by
kettenis@, tested by procter@ and Hrvoje Popovski. Thanks!
Diffstat (limited to 'sys/dev/pci/if_ix.c')
-rw-r--r-- | sys/dev/pci/if_ix.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index 82cb1b6ec6a..703e8634224 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.145 2016/11/30 16:15:44 mikeb Exp $ */ +/* $OpenBSD: if_ix.c,v 1.146 2016/12/02 15:10:53 mikeb Exp $ */ /****************************************************************************** @@ -292,7 +292,7 @@ ixgbe_attach(struct device *parent, struct device *self, void *aux) goto err_late; /* Enable the optics for 82599 SFP+ fiber */ - if (sc->hw.phy.multispeed_fiber && sc->hw.mac.ops.enable_tx_laser) + if (sc->hw.mac.ops.enable_tx_laser) sc->hw.mac.ops.enable_tx_laser(&sc->hw); /* Enable power to the phy */ @@ -1406,7 +1406,7 @@ ixgbe_stop(void *arg) if (sc->hw.mac.type == ixgbe_mac_82599EB) sc->hw.mac.ops.stop_mac_link_on_d3(&sc->hw); /* Turn off the laser */ - if (sc->hw.phy.multispeed_fiber && sc->hw.mac.ops.disable_tx_laser) + if (sc->hw.mac.ops.disable_tx_laser) sc->hw.mac.ops.disable_tx_laser(&sc->hw); timeout_del(&sc->timer); timeout_del(&sc->rx_refill); @@ -1742,7 +1742,7 @@ ixgbe_dma_malloc(struct ix_softc *sc, bus_size_t size, r = bus_dmamap_create(dma->dma_tag, size, 1, size, 0, BUS_DMA_NOWAIT, &dma->dma_map); if (r != 0) { - printf("%s: ixgbe_dma_malloc: bus_dma_tag_create failed; " + printf("%s: ixgbe_dma_malloc: bus_dmamap_create failed; " "error %u\n", ifp->if_xname, r); goto fail_0; } |