Date: Thu, 1 Mar 2018 04:49:42 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330149 - stable/11/sys/dev/iwm Message-ID: <201803010449.w214ngvO000805@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Thu Mar 1 04:49:42 2018 New Revision: 330149 URL: https://svnweb.freebsd.org/changeset/base/330149 Log: MFC r306002 [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(). Modified: stable/11/sys/dev/iwm/if_iwm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm.c Thu Mar 1 04:46:58 2018 (r330148) +++ stable/11/sys/dev/iwm/if_iwm.c Thu Mar 1 04:49:42 2018 (r330149) @@ -5760,7 +5760,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?201803010449.w214ngvO000805>