diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index d3231b88361..dd6479945f2 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.181 2017/05/08 14:27:28 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.182 2017/05/26 18:40:05 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -2963,11 +2963,11 @@ iwm_load_cpu_sections_8000(struct iwm_softc *sc, struct iwm_fw_sects *fws, IWM_WRITE(sc, IWM_FH_UCODE_LOAD_STATUS, val); sec_num = (sec_num << 1) | 0x1; iwm_nic_unlock(sc); - - /* - * The firmware won't load correctly without this delay. - */ - DELAY(8000); + } else { + err = EBUSY; + printf("%s: could not load firmware chunk %d " + "(error %d)\n", DEVNAME(sc), i, err); + return err; } } @@ -2979,6 +2979,11 @@ iwm_load_cpu_sections_8000(struct iwm_softc *sc, struct iwm_fw_sects *fws, else IWM_WRITE(sc, IWM_FH_UCODE_LOAD_STATUS, 0xFFFFFFFF); iwm_nic_unlock(sc); + } else { + err = EBUSY; + printf("%s: could not finalize firmware loading (error %d)\n", + DEVNAME(sc), err); + return err; } return 0; |