summaryrefslogtreecommitdiff
path: root/sys/dev/iwm
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2019-01-26 17:52:12 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2019-01-26 17:52:12 +0000
commitb294eac56bcb1a3acb75d299fe0554fd9cf28b83 (patch)
treed6a022f365eb852df89ad2020eb41926b7cc46ef /sys/dev/iwm
parent4aa37fe4fc6628edb619fb2259caf24f14680830 (diff)
Notes
Diffstat (limited to 'sys/dev/iwm')
-rw-r--r--sys/dev/iwm/if_iwm.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
index 60cfb9e20b1e..b87085244a72 100644
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -2397,8 +2397,6 @@ static int
iwm_pcie_load_firmware_chunk(struct iwm_softc *sc, uint32_t dst_addr,
bus_addr_t phy_addr, uint32_t byte_cnt)
{
- int ret;
-
sc->sc_fw_chunk_done = 0;
if (!iwm_nic_lock(sc))
@@ -2430,14 +2428,9 @@ iwm_pcie_load_firmware_chunk(struct iwm_softc *sc, uint32_t dst_addr,
iwm_nic_unlock(sc);
/* wait up to 5s for this segment to load */
- ret = 0;
- while (!sc->sc_fw_chunk_done) {
- ret = msleep(&sc->sc_fw, &sc->sc_mtx, 0, "iwmfw", hz);
- if (ret)
- break;
- }
+ msleep(&sc->sc_fw, &sc->sc_mtx, 0, "iwmfw", hz * 5);
- if (ret != 0) {
+ if (!sc->sc_fw_chunk_done) {
device_printf(sc->sc_dev,
"fw chunk addr 0x%x len %d failed to load\n",
dst_addr, byte_cnt);