Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2016 19:03:32 +0000 (UTC)
From:      =?UTF-8?Q?Imre_Vad=c3=a1sz?= <ivadasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r303557 - head/sys/dev/iwm
Message-ID:  <201607301903.u6UJ3Wi2062972@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607301903.u6UJ3Wi2062972>