svn commit: r303557 - head/sys/dev/iwm
Imre Vadász
ivadasz at FreeBSD.org
Sat Jul 30 19:03:34 UTC 2016
Author: ivadasz
Date: Sat Jul 30 19:03:32 2016
New Revision: 303557
URL: https://svnweb.freebsd.org/changeset/base/303557
Log:
[iwm] Fix iwm_poll_bit() usage in iwm_stop_device(), fixup r303418.
* iwm_poll_bit() returns 1 on success and 0 on failure, whereas
iwl_poll_bit() in Linux's iwlwifi returns >= 0 on success and < 0 on
failure.
* Because of the wrong iwm_poll_bit return code check, no warning was
printed if tx DMA stopping failed.
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D7371
Modified:
head/sys/dev/iwm/if_iwm.c
Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c Sat Jul 30 17:53:37 2016 (r303556)
+++ head/sys/dev/iwm/if_iwm.c Sat Jul 30 19:03:32 2016 (r303557)
@@ -1310,8 +1310,8 @@ iwm_stop_device(struct iwm_softc *sc)
}
/* Wait for DMA channels to be idle */
- if (iwm_poll_bit(sc, IWM_FH_TSSR_TX_STATUS_REG, mask, mask,
- 5000) < 0) {
+ if (!iwm_poll_bit(sc, IWM_FH_TSSR_TX_STATUS_REG, mask, mask,
+ 5000)) {
device_printf(sc->sc_dev,
"Failing on timeout while stopping DMA channel: [0x%08x]\n",
IWM_READ(sc, IWM_FH_TSSR_TX_STATUS_REG));
More information about the svn-src-all
mailing list