Re: hide iwn firmware error log
On Tue, Oct 11, 2016 at 11:32:27PM +0200, Jan Stary wrote: > On Oct 06 12:46:21, s...@stsp.name wrote: > > Disable the detailed fatal firmware error log in iwn(4) by default. > > These are my iwm errors of today > on a Dell Latitude E5570. > I sure don't know what to do with them, > but I'm glad I can at least report them. > If this goes in, which one of them will disappear? iwm is not the same driver as iwn.
Re: hide iwn firmware error log
On Oct 06 12:46:21, s...@stsp.name wrote: > Disable the detailed fatal firmware error log in iwn(4) by default. These are my iwm errors of today on a Dell Latitude E5570. Oct 11 16:26:56 dell /bsd: iwm0: fatal firmware error Oct 11 16:26:56 dell /bsd: iwm0: device timeout Oct 11 16:26:56 dell /bsd: iwm0: device timeout Oct 11 16:26:57 dell /bsd: iwm0: could not add MAC context (error 35) Oct 11 16:34:03 dell /bsd: iwm0: fatal firmware error Oct 11 16:34:03 dell /bsd: iwm0: device timeout Oct 11 16:34:03 dell /bsd: iwm0: device timeout Oct 11 16:34:04 dell /bsd: iwm0: could not add MAC context (error 35) Oct 11 16:37:34 dell /bsd: iwm0: fatal firmware error Oct 11 16:37:34 dell /bsd: iwm0: device timeout Oct 11 16:37:34 dell /bsd: iwm0: device timeout Oct 11 16:37:35 dell /bsd: iwm0: could not add MAC context (error 35) Oct 11 17:04:28 dell /bsd: iwm0: fatal firmware error Oct 11 17:04:28 dell /bsd: iwm0: device timeout Oct 11 17:04:28 dell /bsd: iwm0: device timeout Oct 11 17:04:29 dell /bsd: iwm0: could not add MAC context (error 35) Oct 11 17:08:37 dell /bsd: iwm0: fatal firmware error Oct 11 17:08:37 dell /bsd: iwm0: device timeout Oct 11 17:08:37 dell /bsd: iwm0: device timeout Oct 11 17:08:38 dell /bsd: iwm0: could not add MAC context (error 35) Oct 11 17:27:47 dell /bsd: iwm0: fatal firmware error Oct 11 17:27:47 dell /bsd: iwm0: device timeout Oct 11 17:27:47 dell /bsd: iwm0: device timeout Oct 11 17:27:48 dell /bsd: iwm0: could not add MAC context (error 35) Oct 11 17:31:20 dell /bsd: iwm0: fatal firmware error Oct 11 17:31:20 dell /bsd: iwm0: device timeout Oct 11 17:31:20 dell /bsd: iwm0: device timeout Oct 11 17:31:21 dell /bsd: iwm0: could not add MAC context (error 35) I sure don't know what to do with them, but I'm glad I can at least report them. If this goes in, which one of them will disappear? (Are they all firmware errors?) I don't understand the motivation to hide them, but I can build the kernel with IWN_DEBUG. Jan > Index: if_iwn.c > === > RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v > retrieving revision 1.172 > diff -u -p -r1.172 if_iwn.c > --- if_iwn.c 5 Sep 2016 08:18:18 - 1.172 > +++ if_iwn.c 6 Oct 2016 10:42:41 - > @@ -2595,6 +2595,7 @@ iwn_wakeup_intr(struct iwn_softc *sc) > } > } > > +#ifdef IWN_DEBUG > /* > * Dump the error log of the firmware when a firmware panic occurs. Although > * we can't debug the firmware because it is neither open source nor free, it > @@ -2606,9 +2607,6 @@ iwn_fatal_intr(struct iwn_softc *sc) > struct iwn_fw_dump dump; > int i; > > - /* Force a complete recalibration on next init. */ > - sc->sc_flags &= ~IWN_FLAG_CALIB_DONE; > - > /* Check that the error log address is valid. */ > if (sc->errptr < IWN_FW_DATA_BASE || > sc->errptr + sizeof (dump) > > @@ -2657,6 +2655,7 @@ iwn_fatal_intr(struct iwn_softc *sc) > printf(" rx ring: cur=%d\n", sc->rxq.cur); > printf(" 802.11 state %d\n", sc->sc_ic.ic_state); > } > +#endif > > int > iwn_intr(void *arg) > @@ -2711,8 +2710,14 @@ iwn_intr(void *arg) > } > if (r1 & (IWN_INT_SW_ERR | IWN_INT_HW_ERR)) { > printf("%s: fatal firmware error\n", sc->sc_dev.dv_xname); > + > + /* Force a complete recalibration on next init. */ > + sc->sc_flags &= ~IWN_FLAG_CALIB_DONE; > + > /* Dump firmware error log and stop. */ > +#ifdef IWN_DEBUG > iwn_fatal_intr(sc); > +#endif > iwn_stop(ifp, 1); > task_add(systq, &sc->init_task); > return 1; >
Re: hide iwn firmware error log
> Date: Thu, 6 Oct 2016 12:46:21 +0200 > From: Stefan Sperling > > Disable the detailed fatal firmware error log in iwn(4) by default. You're the best judge on how useful this information is. ok kettenis@ > Index: if_iwn.c > === > RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v > retrieving revision 1.172 > diff -u -p -r1.172 if_iwn.c > --- if_iwn.c 5 Sep 2016 08:18:18 - 1.172 > +++ if_iwn.c 6 Oct 2016 10:42:41 - > @@ -2595,6 +2595,7 @@ iwn_wakeup_intr(struct iwn_softc *sc) > } > } > > +#ifdef IWN_DEBUG > /* > * Dump the error log of the firmware when a firmware panic occurs. Although > * we can't debug the firmware because it is neither open source nor free, it > @@ -2606,9 +2607,6 @@ iwn_fatal_intr(struct iwn_softc *sc) > struct iwn_fw_dump dump; > int i; > > - /* Force a complete recalibration on next init. */ > - sc->sc_flags &= ~IWN_FLAG_CALIB_DONE; > - > /* Check that the error log address is valid. */ > if (sc->errptr < IWN_FW_DATA_BASE || > sc->errptr + sizeof (dump) > > @@ -2657,6 +2655,7 @@ iwn_fatal_intr(struct iwn_softc *sc) > printf(" rx ring: cur=%d\n", sc->rxq.cur); > printf(" 802.11 state %d\n", sc->sc_ic.ic_state); > } > +#endif > > int > iwn_intr(void *arg) > @@ -2711,8 +2710,14 @@ iwn_intr(void *arg) > } > if (r1 & (IWN_INT_SW_ERR | IWN_INT_HW_ERR)) { > printf("%s: fatal firmware error\n", sc->sc_dev.dv_xname); > + > + /* Force a complete recalibration on next init. */ > + sc->sc_flags &= ~IWN_FLAG_CALIB_DONE; > + > /* Dump firmware error log and stop. */ > +#ifdef IWN_DEBUG > iwn_fatal_intr(sc); > +#endif > iwn_stop(ifp, 1); > task_add(systq, &sc->init_task); > return 1; > >
hide iwn firmware error log
Disable the detailed fatal firmware error log in iwn(4) by default. Index: if_iwn.c === RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v retrieving revision 1.172 diff -u -p -r1.172 if_iwn.c --- if_iwn.c5 Sep 2016 08:18:18 - 1.172 +++ if_iwn.c6 Oct 2016 10:42:41 - @@ -2595,6 +2595,7 @@ iwn_wakeup_intr(struct iwn_softc *sc) } } +#ifdef IWN_DEBUG /* * Dump the error log of the firmware when a firmware panic occurs. Although * we can't debug the firmware because it is neither open source nor free, it @@ -2606,9 +2607,6 @@ iwn_fatal_intr(struct iwn_softc *sc) struct iwn_fw_dump dump; int i; - /* Force a complete recalibration on next init. */ - sc->sc_flags &= ~IWN_FLAG_CALIB_DONE; - /* Check that the error log address is valid. */ if (sc->errptr < IWN_FW_DATA_BASE || sc->errptr + sizeof (dump) > @@ -2657,6 +2655,7 @@ iwn_fatal_intr(struct iwn_softc *sc) printf(" rx ring: cur=%d\n", sc->rxq.cur); printf(" 802.11 state %d\n", sc->sc_ic.ic_state); } +#endif int iwn_intr(void *arg) @@ -2711,8 +2710,14 @@ iwn_intr(void *arg) } if (r1 & (IWN_INT_SW_ERR | IWN_INT_HW_ERR)) { printf("%s: fatal firmware error\n", sc->sc_dev.dv_xname); + + /* Force a complete recalibration on next init. */ + sc->sc_flags &= ~IWN_FLAG_CALIB_DONE; + /* Dump firmware error log and stop. */ +#ifdef IWN_DEBUG iwn_fatal_intr(sc); +#endif iwn_stop(ifp, 1); task_add(systq, &sc->init_task); return 1;
Re: iwn firmware error
Stefan Sperling wrote: > On Fri, Feb 05, 2016 at 01:23:18AM -0500, Michael McConville wrote: > > When forcing my laptop to swap, I almost immediately got the following > > firmware error. I'm not sure whether this is expected. Restarting the > > interface brought things back to normal. > > > > dmesg follows. > > Looks like the firmware crashed because an interrupt could not be > serviced by the host on time, perhaps? I suspect this was the case. My machine was almost completely non-responsive. > > Feb 5 01:19:04 thinkpad /bsd: iwn0: fatal firmware error > > Feb 5 01:19:04 thinkpad /bsd: firmware error log: > > Feb 5 01:19:04 thinkpad /bsd: error type = "NMI_INTERRUPT_WDG" > > (0x0004) > > Feb 5 01:19:04 thinkpad /bsd: program counter = 0x06B4 > > Feb 5 01:19:04 thinkpad /bsd: source line = 0xD3EA > > Feb 5 01:19:04 thinkpad /bsd: error data = 0x00020263 > > Feb 5 01:19:04 thinkpad /bsd: branch link = 0x067A071A > > Feb 5 01:19:04 thinkpad /bsd: interrupt link = 0x1532E762 > > Feb 5 01:19:04 thinkpad /bsd: time= 1346051188 > > Feb 5 01:19:04 thinkpad /bsd: driver status: > > Feb 5 01:19:04 thinkpad /bsd: tx ring 0: qid=0 cur=188 queued=135 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 1: qid=1 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 2: qid=2 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 3: qid=3 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 4: qid=4 cur=135 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 5: qid=5 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 6: qid=6 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 7: qid=7 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 8: qid=8 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 9: qid=9 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 10: qid=10 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 11: qid=11 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 12: qid=12 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 13: qid=13 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 14: qid=14 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 15: qid=15 cur=0 queued=0 > > Feb 5 01:19:04 thinkpad /bsd: tx ring 16: qid=16 cur=0 queued=0 > > Feb 5 01:19:05 thinkpad /bsd: tx ring 17: qid=17 cur=0 queued=0 > > Feb 5 01:19:06 thinkpad /bsd: tx ring 18: qid=18 cur=0 queued=0 > > Feb 5 01:19:06 thinkpad /bsd: tx ring 19: qid=19 cur=0 queued=0 > > Feb 5 01:19:06 thinkpad /bsd: rx ring: cur=47 > > Feb 5 01:19:06 thinkpad /bsd: 802.11 state 4
Re: iwn firmware error
On Fri, Feb 05, 2016 at 01:23:18AM -0500, Michael McConville wrote: > When forcing my laptop to swap, I almost immediately got the following > firmware error. I'm not sure whether this is expected. Restarting the > interface brought things back to normal. > > dmesg follows. Looks like the firmware crashed because an interrupt could not be serviced by the host on time, perhaps? Low-memory situations are evil. Interesting problem, but I don't think I'll find time to look into this. > Feb 5 01:19:04 thinkpad /bsd: iwn0: fatal firmware error > Feb 5 01:19:04 thinkpad /bsd: firmware error log: > Feb 5 01:19:04 thinkpad /bsd: error type = "NMI_INTERRUPT_WDG" > (0x0004) > Feb 5 01:19:04 thinkpad /bsd: program counter = 0x06B4 > Feb 5 01:19:04 thinkpad /bsd: source line = 0xD3EA > Feb 5 01:19:04 thinkpad /bsd: error data = 0x00020263 > Feb 5 01:19:04 thinkpad /bsd: branch link = 0x067A071A > Feb 5 01:19:04 thinkpad /bsd: interrupt link = 0x1532E762 > Feb 5 01:19:04 thinkpad /bsd: time= 1346051188 > Feb 5 01:19:04 thinkpad /bsd: driver status: > Feb 5 01:19:04 thinkpad /bsd: tx ring 0: qid=0 cur=188 queued=135 > Feb 5 01:19:04 thinkpad /bsd: tx ring 1: qid=1 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 2: qid=2 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 3: qid=3 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 4: qid=4 cur=135 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 5: qid=5 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 6: qid=6 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 7: qid=7 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 8: qid=8 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 9: qid=9 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 10: qid=10 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 11: qid=11 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 12: qid=12 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 13: qid=13 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 14: qid=14 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 15: qid=15 cur=0 queued=0 > Feb 5 01:19:04 thinkpad /bsd: tx ring 16: qid=16 cur=0 queued=0 > Feb 5 01:19:05 thinkpad /bsd: tx ring 17: qid=17 cur=0 queued=0 > Feb 5 01:19:06 thinkpad /bsd: tx ring 18: qid=18 cur=0 queued=0 > Feb 5 01:19:06 thinkpad /bsd: tx ring 19: qid=19 cur=0 queued=0 > Feb 5 01:19:06 thinkpad /bsd: rx ring: cur=47 > Feb 5 01:19:06 thinkpad /bsd: 802.11 state 4
iwn firmware error
When forcing my laptop to swap, I almost immediately got the following firmware error. I'm not sure whether this is expected. Restarting the interface brought things back to normal. dmesg follows. Feb 5 01:19:04 thinkpad /bsd: iwn0: fatal firmware error Feb 5 01:19:04 thinkpad /bsd: firmware error log: Feb 5 01:19:04 thinkpad /bsd: error type = "NMI_INTERRUPT_WDG" (0x0004) Feb 5 01:19:04 thinkpad /bsd: program counter = 0x06B4 Feb 5 01:19:04 thinkpad /bsd: source line = 0xD3EA Feb 5 01:19:04 thinkpad /bsd: error data = 0x00020263 Feb 5 01:19:04 thinkpad /bsd: branch link = 0x067A071A Feb 5 01:19:04 thinkpad /bsd: interrupt link = 0x1532E762 Feb 5 01:19:04 thinkpad /bsd: time= 1346051188 Feb 5 01:19:04 thinkpad /bsd: driver status: Feb 5 01:19:04 thinkpad /bsd: tx ring 0: qid=0 cur=188 queued=135 Feb 5 01:19:04 thinkpad /bsd: tx ring 1: qid=1 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 2: qid=2 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 3: qid=3 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 4: qid=4 cur=135 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 5: qid=5 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 6: qid=6 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 7: qid=7 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 8: qid=8 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 9: qid=9 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 10: qid=10 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 11: qid=11 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 12: qid=12 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 13: qid=13 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 14: qid=14 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 15: qid=15 cur=0 queued=0 Feb 5 01:19:04 thinkpad /bsd: tx ring 16: qid=16 cur=0 queued=0 Feb 5 01:19:05 thinkpad /bsd: tx ring 17: qid=17 cur=0 queued=0 Feb 5 01:19:06 thinkpad /bsd: tx ring 18: qid=18 cur=0 queued=0 Feb 5 01:19:06 thinkpad /bsd: tx ring 19: qid=19 cur=0 queued=0 Feb 5 01:19:06 thinkpad /bsd: rx ring: cur=47 Feb 5 01:19:06 thinkpad /bsd: 802.11 state 4 OpenBSD 5.9 (GENERIC.MP) #0: Fri Feb 5 00:38:43 EST 2016 mike@thinkpad:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 4062691328 (3874MB) avail mem = 3933769728 (3751MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe0010 (78 entries) bios0: vendor LENOVO version "6QET61WW (1.31 )" date 10/26/2010 bios0: LENOVO 3626FAU acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET ASF! SLIC BOOT SSDT TCPA SSDT SSDT SSDT acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) EXP5(S4) EHC1(S3) EHC2(S3) HDEF(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpiec0 at acpi0 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz, 2793.51 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT cpu0: 256KB 64b/line 8-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 132MHz cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz, 2793.00 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 1, core 0, package 0 cpu2 at mainbus0: apid 4 (application processor) cpu2: Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz, 2793.00 MHz cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT cpu2: 256KB 64b/line 8-way L2 cache cpu2: smt 0, core 2, package 0 cpu3 at mainbus0: apid 5 (application processor) cpu3: Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz, 2793.00 MHz cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT cpu3: 256KB 64b/line 8-way L2 cache cpu3: smt 1, core 2,
Re: fix iwn firmware error during init
On Tue, Jan 12, 2016 at 11:59 +0100, Stefan Sperling wrote: > On Sat, Jan 09, 2016 at 10:25:45PM +0100, Stefan Sperling wrote: > > I've run into an issue where iwn(4) fails to init the hardware. > > > > Running 'ifconfig iwn0 scan' resulted in: > > > > setting configuration > > iwn0: fatal firmware error > > firmware error log: > > error type = "SYSASSERT" (0x0005) > > program counter = 0x00022088 > > source line = 0x00A4 > > error data = 0x00A4 > > branch link = 0x0002225800022258 > > interrupt link = 0x1532 > > time= 27873 > > driver status: > > tx ring 0: qid=0 cur=0 queued=0 > > tx ring 1: qid=1 cur=0 queued=0 > > tx ring 2: qid=2 cur=0 queued=0 > > tx ring 3: qid=3 cur=0 queued=0 > > tx ring 4: qid=4 cur=6 queued=0 > > tx ring 5: qid=5 cur=0 queued=0 > > tx ring 6: qid=6 cur=0 queued=0 > > tx ring 7: qid=7 cur=0 queued=0 > > tx ring 8: qid=8 cur=0 queued=0 > > tx ring 9: qid=9 cur=0 queued=0 > > tx ring 10: qid=10 cur=0 queued=0 > > tx ring 11: qid=11 cur=0 queued=0 > > tx ring 12: qid=12 cur=0 queued=0 > > tx ring 13: qid=13 cur=0 queued=0 > > tx ring 14: qid=14 cur=0 queued=0 > > tx ring 15: qid=15 cur=0 queued=0 > > tx ring 16: qid=16 cur=0 queued=0 > > tx ring 17: qid=17 cur=0 queued=0 > > tx ring 18: qid=18 cur=0 queued=0 > > tx ring 19: qid=19 cur=0 queued=0 > > rx ring: cur=7 > > 802.11 state 0 > > iwn0: RXON command failed > > iwn0: could not configure device > > iwn0: could not load firmware .data section > > iwn0: could not load firmware > > iwn0: could not initialize hardware > > > > A debug printf revealed the rxon command channel was set to zero: > > > > iwn_config: rxon chan 0 flags 40008000 cck f ofdm ff > > > > I haven't been able to reproduce the problem with the diff below. > > Note that this code runs during hardware initialization only. > > It shouldn't really matter what channel we set here as long as > > it isn't zero. > > > > Fix a misplaced curly brace while here... > > > > ok? > > Anyone? > > I've been running with this for 3 days without issues. > I can't judge the diff, but it fixes iwn in my x220. Intel WiFi Link 1000" rev 0x00: msi, MIMO 1T2R, BGS Thanks!
Re: fix iwn firmware error during init
On Tue, Jan 12, 2016 at 11:59:08AM +0100, Stefan Sperling wrote: > On Sat, Jan 09, 2016 at 10:25:45PM +0100, Stefan Sperling wrote: > > I've run into an issue where iwn(4) fails to init the hardware. > > > > Running 'ifconfig iwn0 scan' resulted in: > > > > setting configuration > > iwn0: fatal firmware error > > firmware error log: > > error type = "SYSASSERT" (0x0005) > > program counter = 0x00022088 > > source line = 0x00A4 > > error data = 0x00A4 > > branch link = 0x0002225800022258 > > interrupt link = 0x1532 > > time= 27873 > > driver status: > > tx ring 0: qid=0 cur=0 queued=0 > > tx ring 1: qid=1 cur=0 queued=0 > > tx ring 2: qid=2 cur=0 queued=0 > > tx ring 3: qid=3 cur=0 queued=0 > > tx ring 4: qid=4 cur=6 queued=0 > > tx ring 5: qid=5 cur=0 queued=0 > > tx ring 6: qid=6 cur=0 queued=0 > > tx ring 7: qid=7 cur=0 queued=0 > > tx ring 8: qid=8 cur=0 queued=0 > > tx ring 9: qid=9 cur=0 queued=0 > > tx ring 10: qid=10 cur=0 queued=0 > > tx ring 11: qid=11 cur=0 queued=0 > > tx ring 12: qid=12 cur=0 queued=0 > > tx ring 13: qid=13 cur=0 queued=0 > > tx ring 14: qid=14 cur=0 queued=0 > > tx ring 15: qid=15 cur=0 queued=0 > > tx ring 16: qid=16 cur=0 queued=0 > > tx ring 17: qid=17 cur=0 queued=0 > > tx ring 18: qid=18 cur=0 queued=0 > > tx ring 19: qid=19 cur=0 queued=0 > > rx ring: cur=7 > > 802.11 state 0 > > iwn0: RXON command failed > > iwn0: could not configure device > > iwn0: could not load firmware .data section > > iwn0: could not load firmware > > iwn0: could not initialize hardware > > > > A debug printf revealed the rxon command channel was set to zero: > > > > iwn_config: rxon chan 0 flags 40008000 cck f ofdm ff > > > > I haven't been able to reproduce the problem with the diff below. > > Note that this code runs during hardware initialization only. > > It shouldn't really matter what channel we set here as long as > > it isn't zero. > > > > Fix a misplaced curly brace while here... > > > > ok? > > Anyone? > > I've been running with this for 3 days without issues. > This fixed it for me. OK reyk@ > > Index: if_iwn.c > > === > > RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v > > retrieving revision 1.153 > > diff -u -p -r1.153 if_iwn.c > > --- if_iwn.c7 Jan 2016 23:08:38 - 1.153 > > +++ if_iwn.c9 Jan 2016 21:12:23 - > > @@ -3429,7 +3429,7 @@ iwn_set_link_quality(struct iwn_softc *s > > /* Next retry at immediate lower bit-rate. */ > > if (txrate > 0) > > txrate--; > > - } > > + } > > } > > > > return iwn_cmd(sc, IWN_CMD_LINK_QUALITY, &linkq, sizeof linkq, 1); > > @@ -4455,15 +4455,9 @@ iwn_config(struct iwn_softc *sc) > > IEEE80211_ADDR_COPY(ic->ic_myaddr, LLADDR(ifp->if_sadl)); > > IEEE80211_ADDR_COPY(sc->rxon.myaddr, ic->ic_myaddr); > > IEEE80211_ADDR_COPY(sc->rxon.wlap, ic->ic_myaddr); > > - sc->rxon.chan = ieee80211_chan2ieee(ic, ic->ic_ibss_chan); > > + sc->rxon.chan = 1; > > sc->rxon.flags = htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF); > > - if (IEEE80211_IS_CHAN_2GHZ(ic->ic_ibss_chan)) { > > - sc->rxon.flags |= htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ); > > - if (ic->ic_flags & IEEE80211_F_USEPROT) > > - sc->rxon.flags |= htole32(IWN_RXON_TGG_PROT); > > - DPRINTF(("%s: 2ghz prot 0x%x\n", __func__, > > - le32toh(sc->rxon.flags))); > > - } > > + sc->rxon.flags |= htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ); > > switch (ic->ic_opmode) { > > case IEEE80211_M_STA: > > sc->rxon.mode = IWN_MODE_STA; > > @@ -4489,6 +4483,9 @@ iwn_config(struct iwn_softc *sc) > > IWN_RXCHAIN_IDLE_COUNT(2); > > sc->rxon.rxchain = htole16(rxchain); > > DPRINTF(("setting configuration\n")); > > + DPRINTF(("%s: rxon chan %d flags %x cck %x ofdm %x\n", __func__, > > + sc->rxon.chan, le32toh(sc->rxon.flags), sc->rxon.cck_mask, > > + sc->rxon.ofdm_mask)); > > error = iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 0); > > if (error != 0) { > > printf("%s: RXON command failed\n", sc->sc_dev.dv_xname); > > > --
Re: fix iwn firmware error during init
Stefan Sperling wrote: > I've run into an issue where iwn(4) fails to init the hardware. > > Running 'ifconfig iwn0 scan' resulted in: > > setting configuration > iwn0: fatal firmware error > firmware error log: > error type = "SYSASSERT" (0x0005) > program counter = 0x00022088 > source line = 0x00A4 > error data = 0x00A4 > branch link = 0x0002225800022258 > interrupt link = 0x1532 > time= 27873 > driver status: > tx ring 0: qid=0 cur=0 queued=0 > tx ring 1: qid=1 cur=0 queued=0 > tx ring 2: qid=2 cur=0 queued=0 > tx ring 3: qid=3 cur=0 queued=0 > tx ring 4: qid=4 cur=6 queued=0 > tx ring 5: qid=5 cur=0 queued=0 > tx ring 6: qid=6 cur=0 queued=0 > tx ring 7: qid=7 cur=0 queued=0 > tx ring 8: qid=8 cur=0 queued=0 > tx ring 9: qid=9 cur=0 queued=0 > tx ring 10: qid=10 cur=0 queued=0 > tx ring 11: qid=11 cur=0 queued=0 > tx ring 12: qid=12 cur=0 queued=0 > tx ring 13: qid=13 cur=0 queued=0 > tx ring 14: qid=14 cur=0 queued=0 > tx ring 15: qid=15 cur=0 queued=0 > tx ring 16: qid=16 cur=0 queued=0 > tx ring 17: qid=17 cur=0 queued=0 > tx ring 18: qid=18 cur=0 queued=0 > tx ring 19: qid=19 cur=0 queued=0 > rx ring: cur=7 > 802.11 state 0 > iwn0: RXON command failed > iwn0: could not configure device > iwn0: could not load firmware .data section > iwn0: could not load firmware > iwn0: could not initialize hardware > > A debug printf revealed the rxon command channel was set to zero: > > iwn_config: rxon chan 0 flags 40008000 cck f ofdm ff > > Fix a misplaced curly brace while here... Cannot comment on the code unfortunately. But with a current kernel I regularly get the above error on startup since today. Your diff fixes it. I'd be happy to see a fix for this to go in :-) > ok? > > Index: if_iwn.c > === > RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v > retrieving revision 1.153 > diff -u -p -r1.153 if_iwn.c > --- if_iwn.c 7 Jan 2016 23:08:38 - 1.153 > +++ if_iwn.c 9 Jan 2016 21:12:23 - > @@ -3429,7 +3429,7 @@ iwn_set_link_quality(struct iwn_softc *s > /* Next retry at immediate lower bit-rate. */ > if (txrate > 0) > txrate--; > - } > + } > } > > return iwn_cmd(sc, IWN_CMD_LINK_QUALITY, &linkq, sizeof linkq, 1); > @@ -4455,15 +4455,9 @@ iwn_config(struct iwn_softc *sc) > IEEE80211_ADDR_COPY(ic->ic_myaddr, LLADDR(ifp->if_sadl)); > IEEE80211_ADDR_COPY(sc->rxon.myaddr, ic->ic_myaddr); > IEEE80211_ADDR_COPY(sc->rxon.wlap, ic->ic_myaddr); > - sc->rxon.chan = ieee80211_chan2ieee(ic, ic->ic_ibss_chan); > + sc->rxon.chan = 1; > sc->rxon.flags = htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF); > - if (IEEE80211_IS_CHAN_2GHZ(ic->ic_ibss_chan)) { > - sc->rxon.flags |= htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ); > - if (ic->ic_flags & IEEE80211_F_USEPROT) > - sc->rxon.flags |= htole32(IWN_RXON_TGG_PROT); > - DPRINTF(("%s: 2ghz prot 0x%x\n", __func__, > - le32toh(sc->rxon.flags))); > - } > + sc->rxon.flags |= htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ); > switch (ic->ic_opmode) { > case IEEE80211_M_STA: > sc->rxon.mode = IWN_MODE_STA; > @@ -4489,6 +4483,9 @@ iwn_config(struct iwn_softc *sc) > IWN_RXCHAIN_IDLE_COUNT(2); > sc->rxon.rxchain = htole16(rxchain); > DPRINTF(("setting configuration\n")); > + DPRINTF(("%s: rxon chan %d flags %x cck %x ofdm %x\n", __func__, > + sc->rxon.chan, le32toh(sc->rxon.flags), sc->rxon.cck_mask, > + sc->rxon.ofdm_mask)); > error = iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 0); > if (error != 0) { > printf("%s: RXON command failed\n", sc->sc_dev.dv_xname); >
Re: fix iwn firmware error during init
On Sat, Jan 09, 2016 at 10:25:45PM +0100, Stefan Sperling wrote: > I've run into an issue where iwn(4) fails to init the hardware. > > Running 'ifconfig iwn0 scan' resulted in: > > setting configuration > iwn0: fatal firmware error > firmware error log: > error type = "SYSASSERT" (0x0005) > program counter = 0x00022088 > source line = 0x00A4 > error data = 0x00A4 > branch link = 0x0002225800022258 > interrupt link = 0x1532 > time= 27873 > driver status: > tx ring 0: qid=0 cur=0 queued=0 > tx ring 1: qid=1 cur=0 queued=0 > tx ring 2: qid=2 cur=0 queued=0 > tx ring 3: qid=3 cur=0 queued=0 > tx ring 4: qid=4 cur=6 queued=0 > tx ring 5: qid=5 cur=0 queued=0 > tx ring 6: qid=6 cur=0 queued=0 > tx ring 7: qid=7 cur=0 queued=0 > tx ring 8: qid=8 cur=0 queued=0 > tx ring 9: qid=9 cur=0 queued=0 > tx ring 10: qid=10 cur=0 queued=0 > tx ring 11: qid=11 cur=0 queued=0 > tx ring 12: qid=12 cur=0 queued=0 > tx ring 13: qid=13 cur=0 queued=0 > tx ring 14: qid=14 cur=0 queued=0 > tx ring 15: qid=15 cur=0 queued=0 > tx ring 16: qid=16 cur=0 queued=0 > tx ring 17: qid=17 cur=0 queued=0 > tx ring 18: qid=18 cur=0 queued=0 > tx ring 19: qid=19 cur=0 queued=0 > rx ring: cur=7 > 802.11 state 0 > iwn0: RXON command failed > iwn0: could not configure device > iwn0: could not load firmware .data section > iwn0: could not load firmware > iwn0: could not initialize hardware > > A debug printf revealed the rxon command channel was set to zero: > > iwn_config: rxon chan 0 flags 40008000 cck f ofdm ff > > I haven't been able to reproduce the problem with the diff below. > Note that this code runs during hardware initialization only. > It shouldn't really matter what channel we set here as long as > it isn't zero. > > Fix a misplaced curly brace while here... > > ok? Anyone? I've been running with this for 3 days without issues. > Index: if_iwn.c > === > RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v > retrieving revision 1.153 > diff -u -p -r1.153 if_iwn.c > --- if_iwn.c 7 Jan 2016 23:08:38 - 1.153 > +++ if_iwn.c 9 Jan 2016 21:12:23 - > @@ -3429,7 +3429,7 @@ iwn_set_link_quality(struct iwn_softc *s > /* Next retry at immediate lower bit-rate. */ > if (txrate > 0) > txrate--; > - } > + } > } > > return iwn_cmd(sc, IWN_CMD_LINK_QUALITY, &linkq, sizeof linkq, 1); > @@ -4455,15 +4455,9 @@ iwn_config(struct iwn_softc *sc) > IEEE80211_ADDR_COPY(ic->ic_myaddr, LLADDR(ifp->if_sadl)); > IEEE80211_ADDR_COPY(sc->rxon.myaddr, ic->ic_myaddr); > IEEE80211_ADDR_COPY(sc->rxon.wlap, ic->ic_myaddr); > - sc->rxon.chan = ieee80211_chan2ieee(ic, ic->ic_ibss_chan); > + sc->rxon.chan = 1; > sc->rxon.flags = htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF); > - if (IEEE80211_IS_CHAN_2GHZ(ic->ic_ibss_chan)) { > - sc->rxon.flags |= htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ); > - if (ic->ic_flags & IEEE80211_F_USEPROT) > - sc->rxon.flags |= htole32(IWN_RXON_TGG_PROT); > - DPRINTF(("%s: 2ghz prot 0x%x\n", __func__, > - le32toh(sc->rxon.flags))); > - } > + sc->rxon.flags |= htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ); > switch (ic->ic_opmode) { > case IEEE80211_M_STA: > sc->rxon.mode = IWN_MODE_STA; > @@ -4489,6 +4483,9 @@ iwn_config(struct iwn_softc *sc) > IWN_RXCHAIN_IDLE_COUNT(2); > sc->rxon.rxchain = htole16(rxchain); > DPRINTF(("setting configuration\n")); > + DPRINTF(("%s: rxon chan %d flags %x cck %x ofdm %x\n", __func__, > + sc->rxon.chan, le32toh(sc->rxon.flags), sc->rxon.cck_mask, > + sc->rxon.ofdm_mask)); > error = iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 0); > if (error != 0) { > printf("%s: RXON command failed\n", sc->sc_dev.dv_xname); >
fix iwn firmware error during init
I've run into an issue where iwn(4) fails to init the hardware. Running 'ifconfig iwn0 scan' resulted in: setting configuration iwn0: fatal firmware error firmware error log: error type = "SYSASSERT" (0x0005) program counter = 0x00022088 source line = 0x00A4 error data = 0x00A4 branch link = 0x0002225800022258 interrupt link = 0x1532 time= 27873 driver status: tx ring 0: qid=0 cur=0 queued=0 tx ring 1: qid=1 cur=0 queued=0 tx ring 2: qid=2 cur=0 queued=0 tx ring 3: qid=3 cur=0 queued=0 tx ring 4: qid=4 cur=6 queued=0 tx ring 5: qid=5 cur=0 queued=0 tx ring 6: qid=6 cur=0 queued=0 tx ring 7: qid=7 cur=0 queued=0 tx ring 8: qid=8 cur=0 queued=0 tx ring 9: qid=9 cur=0 queued=0 tx ring 10: qid=10 cur=0 queued=0 tx ring 11: qid=11 cur=0 queued=0 tx ring 12: qid=12 cur=0 queued=0 tx ring 13: qid=13 cur=0 queued=0 tx ring 14: qid=14 cur=0 queued=0 tx ring 15: qid=15 cur=0 queued=0 tx ring 16: qid=16 cur=0 queued=0 tx ring 17: qid=17 cur=0 queued=0 tx ring 18: qid=18 cur=0 queued=0 tx ring 19: qid=19 cur=0 queued=0 rx ring: cur=7 802.11 state 0 iwn0: RXON command failed iwn0: could not configure device iwn0: could not load firmware .data section iwn0: could not load firmware iwn0: could not initialize hardware A debug printf revealed the rxon command channel was set to zero: iwn_config: rxon chan 0 flags 40008000 cck f ofdm ff I haven't been able to reproduce the problem with the diff below. Note that this code runs during hardware initialization only. It shouldn't really matter what channel we set here as long as it isn't zero. Fix a misplaced curly brace while here... ok? Index: if_iwn.c === RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v retrieving revision 1.153 diff -u -p -r1.153 if_iwn.c --- if_iwn.c7 Jan 2016 23:08:38 - 1.153 +++ if_iwn.c9 Jan 2016 21:12:23 - @@ -3429,7 +3429,7 @@ iwn_set_link_quality(struct iwn_softc *s /* Next retry at immediate lower bit-rate. */ if (txrate > 0) txrate--; - } + } } return iwn_cmd(sc, IWN_CMD_LINK_QUALITY, &linkq, sizeof linkq, 1); @@ -4455,15 +4455,9 @@ iwn_config(struct iwn_softc *sc) IEEE80211_ADDR_COPY(ic->ic_myaddr, LLADDR(ifp->if_sadl)); IEEE80211_ADDR_COPY(sc->rxon.myaddr, ic->ic_myaddr); IEEE80211_ADDR_COPY(sc->rxon.wlap, ic->ic_myaddr); - sc->rxon.chan = ieee80211_chan2ieee(ic, ic->ic_ibss_chan); + sc->rxon.chan = 1; sc->rxon.flags = htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF); - if (IEEE80211_IS_CHAN_2GHZ(ic->ic_ibss_chan)) { - sc->rxon.flags |= htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ); - if (ic->ic_flags & IEEE80211_F_USEPROT) - sc->rxon.flags |= htole32(IWN_RXON_TGG_PROT); - DPRINTF(("%s: 2ghz prot 0x%x\n", __func__, - le32toh(sc->rxon.flags))); - } + sc->rxon.flags |= htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ); switch (ic->ic_opmode) { case IEEE80211_M_STA: sc->rxon.mode = IWN_MODE_STA; @@ -4489,6 +4483,9 @@ iwn_config(struct iwn_softc *sc) IWN_RXCHAIN_IDLE_COUNT(2); sc->rxon.rxchain = htole16(rxchain); DPRINTF(("setting configuration\n")); + DPRINTF(("%s: rxon chan %d flags %x cck %x ofdm %x\n", __func__, + sc->rxon.chan, le32toh(sc->rxon.flags), sc->rxon.cck_mask, + sc->rxon.ofdm_mask)); error = iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 0); if (error != 0) { printf("%s: RXON command failed\n", sc->sc_dev.dv_xname);