Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Sep 2016 22:13:08 +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: r306002 - head/sys/dev/iwm
Message-ID:  <201609192213.u8JMD8mh074181@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ivadasz
Date: Mon Sep 19 22:13:08 2016
New Revision: 306002
URL: https://svnweb.freebsd.org/changeset/base/306002

Log:
  [iwm] Fix iwm_poll_bit() error value check in iwm_attach().
  
  The iwm(4) iwm_poll_bit() function returns 1 on success, and 0 on failure,
  whereas the iwl_poll_bit() in Linux iwlwifi returns < 0 on failure.
  
  So the (ret < 0) check ended up ignoring any error returned by
  iwm_poll_bit().
  
  Approved by:	adrian (mentor)
  Differential Revision:	https://reviews.freebsd.org/D7932

Modified:
  head/sys/dev/iwm/if_iwm.c

Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c	Mon Sep 19 22:11:34 2016	(r306001)
+++ head/sys/dev/iwm/if_iwm.c	Mon Sep 19 22:13:08 2016	(r306002)
@@ -5762,7 +5762,7 @@ iwm_attach(device_t dev)
 				   IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY,
 				   IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY,
 				   25000);
-		if (ret < 0) {
+		if (!ret) {
 			device_printf(sc->sc_dev,
 			    "Failed to wake up the nic\n");
 			goto fail;



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