summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2019-11-04 12:16:48 +0000
committerstsp <stsp@openbsd.org>2019-11-04 12:16:48 +0000
commit2ad68cb186bcfd8af7481a6ff70ce894149d7072 (patch)
tree6306a1f4fe64c6958a4cbe3d66e7e492f5e7499d
parentFix handling of iwm_sf_config() input argument. (diff)
downloadwireguard-openbsd-2ad68cb186bcfd8af7481a6ff70ce894149d7072.tar.xz
wireguard-openbsd-2ad68cb186bcfd8af7481a6ff70ce894149d7072.zip
iwm API version -31 firmware and up will crash after load unless the driver
explicitly enables support for 31 queues in the GP_CTRL register. Coincidence? Accident? Bad joke? In any case this took us several days to figure out; the root cause was eventually identified by patrick@ ok patrick@
-rw-r--r--sys/dev/pci/if_iwm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index 9a0ec318531..135daeb696f 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.272 2019/11/04 12:04:16 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.273 2019/11/04 12:16:48 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -1845,7 +1845,9 @@ iwm_nic_tx_init(struct iwm_softc *sc)
txq->desc_dma.paddr >> 8);
}
- iwm_write_prph(sc, IWM_SCD_GP_CTRL, IWM_SCD_GP_CTRL_AUTO_ACTIVE_MODE);
+ iwm_set_bits_prph(sc, IWM_SCD_GP_CTRL,
+ IWM_SCD_GP_CTRL_AUTO_ACTIVE_MODE |
+ IWM_SCD_GP_CTRL_ENABLE_31_QUEUES);
iwm_nic_unlock(sc);