summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2019-10-28 18:08:09 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2019-10-28 18:08:09 +0000
commitcfcd38703794181182b4e68ae055a407c051b110 (patch)
tree94bf0297541fb51ceffe28286468d955a7527554 /sys/dev
parent58e408be8daf26c9378e1608613aaa61b7bad08b (diff)
Make iwm_stop_device() power down bus master DMA clocks on 7k devices only.
Patch by Imre Vadasz ok patrick@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_iwm.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index d83be95e4fc..8ae9f01cb02 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.264 2019/10/28 18:06:04 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.265 2019/10/28 18:08:08 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -1632,13 +1632,15 @@ iwm_stop_device(struct iwm_softc *sc)
for (qid = 0; qid < nitems(sc->txq); qid++)
iwm_reset_tx_ring(sc, &sc->txq[qid]);
- if (iwm_nic_lock(sc)) {
- /* Power-down device's busmaster DMA clocks */
- iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG,
- IWM_APMG_CLK_VAL_DMA_CLK_RQT);
- iwm_nic_unlock(sc);
+ if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) {
+ if (iwm_nic_lock(sc)) {
+ /* Power-down device's busmaster DMA clocks */
+ iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG,
+ IWM_APMG_CLK_VAL_DMA_CLK_RQT);
+ iwm_nic_unlock(sc);
+ }
+ DELAY(5);
}
- DELAY(5);
/* Make sure (redundant) we've released our request to stay awake */
IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL,